agentsclimarketplace

Check drift

Skill nicolasapr/contract-tree/skills/check-drift

Claude Code plugin: represent a project as a tree of documented modules with boundary contracts, so an agent stays oriented in large codebases and makes boundary changes a deliberate preserve-vs-cascade decision.

Install
npx -y skills add nicolasapr/contract-tree --skill check-drift

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 21 days oldThe repository was created 21 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when auditing whether a contract tree still matches the code — e.g. after a large merge or when a `CONTRACT.md` is suspected stale. Checks that entrypoints still exist, signatures match declared I/O, and declared upstreams match real imports; reports suspected-stale contracts and code modules missing a contract. Report-only, never auto-fixes.

SKILL.md

3.4 KB, 713 tokens by cl100k_base, as published. Nobody here has run it

Check Drift

Audit a contract tree against the real code. Contracts that drift out of sync become lies the other flows trust — this skill finds them.

Hard rule: this skill is report-only. It lists suspected problems and suggests fixes. It does not edit contracts or code. Fixing is a separate, deliberate step (usually via change-with-contracts or map-modules).

The canonical format is ../map-modules/references/contract-format.md.

What to check

Read .contract-tree/tree.md, then for each CONTRACT.md:

  1. Entrypoints exist — every file:symbol in entrypoints resolves to a real file and a real exported symbol. A missing one is the strongest staleness signal (the boundary moved or was renamed).
  2. Signatures match declared I/O — the entrypoint's actual parameter and return types are consistent with io.input (precondition) / io.output (postcondition). Flag mismatches (e.g. contract says output alt in meters but the type/comment now says feet). A downstream module's declared consumption is effectively a consumer contract on this output; a mismatch that would violate what a downstream relies on is high severity — the provider silently stopped satisfying a consumer.
  3. Upstream matches real imports — the module's actual cross-module imports match its declared upstream. Flag both directions: a declared upstream that isn't imported anymore, and a real cross-module import that isn't declared.
  4. Invariants still plausible — where cheaply checkable, note invariants the code visibly contradicts. (Deep verification isn't expected; flag the obvious.)

Tree-level checks

  • Contract-less modules (tree holes) — directories that look like modules (cohesive code behind a public surface, imported by others) but have no CONTRACT.md. Report them as gaps to map.
  • Index vs contractstree.md edges that no longer match the contracts' inverted upstream. Since the index is regenerable, the fix is to regenerate; report the divergence.

Output

Produce a report grouped by severity:

  • Stale (high): entrypoint missing, or I/O clearly contradicted.
  • Suspect (medium): upstream/import mismatch, index/contract divergence.
  • Gaps: code modules without a contract.

For each item: the module id, what looks wrong, and the suggested corrective flow (change-with-contracts to fix a moved boundary, map-modules to fill a gap or regenerate the index). Do not apply the fixes — hand the report to the user.

Scope caveat

This audit sees only declared static dependencies. It cannot detect implicit coupling — shared formats, global state, a shared database, event ordering, duplicated constants — which drifts invisibly because no upstream edge records it. When a contract's I/O carries strong connascence (a unit/meaning, a wire format, a magic value), say so in the report: the real drift surface may be wider than the graph. See ../contract-tree/references/principles.md.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.