agentleFS
ku5icku5ic/claude-kit/skills/code-contract/SKILL.md

code-contract

Skill2 starsChanged 14 days agoMITView on GitHub

What a change does to a public surface, each change classed patch, minor, or major, with the consumers it reaches

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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:

    Read-only. No version bump, no changelog edit, no install.

    line 55

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

/code-contract

Diff the public surface between a base and the working tree, class each change patch, minor, or major, and list what each change reaches. Read-only.

Loading this skill isn't enough. Before the step a row names, read its file.

BeforeRead
Step 2, with a schema filereference/schemas.md
Step 2, with the ecosystem's API tool installedreference/ecosystem-tools.md
Step 3, classing each changereference/semver.md, reference/behavioral.md

Stack specifics come from the stack's pattern skill. The commit-message bump rules are the git-patterns skill's.

Procedure

  1. Surface. The base is the argument, else kit git-base. What's public comes from the project: a package's declared exports, a published schema, its routes, a component library's props. The report names the surface it treated as public. Unclear, ask.
  2. Base and head, first that applies:
    • A schema file (OpenAPI, GraphQL, protobuf). Its checker runs on the base's copy (git show <base>:<file>) and the working tree's, per reference/schemas.md.
    • The ecosystem's API tool, installed and configured in the project, run per reference/ecosystem-tools.md.
    • Otherwise exported symbols, routes, and props, found with ast-grep on both sides, the base's files read with git show. The report says no checker ran.
  3. Class each change by reference/semver.md, then scan the diff for what reference/behavioral.md lists, which no type diff sees.
  4. Consumers. Each changed symbol gets /code-impact's Consumers procedure, run here. A published package's consumers outside the repo are unknown, and the report says so.

Report

Load the report-format skill and use its format, written to the path kit scratch-dir contract <scope-slug> prints, with these narrowings:

  • The TL;DR's first bullet is the bump in place of the health word: patch, minor, or major: <the change that forces it>. Under 0.y.z, it says the class is advice.
  • A Changes table with the change, its class, its evidence (the checker's line, or file:line on each side), and its consumers.
  • A major change is a failure when the project's version or commit doesn't say major, else info. A behavioral change is a warning.

Reply

The report path and the bump line.

Stop

Read-only. No version bump, no changelog edit, no install.

Arguments: $ARGUMENTS

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.