agentleFS
gigayayagigayaya/gigachang-skills/.claude/skills/docs-drift/SKILL.md

docs-drift

Skill0 starsChanged 5 months agoMITView on GitHub

Use when the user wants to verify this plugin's docs are still in sync with its code after a change — e.g. "check for docs drift", "did the README drift", "are the docs still accurate", "I updated the plugin, verify the docs", "/docs-drift". Runs a deterministic checker for mechanical drift (skill/command catalogs in README and codemap, per-skill index files, dead relative links, English-only rule, version bump) and then does a semantic pass the script cannot — comparing each doc's prose description against what the skill actually does and the dependencies it actually ships. Proposes concrete fixes and only edits docs after the user approves. Manual-trigger only — never auto-invoke; never edit files without approval.

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use release.

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.
  • MicrosoftSkill

    release

    Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 2

    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
  1. Distinctive:

    When invoked, check whether this plugin's documentation still matches its code, then propose fixes.

    line 8
  2. Very specific:

    If a version bump is warranted (per the user's global rules, adding or changing a feature is a minor bump), update …

    line 106
  3. Distinctive:

    Read-first, write-on-approval: the analysis stays in chat.

    line 123

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

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Docs Drift

When invoked, check whether this plugin's documentation still matches its code, then propose fixes. "Drift" is anything a doc claims that the repo no longer backs up: a skill missing from a catalog table, a dead link, a README sentence that describes behaviour the skill no longer has, a dependency list that no longer matches requirements.txt.

Two layers, in order: a deterministic script that proves mechanical drift, then a semantic pass that only an LLM can do. Report both, fix on approval.

When to invoke

  • Manual only. The user asks to check docs drift / doc accuracy, or runs /docs-drift. Typically right after adding, renaming, or removing a skill, command, or agent.
  • Never auto-invoke, and never edit any file before the user approves.

Workflow

Step 1 — Run the mechanical checker

It is standard-library Python — no install needed.

python ${CLAUDE_PROJECT_DIR}/.claude/skills/docs-drift/scripts/check_docs_drift.py --json

The script resolves the repo root via git (or --root DIR) and reports, as JSON, every mismatch it can prove:

  • skill-catalog — a skill in skills/ missing its docs/knowledge/skills/<name>-index.md, its README "Skills in this plugin" row, or its codemap "Skill indexes" row; frontmatter name not matching the directory.
  • command-catalog — a commands/<slug>.md not listed in the README "Slash commands" table.
  • skill-command — an exported skill that no commands/*.md mentions (every exported skill ships a slash command; slugs may differ from skill names).
  • orphan — an index file pointing at a skill that no longer exists.
  • dead-link — a relative markdown link whose target file is gone.
  • english-only — a file containing CJK/Kana/Hangul (GR-1); a warning, since a quoted non-English source is allowed.
  • manifest-sync — plugin.json's description differing from the plugin's entry in marketplace.json.
  • version-bump — functional files changed vs HEAD without a plugin.json version bump; a warning.

errors block a clean bill of health; warnings may have legitimate exceptions (judge each). Use the human-readable form (drop --json) if you just want to read it.

Step 2 — Semantic pass (what the script cannot check)

The script proves structural facts; it cannot read meaning. Do this part yourself. For each skill, open its SKILL.md and compare against:

  • its one-line description in the README "Skills in this plugin" table,
  • its row in docs/knowledge/codemap.md and its docs/knowledge/skills/<name>-index.md,
  • its dependency claims in the README and the skill's own README.md versus the actual scripts/requirements.txt (or "no dependencies" claims versus whether a requirements.txt exists),
  • the slash-command description in commands/<slug>.md versus what the skill now does.

Also sanity-check the cross-cutting docs against reality:

  • README.md "Repository layout" tree — does it still match the real tree (new top-level dirs/files, renamed ones)?
  • docs/knowledge/architecture.md — does the "LLM understands / script transforms" description still hold for every skill, including any new one?
  • docs/knowledge/codemap.md "Dev tooling" table — are all hooks/scripts listed?

Flag a semantic drift only when the prose genuinely no longer fits the code — not for harmless wording differences.

Step 3 — Propose fixes

Present, in chat:

  1. Mechanical findings — the script's errors and warnings, each with the exact file + the one-line fix.
  2. Semantic findings — the description/code mismatches you found, quoting the stale sentence and the corrected wording.
  3. Where each fix goes — exact file and table/section.

Then ask the user to approve. They may take a subset, edit wording, or decline.

Step 4 — Apply approved fixes

Only after approval:

  • Edit only the docs. Do not change skill behaviour or scripts to make a doc true — fix the doc to match the code (unless the user says the code is what drifted, in which case confirm before touching code).
  • Match each file's existing table shape, heading style, and tone.
  • If a version bump is warranted (per the user's global rules, adding or changing a feature is a minor bump), update .claude-plugin/plugin.json.

Step 5 — Re-run and report

Re-run the checker to confirm it now exits clean, then tell the user what was changed and in which files so they can review the diff.

Notes

  • The script is the single source of truth for mechanical checks — the Stop hook (.claude/hooks/check-docs-drift.sh) runs the same script whenever a turn ends with uncommitted changes to catalog files (detected via git status), so mechanical drift is caught even when this skill is not explicitly invoked. This skill adds the semantic pass and the guided fix-up.
  • The script is a plain CLI: --json for machine output, --strict to treat warnings as errors (handy in CI), --root DIR to point at another checkout.
  • Read-first, write-on-approval: the analysis stays in chat; only approved edits are persisted.
  • This skill lives in .claude/skills/ (project-level), not skills/ — it is repo-internal dev tooling and is not exported to users who install the plugin.

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.