Skip to content
Back to skills

Docs Verifier

BSecurity

Verify every code example and factual claim on a documentation page against the source, citing the line that proves each one and type-checking or running the code. Use before merging a docs PR, or when asked to verify or fact-check a page.

  • 9,397 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 10, 2026
ai-agentstypescriptpythonrustgoshellbashnodegitapidocumentation

Works with

  • cli
  • api
  • mcp

Security analysis

B81/100
  • highPerforms destructive filesystem operations
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned December 1, 2026

npx -y skills add strands-agents/harness-sdk --skill docs-verifier --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docs Verifier?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Docs Verifier
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/strands-agents-docs-verifier/badge)](https://www.skillsdirectory.com/skills/strands-agents-docs-verifier)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: docs-verifier
description: Verify every code example and factual claim on a documentation page against the source, citing the line that proves each one and type-checking or running the code. Use before merging a docs PR, or when asked to verify or fact-check a page.
---

# Documentation Verifier

Check that everything a documentation page states is true of the code right now, and produce a claim-by-claim report citing the `file:line` behind each assessment. Unlike `docs-reviewer` (style) and `docs-audit` (whether a page needs work), this skill checks only truth, and checks all of it. Where the page and the code disagree, the page is wrong; never edit source to match a page.

## Inputs

Verify exactly the pages you're given, usually one or two:

- page paths under `site/src/content/docs/` (or their URLs)
- a docs PR or branch: its changed pages, from `git diff --name-only origin/main... -- site/src/content/docs`
- a code change: pages whose `sourceLinks` or prose mention the changed paths or symbols (`grep -rln "<path>\|<Symbol>" site/src/content/docs`)

With no target, ask. Never default to the whole site.

## Where the truth lives

| Area | Source | Public surface |
|------|--------|----------------|
| Python SDK (`strands-agents`) | `strands-py/src/strands/` | `__all__` of the imported module |
| TypeScript SDK (`@strands-agents/sdk`) | `strands-ts/src/` | `strands-ts/src/index.ts` (`@internal` is not public) |
| Rust SDK (`strands`) | `strands-rs/strands/src/` | public items re-exported by `strands-rs/strands/src/lib.rs` |
| Python harness (`strands-harness`) | `harness-py/src/strands_harness/` | `harness-py/src/strands_harness/__init__.py` |
| TypeScript harness (`@strands-agents/harness`) | `harness-ts/src/` | `harness-ts/src/index.ts` (`./internal` is not public) |
| Rust harness (`strands-harness`) | `harness-rs/strands-harness/src/` | public items re-exported by `harness-rs/strands-harness/src/lib.rs` |
| CLI (`@strands-agents/cli`) | `strands-cli/src/` | `strands-cli/src/cli/`; in-chat slash commands in `strands-cli/src/tui/chat/commands.ts` |
| MCP server (`strands-agents-mcp-server`) | `strands-mcp/src/strands_mcp_server/` | its registered MCP tools |

**Not in this repo:** `user-guide/evals-sdk/`, `user-guide/box/`, and `user-guide/shell/` document `strands-agents/evals`, `strands-agents/box`, and `strands-agents/shell`. Shallow-clone the repo into `.context/src/<repo>` or read it with `gh api repos/strands-agents/<repo>/contents/<path>`, and cite `<repo>/<path>:line`. A package name alone never makes a claim `correct`.

For orientation, see the SDK module lists in
`../../references/code-verification.md`. Tests and examples support a behavior
claim but never replace reading the implementation.

## Process

### Step 1: Resolve the page

1. Record `git rev-parse --short HEAD` and the branch.
2. Read the page and its frontmatter (`languages`, `unsupportedLanguages`,
   `experimental`, `sourceLinks`). No `languages` field means the page covers
   Python, TypeScript, and Rust.
3. For each unavailable language, confirm the rendered state hides the page
   body and table of contents instead of exposing another SDK's examples.
4. Resolve every `--8<-- "path:region"` include (paths relative to `site/src/content/docs/`), including its `_imports` sibling, and confirm each region has a matching `[start:]` / `[end:]` pair.

### Step 2: Build the claim inventory

Before verifying anything, list every checkable claim, numbered, with its line (`fm` for frontmatter). Inventory a repeated claim once and list all its lines.

- **Code blocks**, per language tab: imports, calls, argument names and values, attributes read, shown output, install commands and install comments (a `# pip install …` comment claims it installs everything the block needs), and comments that assert something.
- **Prose, tables, callouts:** names, signatures, defaults, numbers, behavior and ordering, error types, which language or provider supports what (all values of every `<Syntax py="…" ts="…" rs="…" />`), env vars, flags, and links.
- **Frontmatter:** each `sourceLinks` path, `languages`,
  `unsupportedLanguages`, `experimental`.

List motivation and opinion sentences as "not claims" so the inventory is visibly complete.

### Step 3: Verify each claim against source

Find the code that decides each claim and record `file:line`.

- **Trace behavior; don't infer it** from names, docstrings, or comments. For numbers, find the constant and where it's used.
- **Check each language separately.** Shared prose must hold in every SDK the page covers.
- **Check it's public** (see the table). An unexported symbol gets the `internal` tag even if the example works.
- **Check lifecycle:** compare deprecation markers and experimental namespaces with the page's frontmatter and wording.
- **Check it's released.** Find the commit that added the export (`git log -S '<symbol>' --oneline -- <index.ts, __init__.py, or lib.rs>`), then the first release with it: `git tag --contains <commit> | grep -E '^<prefix>/v[0-9]' | sort -V | head -1`, where `<prefix>` is `python`, `typescript`, `rust`, `harness-python`, `harness-typescript`, `harness-rust`, `harness-cli`, or `mcp`. If no matching `rust/v*` or `harness-rust/v*` tag contains a Rust API, classify it as `unreleased`. Harnesses depend on the published SDK (ranges in `harness-py/pyproject.toml`, `harness-ts/package.json`, and the Rust release workflow's `strands_version` input), so SDK behavior a harness page relies on must be inside that range.
- **Check `sourceLinks`:** each path exists and implements what the page describes.
- **Check model-visible parity:** prompts, tool names, tool descriptions, and
  policy strings match across SDK examples unless the page explains a
  deliberate semantic difference.

