Doc Detective Agent Tools
Agent tools for testing documentation procedures and validating that documented workflows match actual application behavior. Compatible with Gemini CLI, Claude Code, Cursor, Codex, OpenCode, GitHub Copilot, and other AI coding agents that support plugins, skills, or commands.
- Set up Doc Detective for a project. Initialize Doc Detective in a project with automatic documentation detection, config generation, and test creation.
- Generate tests. Convert documentation into executable test specifications.
- Run tests. Execute tests against your application and report results.
- Inject tests into your docs content. Embed test steps close to associated documentation content.
- Install the Doc Detective GitHub Action. Add a Doc Detective GitHub Actions workflow for automated documentation testing in CI.
Installation
Quick install
The fastest way to install the agent tools is the Doc Detective CLI:
npx doc-detective@5 install agents
It detects which supported agents are installed on your machine, prompts you to choose which to configure, and invokes each agent's native install mechanism. Re-run any time to update to the latest version.
To target a specific agent non-interactively:
npx doc-detective@5 install agents --agent claude --scope project --yes
Supported --agent ids: claude, copilot, gemini, codex, qwen, opencode. To target several agents in one run, give --agent once with a comma-separated list, such as --agent claude,codex. Cursor isn't one of them; see Cursor.
Useful flags:
--scope project or --scope global: skip the scope prompt.
--yes: run without prompts. Requires --agent and --scope.
--force: reinstall even if already up to date.
--dry-run: print the actions that would be taken without executing them.
Head to the per-agent sections below if you prefer the native install flow or need to troubleshoot.
Note: install agents is one subcommand in the Doc Detective CLI's broader install group. Other subcommands (install runtime, install browsers, install status, install all) manage the CLI's lazy-loaded runtime dependencies. See the install command reference for details.
Doc Detective version compatibility
Each agent tools major version works with one Doc Detective major version:
- Agent tools 2.x, on the
main branch and the v2 tag, work with Doc Detective 5. Their GitHub Action workflows use doc-detective/github-action@v2.
- Agent tools 1.x, on the
v1 tag, work with Doc Detective 4. Agent tools 2.x write specs and commands that Doc Detective 4 rejects or misreads.
To check your Doc Detective version, run npx doc-detective --version.
npx doc-detective install agents installs the agent tools that match your CLI, so it needs no extra step. The native install commands in the per-agent sections below install from main, which suits Doc Detective 5. For Doc Detective 4, add the v1 ref to the command you use:
| Install method | Command for Doc Detective 4 |
|---|
| Claude Code or Copilot CLI | /plugin marketplace add doc-detective/agent-tools#v1 |
| Gemini CLI | gemini extensions install https://github.com/doc-detective/agent-tools.git --ref v1 |
npx skills | npx skills add doc-detective/agent-tools#v1 |
| A step that clones the repository, as for Codex, Cursor, and manual installation | git clone --branch v1 https://github.com/doc-detective/agent-tools.git |
Automatic prompt during npm install
When you run npm install doc-detective in an interactive terminal, the CLI checks for supported coding agents. If it detects agents without doc-detective tools installed, you see a prompt:
Detected coding agents that may be missing doc-detective tools: Claude Code, Gemini CLI.
? Install doc-detective agent tools now? (y/N)
Answer y to launch install agents with the detected agents pre-selected, then choose the install scope (global or project). Answer n to skip, and the CLI prints a reminder to run npx doc-detective install agents later.
The prompt is skipped when:
CI environment variable is set
DOC_DETECTIVE_SKIP_AGENT_PROMPT environment variable is set
- stdin or stdout is not a TTY (piped installs, redirected output, non-interactive shells)
To disable the prompt permanently, add DOC_DETECTIVE_SKIP_AGENT_PROMPT=1 to your shell profile.
Claude Code
npx doc-detective@5 install agents --agent claude
The command auto-detects Claude Code and invokes its native plugin management. Without --scope, it first asks whether to install for the project or user-global. Re-run any time to update.