← ClaudeAtlas

doctruth-snippetslisted

Statically checks the code in documentation: Python snippets that no longer parse, JSON that is not valid, YAML, TOML and JS/TS or shell snippets with broken syntax, imports of the project's own modules that no longer exist, install commands that name a stale version, commands that point at files or scripts that are gone, risky advice such as curl piped to sh, and function names in the text that nothing in the code uses. Nothing in the docs is ever executed. Use when the user says "do the examples in my README still work", "check the code blocks in the docs", "my quick start is broken", "is the version in the install command current", "which snippets are out of date", or "fix the docs code that no longer parses".
vivekbhange-hub/docs-truth-skill · ★ 0 · Data & Documents · score 75
Install: claude install-skill vivekbhange-hub/docs-truth-skill
# doctruth-snippets: docs code that no longer matches the code A snippet that fails to parse, imports a module that was renamed, or copies a file that does not exist is the most expensive kind of doc bug: it fails on the reader's first run. `snippet_check.py` parses fences with `ast`, `json` and bracket scanning, and checks imports and file references against the project. It never runs anything from a document. ## Inputs - A project folder or one Markdown file. The project root is used for imports, versions and paths. - Commands below say `python3`; on Windows use `python` (or `py -3`). ## Outputs - A findings table (SN001 to SN017) with severity, `file:line`, the section and a suggestion. - Fixed snippets and install commands, each checked again by the script. - A short list of snippets you could not judge statically (a language with no checker). ## Steps 1. **Confirm permission.** Read and edit docs only in a repository the user owns or is authorized to change. Do not run a snippet to test it, even a harmless-looking one. 2. **Run the check.** ``` python3 "${CLAUDE_SKILL_DIR}/snippet_check.py" . --json > doctruth-snippets.json python3 "${CLAUDE_SKILL_DIR}/snippet_check.py" . ``` Use `--fail-on high` in CI. A single file: `snippet_check.py README.md --root .`. 3. **Fix the first-run problems first.** Findings in an Install, Quick start or Usage section are marked `(first run)`. Order: `SN014` missing files and scripts, `SN009` and `SN010` bad im