agentleFS
aradmanamnaoonaradmanamnaoon/vibe-coding-skills/skills/testing/api-contract-auditor/SKILL.md

api-contract-auditor

Skill0 starsChanged 18 days agoMITView on GitHub

Compare API producers, consumers, schemas, types, status codes, and error shapes to detect contract drift. Use for client/server changes or API versioning.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    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:

    Keep independently changed API layers compatible.

    line 8
  2. Distinctive:

    Read applicable repository instructions before edits.

    line 20
  3. Distinctive:

    Check serialization details such as casing, nullability, dates, enums, pagination, and unknown fields.

    line 35
  4. Distinctive:

    Check backward compatibility for existing clients unless the change is explicitly breaking/versioned.

    line 36
  5. Distinctive:

    Add/repair contract tests at the serialization boundary.

    line 37
  6. Distinctive:

    Run server and client type/build tests plus the narrow contract suite.

    line 38
  7. Distinctive:

    Update docs/generated clients only from the confirmed contract source.

    line 39
  8. Distinctive:

    Do not silently make all fields optional to suppress compatibility failures.

    line 47
  9. Distinctive:

    If the authoritative schema is unclear, identify the source-of-truth conflict before editing multiple layers.

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Purpose

Keep independently changed API layers compatible.

When to activate

An API endpoint/schema/client/type changes or integration errors suggest drift.

When not to activate

Internal function refactor with no serialized/public boundary.

Preconditions

  • Read applicable repository instructions before edits.
  • Preserve unrelated working-tree changes and establish a baseline when the workflow can modify code.
  • Identify which tools and environments are actually available; do not claim unavailable checks ran.

Required inputs

  • Server routes/schema
  • Client calls/types
  • OpenAPI/GraphQL/protobuf or docs
  • Relevant tests

Workflow

  1. Identify changed request/response fields, types, requiredness, status codes, headers, and error envelopes.
  2. Compare authoritative schema to server implementation and every in-repo consumer.
  3. Check serialization details such as casing, nullability, dates, enums, pagination, and unknown fields.
  4. Check backward compatibility for existing clients unless the change is explicitly breaking/versioned.
  5. Add/repair contract tests at the serialization boundary.
  6. Run server and client type/build tests plus the narrow contract suite.
  7. Update docs/generated clients only from the confirmed contract source.

Relevant tools

Schema tooling, type checker, API tests, generated-client tooling.

Safety restrictions

Do not silently make all fields optional to suppress compatibility failures.

Validation

  • Producer and in-repo consumers agree on the serialized contract.
  • Intentional breaking changes are explicit/versioned.
  • Contract tests exercise both success and representative error behavior.

Expected output

  • Contract diff
  • Producer/consumer mismatches
  • Compatibility decision
  • Test evidence

Failure handling

If the authoritative schema is unclear, identify the source-of-truth conflict before editing multiple layers.

Completion criteria

The skill is complete only when every applicable validation item above has observed evidence or is explicitly marked not executed with the concrete blocker. Do not replace missing evidence with confidence language.

Research mapping

This skill was selected from research problems: P025, P003. See research/vibe-coding-problems.md and research/problem-evidence.csv in the Vibe Coding Skills repository.

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.