No slash command · from doc-detective
Bootstraps Doc Detective in a repository: detects documentation files, generates minimal config, creates tests for procedures, and iteratively runs/fixes them. Supports interactive and CI modes.
Ships in doc-detective. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Bootstrap Doc Detective in a repository: detect docs, generate minimal config, create tests, run them, fix failures, and inject passing tests into source files.
Use when the user wants to set up Doc Detective, mentions "init", "bootstrap", or "get started with Doc Detective", or asks to create initial test coverage for documentation.
| Option | Default | Description |
|---|---|---|
--ci | false | No prompts; use sensible defaults |
--dry-run | false | Print planned changes without applying |
--fix-threshold <0-100> | 80 | Ask user when fix confidence is below this value |
--auto-fix | false | Apply all fixes regardless of confidence |
--skip-inject | false | Skip Phase 6 injection |
--inject-all | false | Inject without per-file confirmation |
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 | Search 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:
--dry-run)--skip-inject or --ci without --inject-all)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.
If no config exists, create silently with minimal defaults. If a config exists: read it, merge new fields, show a diff, and prompt the user to confirm. If the user rejects the merge, stop and report — do not proceed.
{ "input": ["docs/**/*.md"], "outputDir": ".doc-detective/results" }
For each procedure-heavy file identified in Phase 1:
doc-testing skill to generate a test spec: use the file as input, and write output to doc-detective-tests/<name>-spec.json. <name> is the source filename, lowercased, with non-alphanumeric characters replaced by hyphens. Keep specs out of .doc-detective/: it holds run output, and projects add it to .gitignore._sourceFile field) to support Phase 6 injection.Run all generated specs (try global CLI, then Docker, then npx — same fallback chain as the doc-testing skill):
doc-detective --input doc-detective-tests/ --output-dir .doc-detective/results/ --output .doc-detective/results/results.json
If no runner is available, stop and inform the user. Exit 1 means at least one test failed. That's a normal outcome, not a crash. Collect the failing tests from .doc-detective/results/results.json and continue to Phase 5. A config with exitOnFail: false exits 0 even when tests fail, so read the results file after exit 0 too. Exit 2 means nothing valid was tested or the CLI couldn't proceed, so stop and report the error from stderr.
Skip this phase if no tests failed. For each failing test, repeat up to 3 times:
specs[].tests[].contexts[].steps[] whose result is FAIL, and read each one's resultDescription.Report all "needs manual review" tests before completing.
Skip this phase if --skip-inject is set, or if --ci is set without --inject-all.
For each source file with passing tests:
inline-test-injection skill (no --apply flag).--apply mode.The injection tool selects the correct comment format automatically.
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 bootstrap was called with --ci.--exit-on-fail: it's deprecated, because failing the check is now the default.--no-exit-on-fail only if they say no.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
doc-detective, documentation-testing, test-bootstrap, ci-setup
npx claudepluginhub doc-detective/agent-tools --plugin doc-detective9 skills in this plugin
/doc-detective-doc-testingVerify documentation and procedures with Doc Detective test specifications. MANDATORY: Read SKILL.md first. Format: {"goTo":"url"} {"find":"text"} {"click":"text"} - action IS the key. NEVER {"action":"goTo"}. Keywords: test spec, Doc Detective, test JSON, test documentation, test docs, test procedure, verify procedures./doc-detective-generateInterpret documentation procedures into Doc Detective test specifications without executing/doc-detective-initInitialize Doc Detective in a repository with documentation detection, config generation, test creation, and iterative fix loopOther plugins' skills for the same job