agentleFS
daizhouchendaizhouchen/openclaw-skills/skills/doc-archaeologist/SKILL.md

doc-archaeologist

Skill0 starsChanged 47 days agoMITView on GitHub

扫描项目文档与注释,检查时效、文件引用和配置描述的一致性,生成报告与修复建议。

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    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:

    Run the scanning script to discover every documentation artifact in the target project:

    line 17
  2. Distinctive:

    All Markdown / text documentation files (README*, CONTRIBUTING*, CHANGELOG*, docs//*, *.md)

    line 26
  3. Distinctive:

    After the pipeline finishes:

    line 65
  4. Very specific:

    Read doc-archaeology-report.md and summarise the key findings to the user.

    line 66
  5. Distinctive:

    If there are fix-suggestion patches, offer to apply them.

    line 67
  6. Distinctive:

    Always use absolute paths when invoking scripts.

    line 72
  7. Distinctive:

    If the user does not specify a target, use the current working directory.

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Doc Archaeologist

Resolve <skill_dir> to the directory containing this SKILL.md. Use absolute helper paths, keep project/output paths separate, and generate only the outputs needed for the user's request.

You are an expert documentation archaeologist. Your job is to scan a project's documentation and comments, find stale / inconsistent / misleading content, and produce an actionable archaeology report.

Workflow

Step 1 -- Scan documentation inventory

Run the scanning script to discover every documentation artifact in the target project:

python3 "<skill_dir>/scripts/scan_docs.py" TARGET_DIR > /tmp/doc-arch-inventory.json

where TARGET_DIR is the root of the project the user wants analysed (default: the current working directory).

This produces a JSON inventory containing:

  • All Markdown / text documentation files (README*, CONTRIBUTING*, CHANGELOG*, docs/**/*, *.md)
  • Code comment metadata: Python docstrings, JSDoc blocks, TODO/FIXME/HACK/DEPRECATED markers
  • Per-file metadata: path, last-modified timestamp, content sections, referenced paths, code-block commands

Step 2 -- Analyse freshness and consistency

Feed the inventory into the analysis script:

python3 "<skill_dir>/scripts/analyze_freshness.py" TARGET_DIR /tmp/doc-arch-inventory.json > /tmp/doc-arch-findings.json

The analyser checks:

  • Staleness: docs that have not changed in 6+ months while the code they describe changes frequently
  • Broken references: file paths mentioned in docs that do not exist on disk
  • Invalid commands: shell commands in code blocks that reference binaries/scripts not found in the project
  • Environment variable drift: env vars documented but not used in code, or used in code but not documented
  • Severity levels: critical / warning / suggestion
  • Each finding carries a confidence score (0.0 -- 1.0)

Step 3 -- Generate the archaeology report

python3 "<skill_dir>/scripts/report.py" TARGET_DIR /tmp/doc-arch-findings.json

This creates:

  • doc-archaeology-report.md in the target directory -- the main human-readable report
  • fix-suggestions/ directory with concrete diff patches for automatically fixable issues

Report sections:

  1. Document Health Score (A -- F letter grade)
  2. Critical Findings -- stale docs, broken references
  3. Warnings -- inconsistencies, drift
  4. Suggestions -- improvements, missing docs
  5. Finding detail table: location, problem, suggested fix, confidence

Step 4 -- Present results

After the pipeline finishes:

  1. Read doc-archaeology-report.md and summarise the key findings to the user.
  2. If there are fix-suggestion patches, offer to apply them.
  3. Answer any follow-up questions about specific findings.

Important notes

  • Always use absolute paths when invoking scripts.
  • Replace SKILL_DIR with the actual path to this skill's directory.
  • Replace TARGET_DIR with the project root the user wants to analyse.
  • If the user does not specify a target, use the current working directory.
  • The scripts require Python 3.8+.

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.