doctruth-snippetslisted
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