Agent Skill

Apply AFDATA at structured-data boundaries. Field names carry units, formats, and sensitivity so an agent can interpret values without extra prose.

Start with the smallest source

Read only the route needed for the task:

TaskRead
Name or review fields, configs, logs, database columns, wire/API data, redaction, or renderingnaming-output.md, then use registry.json for exact suffix metadata
Build or review protocol events, CLI output, logging, version/help behavior, value-source declarations, or stream routingcli-protocol.md and protocol-v1.schema.json
Build or validate a closed-world CLI or structured helpcli-protocol.md, cli-spec-v1.schema.json, and cli-help-v2.schema.json
Read or safely mutate JSON/TOML/YAML/dotenv/INI or Markdown frontmatter, or read a Markdown file’s heading sectionsdocuments.md
Author an AFDATA-style Bash 3.2+ executablebash.md

In a repository checkout, the formal contract is spec/agent-first-data.md. Use it only when changing the contract or resolving an ambiguity; use spec/registry.json, spec/protocol-v1.schema.json, spec/cli-spec-v1.schema.json, and spec/cli-help-v2.schema.json for exact machine-readable CLI constraints. The focused references above are the offline installed-skill equivalents.

If a README or example conflicts with the formal spec or schema, follow the formal source and report the discrepancy. Do not invent suffix meanings, protocol fields, or help fields.

Core decisions

Implementation workflow

  1. Identify the serialization boundary and whether the output is a finite result or an ordered event stream.
  2. Inspect existing public and persistent names before changing them.
  3. Use the runtime library instead of reimplementing suffix formatting, redaction, event envelopes, or CLI errors.
  4. Redact before serialization. For HTTP/MCP/SSE paths that bypass render, call redacted_value; use redact_url_secrets for one URL or redact_urls_in_text for scheme URLs already embedded in prose.
  5. For new CLIs, construct one CliSpec, register every executable Combination, resolve to CliOutcome, and dispatch only by action_id. Parser, combination matching, typed values, output planning, and help must all come from that registry.
  6. Validate examples and emitted data with the checks below.

Runtime API names follow native casing. In a checkout, consult only the relevant rust/README.md, go/README.md, python/README.md, or typescript/README.md for imports and signatures.

CLI checks

Use afdata when it is available:

afdata lint payload.json
afdata validate events.jsonl --strict
afdata render payload.json --output yaml
afdata skill validate skills/example-skill

Review exit criteria