### Step 4: Check the code mechanically

Compile every code block, and run it when you can. Put scratch files under `.context/`, which is not gitignored (Step 7 cleans up).

**TypeScript snippet files** (`--8<--` includes): install in `docs-ci.yml` order, then type-check:

```bash
(cd site && npm ci)
(cd strands-ts && npm install --ignore-scripts && npm run build)
(cd site && npm install)        # re-links the built SDK
(cd site && npm run typecheck:snippets); echo "exit=$?"
```

`tsc: not found` (exit 127) is a setup failure, not a pass. The check covers the whole site, so report only this page's errors; confirm its files were included with `npx tsc -p site/test-snippets --listFiles | grep <page-dir>`.

Then type-check each rendered block on its own (the `_imports` region plus the body region), since lines outside the markers never render. A region that ends before its class or function closes is `incorrect`. If several regions are meant to be read together, also check them combined.

**Rust snippet files:** run the site check, then inspect every rendered block:

```bash
(cd site && npm run typecheck:snippets)
cargo check --manifest-path site/rust-snippets/Cargo.toml --locked --all-targets
```

The Cargo gate compiles each complete sibling source file, not every extracted
region as a standalone crate. Confirm that the rendered block contains its
required `use` declarations and does not rely on setup hidden from the reader.
A passing gate can still hide an undeclared reader dependency because the
site-owned crate contains a superset. Inventory every direct crate and optional
feature used inside the rendered region and confirm the page tells readers to
add it.
A sequence may use a helper or type rendered earlier on the same page, and a
wrapper used only to provide async or fallible compilation context may remain
outside the marker. For a standalone example, copy the rendered region into a
scratch binary under `.context/verify/rust/` with only the dependencies and
features documented on the page, then run `cargo check`. If the PR claims
Clippy coverage, run `cargo clippy -- -D warnings`; otherwise do not claim it.

