test-driven-development
Unified TDD skill with three input modes — from spec, from task, or from description. Enforces test-first development using repository patterns, with proptest guidance and backpressure integration.
Why use this skill?
Automate your Red-Green-Refactor cycle with the OpenClaw TDD skill. Safely generate unit tests from specs, tasks, or descriptions to enforce high code quality.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/paulpete/test-driven-developmentWhat This Skill Does
The test-driven-development skill is an authoritative automation agent designed to enforce professional software craftsmanship. It serves as a unified interface for implementing features using the proven Red-Green-Refactor cycle. By abstracting the complexities of test file generation, environment discovery, and pattern matching, it allows engineers to focus on logic rather than boilerplate. The skill natively supports three input modes—Spec files, Task files, or natural language descriptions—ensuring that every contribution is verified by a failing test before a single line of production code is written.
Installation
To integrate this skill into your local environment, execute the following command via the OpenClaw terminal:
clawhub install openclaw/skills/skills/paulpete/test-driven-development
Ensure that you have cargo and the relevant project dependencies configured in your root directory, as the skill leverages internal rg and cargo commands to scan your codebase and execute test runners.
Use Cases
- Feature Implementation: Use when moving from an accepted Gherkin-style spec file to a verified implementation.
- Refactoring & Legacy Maintenance: Apply strict TDD cycles when modifying existing modules to ensure that side effects are caught immediately.
- Bug Reproduction: Create a failing test case that mirrors a reported issue before applying the fix.
- API Development: Define contract requirements in a task file and let the skill generate the framework for endpoint testing.
Example Prompts
- "Apply test-driven-development using the requirements in ./docs/specs/user-auth.spec.md to implement the login logic."
- "Use test-driven-development for the current task file .code-task.md; focus on edge cases for input validation."
- "I need to implement a new
CalculateTotalfunction. Use test-driven-development to define unit tests first based on these requirements: input must be a list of integers, output the sum, handle empty lists as zero."
Tips & Limitations
- Pattern Awareness: The skill is highly effective when you have existing test infrastructure. It will automatically scan your
crates/*/tests/directories to adopt your project's naming conventions and helper utilities. - Proptest Caution: Only utilize the provided Proptest guidance for pure functions. For I/O heavy logic or stateful systems, stick to standard unit testing to avoid flaky results.
- Red-Green-Refactor Discipline: The agent is designed to force the RED phase. If your tests pass without implementation, the agent will flag the test as insufficient. Do not skip phases; this ensures the integrity of your codebase.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-paulpete-test-driven-development": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution
Related Skills
create-hat-collection
Generates new Ralph hat collection presets through guided conversation. Asks clarifying questions, validates against schema constraints, and outputs production-ready YAML files.
playwriter
Browser automation via Playwriter (remorses) using persistent Chrome sessions and the full Playwright Page API.
code-task-generator
Generates structured .code-task.md files from descriptions or PDD implementation plans. Auto-detects input type, creates properly formatted tasks with Given-When-Then acceptance criteria.
release-bump
Use when bumping ralph-orchestrator version for a new release, after fixes are committed and ready to publish
tmux-terminal
Interactive terminal control via tmux for TUI apps, prompts, and long-running CLI workflows.