Skip to navigation

Agent tools overview

Agent tools let you set up Doc Detective tests using natural language. Instead of writing test specifications by hand, you describe what you want to test and your AI coding assistant generates the tests for you.

What are agent tools?

Agent tools are plugins, extensions, and skills that integrate Doc Detective with AI coding assistants. They let you:

  • Bootstrap projects: Detect documentation files, generate configuration, and create initial tests
  • Generate tests: Convert documentation procedures into executable test specifications

Compatibility

Doc Detective agent tools work with any AI coding assistant that supports Agent Skills, including:

If your assistant supports skills, extensions, or plugins, you can likely use Doc Detective agent tools with it.

Quick install

The fastest way to install the agent tools is the Doc Detective CLI:

npx doc-detective install agents

It detects every supported agent 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.

The older doc-detective install-agents form still works as a hidden alias, so existing scripts and CI jobs don’t need to change.

To target a specific agent non-interactively:

npx doc-detective install agents --agent claude --scope project --yes

Supported --agent ids: claude, copilot, gemini, codex, qwen, opencode.

Head to the per-agent guide below if you prefer the native install flow or need to troubleshoot.

Automatic detection during installation

When you run npm install doc-detective, the postinstall script detects supported AI coding assistants on your machine. If it finds 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)

Press y to launch install-agents with those agents pre-selected. You still choose whether to install project-wide or globally. Press n or Enter to skip. You can always run npx doc-detective install-agents later.

The prompt only appears when:

  • You’re running in an interactive terminal (stdin and stdout are TTYs)
  • The CI environment variable isn’t set
  • Doc Detective finds at least one supported agent without tools installed

To skip the prompt in scripts or automation, set either environment variable:

CI=true npm install doc-detective
DOC_DETECTIVE_SKIP_AGENT_PROMPT=1 npm install doc-detective

Quick start

Once installed, you can bootstrap Doc Detective in your project.

Using a slash command:

/doc-detective-init

Or describe what you want in plain language:

Set up Doc Detective in this project. Scan for documentation files, create a config, and generate tests for any procedures you find.

The bootstrapping process:

  1. Detects documentation files in your repository
  2. Generates a minimal configuration file
  3. Creates test specifications for identified procedures
  4. Runs the tests
  5. Iteratively fixes failures with confidence-based suggestions

Learn more