Skip to content
Agentmart
Submit a tool

tdd

Test Driven Development discipline for this workspace.

Skill by cedricziel

IndexedMIT★ 6
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/cedricziel-tdd

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Test Driven Development discipline for this workspace. Use whenever writing new features, fixing bugs, or refactoring — the test must be written and confirmed failing before any implementation code is added.

Use cases: testing, writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/tdd

What's inside

Skill name
tdd
Description
Test Driven Development discipline for this workspace. Use whenever writing new features, fixing bugs, or refactoring — the test must be written and confirmed failing before any implementation code is added.
License
MIT
Instructions
55 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

## Principle

**Always start with a failing test.** No implementation code may be written until a test
that exercises the desired behaviour exists and is confirmed to fail for the right reason.

## The TDD Cycle

1. **Red** — Write the smallest test that captures the requirement. Run it; confirm it fails
   (and fails for the expected reason, not a compile error or unrelated panic).
2. **Green** — Write the minimum production code required to make the test pass. Resist the
   urge to add more than needed.
3. **Refactor** — Clean up both test and production code. Re-run the test suite after every
   change to stay green.

Repeat the cycle for each new behaviour.

## Rules

1. **Test first, always.** If you are about to write a function, struct, or module, write the
   test file (or test module) first.
2. **Confirm red before green.** Run `make test` (or the narrower `cargo test -p <crate>
<test_name>`) and verify the new test fails before writing implementation.
3. **One failing test at a time.** Do not write multiple new tests before making the first
   one pass. Keep the red/green cycle tight.
4. **Minimal implementation.** In the Green step, write only enough code to pass the current
   failing test — nothing more.
5. **Refactor under green.** Only refactor when all tests are passing. Never refactor and add
   features simultaneously.
6. **Tests are first-class code.** Apply the same naming, clarity, and style standards to
   test code as to production code.

## Rust-Specific Guidance

- Unit tests live in `#[cfg(test)] mod tests { ... }` at the bottom of the file under test.
- Use `#[tokio::test]` for async tests.
- Use `StorageLayer::new_in_memory()` for test databases — no disk I/O, fully migrated.
- Use `wiremock` for HTTP mocking (provider API responses).
- Integration tests live in `crates/integration-tests/` and require a running environment;
  run with `make test-integration`.
- For a new builtin tool, write the unit test in the handler file _before_ implementing
  `ToolHandler::run()`.

## Workflow

When picking up a task:

1. Identify the smallest observable behaviour to implement next.
2. Write a test for that behaviour in the appropriate `#[cfg(test)] mod tests` block.
3. Run `cargo test -p <crate> <test_name> -- --nocapture` and confirm it is **red**.
4. Implement only what is needed to turn it **green**.
5. Run `make test` to ensure no regressions.
6. Refactor if needed; stay green throughout.
7. Commit (using a semantic commit message) and move to the next behaviour.

From cedricziel/assistant, MIT.

More from cedricziel/assistant

Signals

Stars
6
Forks
1
Open issues
14
Last commit (this folder)
Apr 9, 2026 (6 months ago)
Last release
May 26, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from cedricziel

Cite this page

tdd skill. Agent Mart. https://agentmart.dev/skills/cedricziel-tdd (last updated 2026-10-24)