agentleFS
dprakash2101dprakash2101/dotnet-production-agent-skills/skills/api-contract-safety/SKILL.md

api-contract-safety

Skill4 starsChanged 52 days agoMITView on GitHub

Use when changing or reviewing existing API routes, versions, verbs, headers, request/response DTOs, serialization, status codes, error shapes, authorization, or public interfaces.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat routes, verbs, headers, query/path parameters, request and response schemas, JSON names, serialization rules, status codes, error …

    line 8
  2. Distinctive:

    Before editing, locate controller/endpoint definitions, DTOs, serializers/converters, validators, OpenAPI generation, clients, …

    line 10
  3. Distinctive:

    Prefer additive, backward-compatible changes.

    line 12
  4. Very specific:

    When a breaking change is unavoidable, identify affected consumers and use the repository's versioning/migration/deprecation approach.

    line 14
  5. Distinctive:

    When available, compare generated OpenAPI or serialized representative responses before and after the change.

    line 16

≈ “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

API contract safety

Treat routes, verbs, headers, query/path parameters, request and response schemas, JSON names, serialization rules, status codes, error bodies, enums, auth requirements, and public interfaces as contracts.

Before editing, locate controller/endpoint definitions, DTOs, serializers/converters, validators, OpenAPI generation, clients, contract/integration tests, and known consumers. Record current observable behavior, including defaults, optionality, casing, null handling, and error responses.

Prefer additive, backward-compatible changes. Do not rename/remove fields, change type or meaning, make optional input required, alter enum wire values, change status/error behavior, or tighten auth unless required. Distinguish missing, null, empty, and default values when clients can observe the difference.

When a breaking change is unavoidable, identify affected consumers and use the repository's versioning/migration/deprecation approach. Test serialized wire behavior and representative failures, not only C# object equality. Update API documentation/generated clients only when part of the repository's established workflow.

When available, compare generated OpenAPI or serialized representative responses before and after the change. Include missing versus null fields, enum wire values, error payloads and a representative existing consumer in compatibility tests.

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.