**Inlined TypeScript** (no CI covers it; the convention break itself is `docs-audit`'s finding): copy each block verbatim into a scratch file.

For SDK blocks, the root `node_modules/@strands-agents/sdk` links to the local `strands-ts` (build it first if `strands-ts/dist/` is missing):

```bash
mkdir -p .context/verify/ts
echo '{ "type": "module" }' > .context/verify/ts/package.json
# write blocks to .context/verify/ts/<n>.ts and this tsconfig.json:
#   { "extends": "../../../strands-ts/tsconfig.base.json",
#     "compilerOptions": { "noEmit": true, "rootDir": ".", "types": ["node"], "noUnusedLocals": false },
#     "include": ["./*.ts"] }
npx tsc -p .context/verify/ts/tsconfig.json
```

For harness blocks, check inside `harness-ts/`, whose `node_modules` has the published SDK. Never check an SDK block there.

```bash
cd harness-ts && npm ci && npm run build
mkdir -p .verify
# write blocks to .verify/<n>.ts and this tsconfig.json:
#   { "extends": "../tsconfig.base.json",
#     "compilerOptions": { "noEmit": true, "noUnusedLocals": false },
#     "include": ["./*.ts"] }
npx tsc -p .verify/tsconfig.json
```

**Python** (no CI covers it):

```bash
uv venv --clear .context/verify-venv
uv pip install --python .context/verify-venv/bin/python -e ./strands-py   # harness pages: -e ./harness-py instead
mkdir -p .context/verify   # write blocks to .context/verify/<n>.py
cd .context/verify && ../verify-venv/bin/python <n>.py
```

Install only the documented package and what the page's install line names. If a block works only after you add an extra the page doesn't mention, the install line is `incorrect` with `high` impact. Run from inside `.context/`, because agents can create session or memory directories in the working directory.

**How far to run:**

- Run each block up to its first model call. Construction needs no credentials and catches wrong imports, parameters, and types. Use `inspect.signature(...)` for keywords the block doesn't exercise.
- Run a full invocation only if it needs no credentials or credentials are clearly configured.
- Stand in for external systems (a CLI binary, a VM) with a stub on `PATH`, and say so in the evidence.
- Probe for hangs with in-language timeouts; macOS has no `timeout` command.

**Shell commands:** check flags against the CLI source or `--help`, and package names against `pyproject.toml` / `package.json`. Don't install globally, deploy, or call paid services.

### Step 5: Check links

- **Internal links and anchors:** the target page or heading exists and covers what the sentence promises. The build only catches dead links.
- **API reference links:** they point at a real public symbol. Run `npm run sdk:generate` in `site/` first. Python and TypeScript references symlink into the gitignored `site/.build`; Rustdoc is generated under `site/public/docs/api/rust/reference/`. Use `@api/rust/<rustdoc-path>` for Rust and confirm the generated page and anchor exist.
- **GitHub links:** they point at a path that exists on `main`.

### Step 6: Assess each claim

Keep these fields separate; a claim can be correct and still fragile.

**Accuracy** (one per claim):

| Value | Meaning | Evidence |
|-------|---------|----------|
| `correct` | True as written | `file:line` |
| `incorrect` | Page says X, code says Y | `file:line` for Y, plus a fix |
| `incomplete` | True only under an unstated condition, or for only some of the cases it generalizes to | `file:line` of the condition, plus the qualifier to add |
| `unverifiable` | No source settles it | Why, and what would settle it |

Never round `unverifiable` up to `correct`.

**Impact** (claims that aren't `correct`): `high` means copied code fails or the reader acts on wrong behavior. `medium` means misleading, but the reader recovers. `low` means hygiene only, with no reader misled.

**Checked by** (the strongest check you actually ran): `read`, `compiled`, or `executed` (at least through construction). Never report `executed` for code you only compiled.

**Risk tags** (zero or more, including on `correct` claims):

- `deprecated`: deprecated in source
- `internal`: not public
- `unreleased`: not in a published release, or outside a harness's SDK range
- `one-language`: holds in one SDK, but the page implies both
- `accidental`: works, but not for the reason the page implies
- `experimental`: experimental in source, but the page doesn't say so

### Step 7: Clean up

```bash
rm -rf .context/verify .context/verify-venv .context/src harness-ts/.verify
git status --short   # nothing new except .context/docs-verifier/
```

## Output Format

```markdown
## Docs Verification: [Page Title]

**File:** site/src/content/docs/[path]
**Verified against:** [short SHA] on [branch]
**Result:** [N] claims, [n] findings: [n] high · [n] medium · [n] low · [n] unverifiable · [n] risk-tagged

### Findings

| # | Line | Claim | Accuracy | Impact | Tags | Checked by | Evidence | Suggested fix |
|---|------|-------|----------|--------|------|------------|----------|---------------|
| 8 | 13 | `web_search` is on by default | incorrect | high | | executed | harness-py/src/strands_harness/agent.py:121-139 turns it off when the model has no native search | "`web_search` turns on only where the provider has native search" |

[Every claim that isn't `correct`, plus every risk-tagged claim, sorted high → medium → low → unverifiable → risk-tagged. "None" if empty.]

### Full Claim Inventory

| # | Line | Claim | Accuracy | Checked by | Evidence |
|---|------|-------|----------|------------|----------|
| 14 | 20-21 | Fetched content is cached for 15 minutes | correct | read | harness-py/src/strands_harness/tools/web_fetch.py:37 (`15 * 60`) |

Not claims: [lines]

### Commands Run

| Command | Result |
|---------|--------|
| `npm run typecheck:snippets` | exit 0 |
| `cd .context/verify && ../verify-venv/bin/python 3.py` (construction only) | pass |
```

Include the full inventory even with no findings, so a reviewer can audit the run. For several pages, write one report per page plus a summary table of finding counts. Save each report to `.context/docs-verifier/<page-slug>.md` and return it in your reply.

## Out of scope

- Voice, style, structure, and terminology (`docs-reviewer`, `docs-audit`).
- Editing source. After the report, offer docs-only fixes, highest impact first, and apply them only if the user agrees.
- Commits, pushes, and PRs.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.