Check drift
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.From its SKILL.md
npx -y skills add nicolasapr/contract-tree --skill check-driftAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 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.
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:
- Entrypoints exist — every
file:symbolinentrypointsresolves to a real file and a real exported symbol. A missing one is the strongest staleness signal (the boundary moved or was renamed). - 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 outputaltin 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. - 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. - 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 contracts —
tree.mdedges that no longer match the contracts' invertedupstream. 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.
Gives 1 of the 12 instructions most quality gates skills give in 713 tokens
Counted across 1,524 of the 2,830 authors here whose files we hold, read 2026-09-06
- Read full output and check exit codein 45 of 1524, across 40 files
- Verify output confirms the claimin 44 of 1524, across 39 files
- Identify the command that proves the claimin 43 of 1524, across 39 files
- Execute the full verification commandin 36 of 1524, across 30 files
- Produce a verification reportin 34 of 1524, across 18 files
- Review git diff changesin 30 of 1524, across 16 files
- Fix build failures immediatelyin 29 of 1524, across 9 files
- Group findings by severityhere, and in 28 of 1524
- State claim only with evidencein 27 of 1524, across 22 files
- Verify regression tests with red-green cyclein 26 of 1524, across 22 files
- Run the full test suitein 26 of 1524, across 25 files
- Run test suite with coveragein 25 of 1524, across 10 files
Said here and by no other author read
- Read the contract tree file
- Verify all entrypoints exist in the codebase
- Compare actual signatures against declared input and output
- Validate declared upstreams against actual module imports
- Identify modules missing a contract file
- Flag index and contract divergence
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.