Agent tools for testing documentation procedures and validating that documented workflows match actual application behavior. Compatible with Claude Code, Cursor, Codex, OpenCode, GitHub Copilot, and other AI coding assistants 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.
-
Open Claude Code:
claude
-
Add the Doc Detective plugin to Claude Code's plugin marketplace:
/plugin marketplace add doc-detective/agent-tools -
Then install specific skill sets via:
/plugin install doc-detective@doc-detective -
Ask Claude about Doc Detective, or use the
initcommand to get started:/doc-detective:init
Warning
npx skills only installs skills, not agents, commands, or other tools. For full functionality, consider manual installation.
Install these skills with the skills package from Vercel. This works with Claude Code, Cursor, Codex, OpenCode, and other AI coding tools.
npx skills add doc-detective/agent-toolsFollow the prompts. The CLI auto-detects which AI tools you have installed and places the skills in the appropriate directories.
git clone https://github.com/doc-detective/agent-tools.git
cp agent-tools/agents .{agent-dir}/agents # Agents
cp agent-tools/commands .{agent-dir}/commands # Commands
cp agent-tools/skills .{agent-dir}/skills # SkillsImportant
Adjust the path based on your agent's expected skill/plugin directory. For example, .github/ for GitHub Copilot, .cursor/ for Cursor, etc.
git clone https://github.com/doc-detective/agent-tools.git
claude --plugin-dir ./agent-tools/doc-detective:initInitializes Doc Detective in your repository by:
- Detecting documentation files
- Generating a minimal configuration
- Creating tests for identified procedures
- Running tests
- Iteratively fixing failures with confidence-based suggestions
/doc-detective:generate path/to/documentation.mdIdentify testable procedures and convert them into Doc Detective test specifications.
/doc-detective:test path/to/documentation.mdRuns tests from docs or test specification files:
- Extracts step-by-step procedures from your documentation.
- Converts them to Doc Detective test specifications.
- Validates the test specs.
- Executes tests using Doc Detective.
- Reports results with any failures mapped back to documentation sections.
/doc-detective:validate test-spec.jsonValidates structure before execution:
- Required fields present
- Action types recognized
- Parameter types correct
/doc-detective:inject tests/spec.yaml docs/procedure.md --applyTakes a well-formed test specification and injects test steps as inline comments into the associated documentation content so you don't have to maintain separate files.
The plugin includes complete documentation for Doc Detective actions:
| Action | Purpose |
|---|---|
goTo |
Navigate to a URL |
click |
Click an element (prefer text-based) |
find |
Verify an element exists |
type |
Type text input |
httpRequest |
Make HTTP requests |
runShell |
Execute shell commands |
screenshot |
Capture screenshots |
wait |
Pause or wait for elements |
checkLink |
Verify URL returns OK |
loadVariables |
Load environment variables |
saveCookie/loadCookie |
Manage session persistence |
record/stopRecord |
Video recording |
See skills/doc-testing/references/actions.md for detailed documentation.
Inject test steps from separate spec files directly into documentation as inline comments:
/doc-detective:inject tests/login.yaml docs/login.md --applyBefore:
1. Go to [Login Page](https://example.com/login).
2. Click **Sign In**.After:
1. Go to [Login Page](https://example.com/login).
<!-- step {"goTo":"https://example.com/login"} -->
2. Click **Sign In**.
<!-- step {"click":"Sign In"} -->Steps are matched to content using semantic patterns (links, bold text, action verbs) and placed close to their associated documentation.
Documentation:
# Login Procedure
1. Navigate to https://example.com/login
2. Enter your username
3. Enter your password
4. Click "Sign In"
5. Verify you see the DashboardUse the skill:
/doc-detective:test path/to/file.md this login procedure from our docs to make sure it still works
Create a test specification file workflows.json:
{
"tests": [
{
"testId": "signup-flow",
"description": "New user signup",
"steps": [
{ "goTo": "https://example.com/signup" },
{ "find": "Create Account" },
{ "type": { "keys": "newuser@example.com", "selector": "#email" } },
{ "click": "Sign Up" },
{ "find": "Welcome" }
]
},
{
"testId": "password-reset",
"description": "Forgot password flow",
"steps": [
{ "goTo": "https://example.com/login" },
{ "click": "Forgot Password" },
{ "type": { "keys": "user@example.com", "selector": "#email" } },
{ "click": "Reset" },
{ "find": "Check your email" }
]
}
]
}Then execute:
/doc-detective:test workflows.json
AGPL3
To contribute improvements to this plugin, submit issues or pull requests to the repository.