/testgen
Generate tests for a file or module using coverage analysis and TDD patterns
> /plugin marketplace add ruvnet/rufloHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/testgen
Context preview
What this command does when you run it.
Generate tests for a file or module using coverage analysis and TDD patterns
Command definition
testgen.mdname: testgen description: Generate tests for a file or module using coverage analysis and TDD patterns
$ARGUMENTS
Generate tests by analyzing coverage gaps and applying TDD London School patterns.
1. **Analyze gaps**: `npx @claude-flow/cli@latest hooks coverage-gaps --format table` 2. **Route for coverage**: `npx @claude-flow/cli@latest hooks coverage-route --task "$ARGUMENTS"` 3. **Suggest tests**: `npx @claude-flow/cli@latest hooks coverage-suggest --path "$ARGUMENTS"`
Parse $ARGUMENTS as a file path or module name. Generate tests following these conventions:
- Place tests adjacent to source: `src/foo.ts` -> `src/foo.test.ts`
- Use `describe`/`it` blocks with descriptive names
- Mock external dependencies
- Cover happy path, edge cases, and error paths
If no arguments, run coverage-gaps to show what needs tests.
An agent meta-harness for Claude Code and Codex. Agent = Model + Harness. The model writes; the harness gives it tools, memory, loops, sandboxes, and controls so it can actually work.
Repo: ruvnet/ruflo
Other commands on claude-flow.
- /agent-capabilities
Matrix of agent capabilities and their specializations.
Open command - /agent-coordination
Coordination patterns for multi-agent collaboration.
Open command - /agent-spawning
Guide to spawning agents with Claude Code's Task tool.
Open command - /agent-types
Complete guide to all 54 available agent types in Claude Flow.
Open command - /COMMAND_COMPLIANCE_REPORT
Reviewed all command files in `.claude/commands/analysis/` directory to ensure proper usage of: - `mcp__claude-flow__*` tools (preferred) - `npx claude-flow` commands (as fallback) - No direct implementation calls
Open command - /bottleneck-detect
Analyze performance bottlenecks in swarm operations and suggest optimizations.
Open command

