Skip to main content

dochia init-skills

Generate Agent Skills files for agentic IDE integration. Skills are placed in .agents/skills/ following the open Agent Skills specification, which is supported by Windsurf, Cursor, Claude Code, and OpenAI Codex.

Usage

dochia init-skills [options]

Options

OptionDescription
-d, --dir <path>Target directory to generate skills in. Defaults to the current directory
-f, --forceOverwrite existing files if they already exist

What It Generates

The command creates a .agents/skills/ directory containing skill definitions for every Dochia command:

.agents/skills/
├── dochia-test/
│ ├── SKILL.md
│ └── references/
│ └── report-output.md
├── dochia-fuzz/
│ └── SKILL.md
├── dochia-replay/
│ └── SKILL.md
├── dochia-list/
│ └── SKILL.md
└── dochia-explain/
└── SKILL.md

Each SKILL.md file contains:

  • Description — what the command does and when to use it
  • Trigger phrases — natural-language prompts the AI agent should match on
  • Usage examples — common command patterns the agent can suggest
  • Options reference — flags and arguments
  • Report analysis recipesjq examples for parsing results programmatically (for dochia-test)

Examples

# Initialize agent skills in the current directory
dochia init-skills

# Initialize in a specific project directory
dochia init-skills --dir /path/to/project

# Force overwrite existing files
dochia init-skills --force

Example Output

ℹ Generating Dochia agent skills in /Users/dev/my-api-project
Created .agents/skills/dochia-test/SKILL.md
Created .agents/skills/dochia-test/references/report-output.md
Created .agents/skills/dochia-fuzz/SKILL.md
Created .agents/skills/dochia-replay/SKILL.md
Created .agents/skills/dochia-list/SKILL.md
Created .agents/skills/dochia-explain/SKILL.md

ℹ Done! 6 files created, 0 skipped (already exist).

ℹ Generated files:
.agents/skills/dochia-test/SKILL.md
.agents/skills/dochia-fuzz/SKILL.md
.agents/skills/dochia-replay/SKILL.md
.agents/skills/dochia-list/SKILL.md
.agents/skills/dochia-explain/SKILL.md

ℹ These files are automatically discovered by:
- Windsurf (Cascade)
- Cursor
- Claude Code
- OpenAI Codex

ℹ Commit them to your repository so your team benefits too.

How Agents Use the Skills

Once the skills are committed to your repository, agentic IDEs automatically discover them and gain context-aware knowledge of Dochia. This means your AI coding assistant can:

  • Suggest the right command when you describe a testing goal in natural language (e.g. "test my API for security issues" → dochia test ... --profile security)
  • Construct complete commands with the correct flags, authentication, and filtering options
  • Parse and explain results by reading report JSON files and using the included jq recipes
  • Replay failures by extracting test IDs from reports and running dochia replay
  • Explain error codes by calling dochia explain with the right type and value

Supported IDEs

The generated skills follow the agentskills.io open specification, which is supported by:

IDE / AgentDiscovery
Windsurf (Cascade)Automatic — reads .agents/skills/
CursorAutomatic — reads .agents/skills/
Claude CodeAutomatic — reads .agents/skills/
OpenAI CodexAutomatic — reads .agents/skills/

Best Practices

  • Commit the skills to version control — every team member and CI agent benefits automatically
  • Re-run after upgrading Dochia — new versions may ship updated skill definitions with new commands or flags. Use --force to refresh:
    dochia init-skills --force
  • Don't edit the generated files — they are overwritten on --force. If you need custom skills, add separate files alongside them

Exit Codes

CodeDescription
0Successful execution
1Internal execution error
2Usage error (invalid arguments)

See Also