drift-check
Skill0 starsChanged 37 days agoMITView on GitHub
Flag public symbols in the project's source tree that are not documented in the project's knowledge base. Use this before committing, in CI, or whenever a public API surface changes and you want to know whether the knowledge base has gone stale.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- scoobydrew83/skillstheir own version, first seen Nov 3, 2026
- pfeff/claude-skillstheir own version, first seen Nov 1, 2026
- nadavnaveh/skillstheir own version, first seen Oct 25, 2026
- aribajahan/claude-skillstheir own version, first seen Sep 23, 2026
- DarynaRodriguez/seo-skillstheir own version, first seen Aug 27, 2026
- ngreenwall/claude-skillstheir own version, first seen Jul 9, 2026
Used with
Projects with it also use handoff.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- sparkline-ventures/product-eval★ 15same name
- HaipingShi/coderail★ 8same name
- broomva/skills★ 4same name
- pfeff/claude-skills★ 3same name
- nadavnaveh/skills★ 2same name
- ngreenwall/claude-skills★ 2same name
- DarynaRodriguez/seo-skills★ 1same name
- marky291/claude-drift★ 1same name
- aribajahan/claude-skills★ 0same name
- scoobydrew83/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- drift-checkSkill
- drillSkill
- failure-classifySkill
- init-loopSkill
- report-renderSkill
- test-loop-bootstrapSkill
- drillSkill
- failure-classifySkill
- init-loopSkill
- report-renderSkill
- test-loop-bootstrapSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
3
Distinctive
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
- Distinctive: line 23
Before committing a change that adds, renames, or removes a public symbol.
- Distinctive: line 25
After a git pull if the upstream changed the public API.
- Distinctive: line 27
Do not use this skill to scan private internals, generated code, or third-party dependencies.
- Very specific: line 69
Tokenise: every file under knowledge_base into identifier-like tokens (alphanumerics and underscores).
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
drift-check
Detect drift between the project's public API surface and its
knowledge base (a docs/knowledge/ directory that names every public
type and function).
When to use
- Before committing a change that adds, renames, or removes a public symbol.
- As a CI step that runs after every push.
- After a
git pullif the upstream changed the public API.
Do not use this skill to scan private internals, generated code, or third-party dependencies. Its job is to keep the human-readable knowledge base honest about the public surface.
Inputs
| Name | Required | Default | Description |
source_glob | yes | none | Glob for the source files to scan, e.g. Sources/CaffCore/*.swift or src/**/*.py. |
knowledge_base | yes | none | Path to a Markdown directory, usually docs/knowledge/. The skill extracts identifier tokens from every file under it. |
baseline | no | none | Optional file with one identifier per line, listing symbols intentionally left undocumented. Add an entry here only after a human has confirmed it is genuinely not worth a knowledge-base entry. |
scope | no | all | all scans every file matching source_glob. changed scans only files in git diff (staged + unstaged + untracked-but-staged). |
Output
| Channel | Content |
| stdout | One line per undocumented symbol in the form <relative_path>:<Symbol>. |
| exit code | 0 = every public symbol in scope is either in the knowledge base or in the baseline. 1 = at least one symbol is missing. 2 = the input was malformed (e.g. the knowledge base path does not exist). |
| stderr | Summary line, then a hint pointing at where to fix the drift. |
What counts as a public symbol
The skill uses a coarse regex; the precise rules are language-specific:
| Language | Public surface is |
| Swift | public struct, public class, public enum, public protocol, public func, public static func, public init |
| Python | def and class not prefixed with _ at module top level; __all__ if present |
| Go | identifiers in package ... that start with an uppercase letter |
| Rust | pub struct, pub fn, pub enum, pub trait, pub use re-exports |
| TypeScript | export function, export class, export interface, export type |
The skill is deliberately not a full parser. It trades false positives
for a small, predictable rule set. If the regex does not match a
deliberate public symbol, add it to baseline rather than fight the
regex.
Algorithm (in three steps)
- Extract public symbol names from the source tree using the language-specific regex.
- Tokenise every file under
knowledge_baseinto identifier-like tokens (alphanumerics and underscores). - Diff the symbol set against
(knowledge base tokens ∪ baseline). Any symbol not present is drift.
Worked example (Swift)
Suppose Sources/CaffCore/SafetyPolicy.swift adds:
public struct SafetyPolicy {
public func someNewMethod() { ... }
}docs/knowledge/L1_modules.md does not mention someNewMethod.
Running drift-check with source_glob=Sources/CaffCore/*.swift and
knowledge_base=docs/knowledge/ produces:
scanned 24 public symbol(s) across 9 file(s)
drift: 1 public symbol(s) not in L1_modules.md or baseline:
- Sources/CaffCore/SafetyPolicy.swift:someNewMethodThe fix is to add someNewMethod to the L1 modules document. If it is
genuinely not worth a knowledge-base entry, add someNewMethod to the
baseline file.
Anti-patterns
- Running the skill on generated code. Generated code can change
with every build, and its public surface is the generator's contract,
not the project's. Exclude it from
source_glob. - Adding every internal helper to the baseline. The baseline is for symbols intentionally left out of the knowledge base, not for skipping the work. Use the knowledge base.
- Treating drift warnings as a code review substitute. The skill tells you the knowledge base is stale. It does not tell you whether the new symbol is well-designed.
Cross-references
- failure-classify — the next step in the loop. drift-check runs before the test, failure-classify runs after.
- init-loop — installs the script that this skill describes into a fresh project.
- drill — verifies that this skill actually reacts to a deliberately drifted commit.
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
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.

