feature-tdd-implementation

feature-tdd-implementation is a command for Claude Code from ThibautBaissac/rails_ai_agents. It costs 51 tokens per session (676 once invoked), scanned A, original, MIT.

A Test-Driven Development workflow, where you write a failing test, make it pass with the smallest change, and then improve the code. TDD is a way to build software by using tests to define behavior first.

In plain words
What is it for?
Use it to choose the right RSpec test, verify that it fails, implement the behavior, and keep the tests passing during cleanup.
Why use it?
It makes the intended behavior explicit and helps catch regressions while the feature is being implemented.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to choose the right RSpec test, verify that it fails, implement the behavior, and keep the tests passing during cleanup.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/thibautbaissac/rails_ai_agents/feature-tdd-implementation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for feature-tdd-implementation

README.md
[![agentmods](https://agentmods.dev/badge/commands/thibautbaissac/rails_ai_agents/feature-tdd-implementation.svg)](https://agentmods.dev/commands/thibautbaissac/rails_ai_agents/feature-tdd-implementation)
Your own site
<a href="https://agentmods.dev/commands/thibautbaissac/rails_ai_agents/feature-tdd-implementation"><img src="https://agentmods.dev/badge/commands/thibautbaissac/rails_ai_agents/feature-tdd-implementation.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 676 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.00676
Opus 5 $0.00026 $0.00338
Sonnet 5 $0.00010 $0.00135
Haiku 4.5 $0.00005 $0.00068

Measured 8d ago against content hash 33cb9ce440f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

feature-tdd-implementation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/feature-tdd-implementation.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TDD Cycle Skill

Overview

Guides the Red-Green-Refactor TDD cycle: write a failing test describing desired behavior, implement the minimum code to pass it, then improve the code while keeping tests green. See references/testing-patterns.md for code examples, common patterns, and anti-patterns.

Test Type Selection

Test Type Use For Location
Model spec Validations, scopes, instance methods spec/models/
Request spec API endpoints, HTTP responses spec/requests/
System spec Full user flows with JavaScript spec/system/
Service spec Business logic, complex operations spec/services/
Job spec Background job behavior spec/jobs/

Workflow Steps

  1. Choose Test Type -- Pick the appropriate spec type from the table above based on what you are testing.
  2. Write Failing Spec (RED) -- Write a spec that describes the desired behavior. Follow the structure template in the references file.
  3. Verify Failure -- Run bundle exec rspec path/to/spec.rb --format documentation. The spec must fail with a clear message. If it passes immediately, either the behavior already exists or the spec is wrong.
  4. Implement Minimal Code (GREEN) -- Write the minimum code to make the spec pass. No optimization, no extra edge-case handling, no refactoring yet.
  5. Verify Pass -- Run the spec again. It must pass. If it fails, read the error, fix the implementation (not the spec unless it was wrong), and re-run.
  6. Refactor -- Improve the code one change at a time: extract methods, improve naming, remove duplication, simplify logic. Run specs after each change. Undo if specs fail.
  7. Final Verification -- Run all related specs. All must pass. If any fail, undo recent changes and try a different approach.

Good Spec Characteristics

  • One behavior per example: each it block tests one thing
  • Clear description: reads like a sentence with describe/context
  • Minimal setup: only create data needed for the specific test
  • Fast execution: prefer build over create, mock external services
  • Independent: tests do not depend on order or shared state

Read the full file on GitHub · 59 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 59 lines · 51 tokens per session scan A 33cb9ce440f8

Subscribe to this mod's changes

feature-tdd-implementation is a command published in the GitHub repository ThibautBaissac/rails_ai_agents (659 stars, last pushed 3mo ago), licensed MIT. It adds 51 tokens to every session and 676 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.