agentleFS
SireJeffSireJeff/k0ntext/skills/verify-docs/SKILL.md

verify-docs

Skill8 starsChanged 9 months agoMITView on GitHub

Verify documentation line numbers match current code state

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 6

    Distinctive

    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:

    Check if documentation line numbers still match the actual code.

    line 7
  2. Distinctive:

    After code changes, line numbers in documentation may drift.

    line 11
  3. Distinctive:

    Check if file exists

    line 23
  4. Distinctive:

    Check if line number is within file bounds

    line 24
  5. Distinctive:

    After adding/removing significant code

    line 75
  6. Distinctive:

    Before creating a PR

    line 76

“Common” is measured: kept by at least 6 in 10 of the 4 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

Context Engineering: Verify Documentation

Check if documentation line numbers still match the actual code.

Purpose

After code changes, line numbers in documentation may drift. This skill:

  1. Finds all file:line references in .claude/ documentation
  2. Verifies the referenced lines exist and match described content
  3. Reports accuracy and suggests fixes

Process

  1. Scan Documentation
    • Find all patterns like file.py:123 or [file.py:123]
    • Extract file path and line number
  2. Verify References
    • Check if file exists
    • Check if line number is within file bounds
    • Sample content to verify it matches description
  3. Calculate Accuracy
    • Total references found
    • Valid references
    • Accuracy percentage
  4. Generate Report
    Documentation Accuracy Report
    =============================
    Total References: 156
    Valid: 142
    Invalid: 14
    Accuracy: 91%
    
    Invalid References:
    - context/workflows/auth.md:45 → src/auth.py:230 (line moved to 245)
    - context/workflows/api.md:12 → src/api.py:100 (file renamed)

Usage

Check specific file:

/context-eng:verify-docs path/to/changed/file.py

Check all documentation:

/context-eng:verify-docs

Auto-fix (update line numbers):

/context-eng:verify-docs --fix

Target Accuracy

LevelAccuracyAction
Excellent≥80%No action needed
Good60-80%Update when convenient
Warning40-60%Update soon
Critical<40%Update immediately

When to Run

  • After refactoring
  • After adding/removing significant code
  • Before creating a PR
  • Weekly maintenance

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.