agentleFS
mmccallammccalla/coding-agent-skill-library/skills/integration-message-construction/SKILL.md

integration-message-construction

Skill4 starsChanged 5 months agoApache-2.0View on GitHub

Defines integration message intent, envelopes, identifiers and lifecycle metadata. Use when creating command, event, document or request-reply message contracts and schemas.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 12 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use when creating message schemas, event contracts, command payloads, request/reply payloads, metadata envelopes or compatibility rules for …

    line 14
  2. Distinctive:

    Document Message: transfers a data structure for consumption.

    line 24
  3. Distinctive:

    Use Correlation Identifier to match replies, callbacks or related messages.

    line 45
  4. Distinctive:

    Use Return Address when replies must be routed dynamically.

    line 46
  5. Distinctive:

    Use Message Sequence when messages must be assembled or ordered as a set.

    line 47
  6. Distinctive:

    Use Message Expiration when stale messages must not be processed.

    line 48
  7. Distinctive:

    Use Format Indicator when multiple payload encodings or schema versions are possible.

    line 49
  8. Distinctive:

    Use Claim Check when payload data is large, sensitive or better stored out-of-band.

    line 50
  9. Distinctive:

    Do not model commands as events.

    line 63
  10. Distinctive:

    Do not place routing-critical data only inside opaque payloads.

    line 64
  11. Distinctive:

    Do not expose internal database schemas as integration contracts.

    line 65
  12. Distinctive:

    Do not overload one message type with multiple unrelated meanings.

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Integration Message Construction

When to use

Use when creating message schemas, event contracts, command payloads, request/reply payloads, metadata envelopes or compatibility rules for enterprise integrations.

Objective

Define well-formed integration messages with clear intent, stable contracts and sufficient metadata for routing, processing, observability and recovery.

Procedure

  1. Classify message intent:
    • Command Message: instructs a receiver to perform an action.
    • Document Message: transfers a data structure for consumption.
    • Event Message: states that something happened.
    • Request-Reply: asks for a response, usually with Correlation Identifier and Return Address.
  2. Define envelope and payload separately.
  3. Include minimum standard metadata:
    • message_id
    • correlation_id
    • causation_id where useful
    • producer
    • produced_at
    • schema_name and schema_version
    • message_type
    • content_type / format indicator
    • expiry where relevant
    • traceparent or equivalent trace context
  4. Define lifecycle semantics: creation, validation, expiry, retry, replay and archival.
  5. Define compatibility rules: additive changes, deprecation, schema evolution and consumer tolerance.
  6. Apply privacy and minimisation: include only data required by consumers; use references or Claim Check for large or sensitive payloads.

Pattern selection guide

  • Use Correlation Identifier to match replies, callbacks or related messages.
  • Use Return Address when replies must be routed dynamically.
  • Use Message Sequence when messages must be assembled or ordered as a set.
  • Use Message Expiration when stale messages must not be processed.
  • Use Format Indicator when multiple payload encodings or schema versions are possible.
  • Use Claim Check when payload data is large, sensitive or better stored out-of-band.

Required outputs

  • Message type and intent
  • Envelope schema
  • Payload schema outline
  • Validation and compatibility rules
  • Privacy, security and retention considerations
  • Example message, if requested

Guardrails

  • Do not model commands as events; commands request action, events record facts.
  • Do not place routing-critical data only inside opaque payloads.
  • Do not expose internal database schemas as integration contracts.
  • Do not overload one message type with multiple unrelated meanings.

Related skills

  • message-based-integration-design
  • message-channel-design
  • message-routing-design
  • message-transformation-design
  • schema-registry-and-contracts
  • event-modeling
  • data-contract-design

Verification

  • Message intent is explicit and not ambiguous.
  • Envelope and payload are separated.
  • Required metadata fields are defined.
  • Compatibility and privacy rules are stated.
  • Residual risks and assumptions are recorded.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.