Help us improve
Share bugs, ideas, or general feedback.
From doc-detective
Initializes Doc Detective in a repo: detects Markdown/MDX/etc. docs, generates config/tests, executes tests, iteratively fixes failures. CI mode supported.
npx claudepluginhub doc-detective/agent-tools --plugin doc-detectiveHow this skill is triggered — by the user, by Claude, or both
Slash command
/doc-detective:doc-detective-initThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Skill:** `doc-detective:init`
Bootstraps Doc Detective in repos by detecting documentation files, generating minimal config and tests for procedures, iteratively running/fixing them, and injecting passing tests into source files. Use for initial setup, init/bootstrap requests, or onboarding to doc testing.
Orchestrates 4 documentation skills into a sequential pipeline that detects drift, applies fixes, audits coverage, and fills gaps to produce a documentation health report.
Audits codebase documentation for accuracy, completeness, and freshness by comparing against code structure. Auto-fixes small discrepancies in fix mode, reports structural changes. Works with any language/framework.
Share bugs, ideas, or general feedback.
Skill: doc-detective:init
Bootstrap Doc Detective in a repository: detect docs, generate config, create tests, run them, and fix failures. Do NOT use Playwright — use Doc Detective for all documentation testing.
/doc-detective-init [options]
| Option | Default | Description |
|---|---|---|
--ci | false | Non-interactive; use defaults, no prompts |
--auto-fix | false | Apply all fixes regardless of confidence |
--fix-threshold <0-100> | 80 | Confidence threshold for auto-applying fixes |
--dry-run | false | Show planned changes without applying |
--skip-tests | false | Generate config and tests but do not execute |
--skip-fix-loop | false | Run tests but skip iterative fixing |
/doc-detective-init
/doc-detective-init --ci
/doc-detective-init --dry-run
Confirm all of the following before starting. If any item is unavailable or non-discoverable, stop and ask the user to provide it.
| Criteria | How to find it |
|---|---|
| Repository root is accessible | Check working directory — ask user if unclear |
| Documentation files exist | Glob for **/*.md, **/*.mdx, **/*.adoc, **/*.rst, **/*.html, **/*.dita — ask user if none found |
| Existing config (if present) is readable | Check for .doc-detective.json / doc-detective.config.js — ask user if file exists but can't be parsed |
Before completing:
--skip-tests or --dry-run)--skip-fix-loop)Phases run in order. Do NOT advance to the next phase if the current phase fails.
**/*.md, **/*.mdx, **/*.adoc, **/*.rst, **/*.html, **/*.dita.doc-detective.json, doc-detective.config.jsGenerate .doc-detective.json following the "smallest reasonable config" principle.
| Scenario | Action |
|---|---|
| No existing config | Create with minimal defaults (see below) |
| Existing config | Read, merge new fields, prompt user to confirm (skip prompt if --ci) |
--ci + existing config | Use existing config unchanged |
{ "input": "docs", "output": ".doc-detective/results", "detectSteps": false }
If --dry-run, print the config that would be written and skip file creation. If config cannot be created or the user rejects the merge, stop and report — do not proceed. See skills/doc-detective-project-bootstrap/references/config-guidance.md for full options.
For each procedure-containing file identified in Phase 1:
/doc-detective-generate <file-path> --output .doc-detective/doc-detective-tests/<name>-spec.json, where <name> is the source filename lowercased with non-alphanumeric characters replaced by hyphens (e.g., login-guide.md → login-guide).--dry-run, print each spec without writing to disk.Run all generated specs:
doc-detective --input .doc-detective/doc-detective-tests/ --output .doc-detective/results/
Skip this phase if --skip-tests or --dry-run is set. If the command fails to execute, stop and report the error — do not proceed to Phase 5. After execution, collect all failing tests from the results output.
Skip this phase if --skip-fix-loop is set.
For each failing test, repeat up to 3 times:
resultDescription to identify the failure.| Confidence | Action |
|---|---|
| ≥ threshold (default 80%) | Apply automatically |
| < threshold | Show proposed fix, ask user: apply / skip / edit manually |
| < 50% | Always ask user regardless of threshold |
Report all "needs manual review" tests to the user before completing.
Condition: Only run if the project is an initialized GitHub repository (.git exists as a file or directory, and a remote URL references github.com). Skip this phase silently otherwise.
--ci mode, ask the user if they want to set up the Doc Detective GitHub Action for CI. If the user declines, skip this phase.--ci mode, default to yes — proceed without prompting./doc-detective-install-github-action with matching flags:
--ci if init was called with --ci.--exit-on-fail:
--ci mode, pass --exit-on-fail by default./doc-detective-test — Run existing tests without re-bootstrapping/doc-detective-generate — Generate tests for a single file/doc-detective-validate — Validate an existing test spec/doc-detective-install-github-action — Install the Doc Detective GitHub Action workflow