tdd-task

tdd-task is a command for Claude Code from el-feo/ai-context. It costs 25 tokens per session (3,060 once invoked), scanned A, original, MIT.

A command for implementing a GitHub Task through a Test-Driven Development (TDD) loop, then updating the issue and opening a pull request.

In plain words
What is it for?
Use it to select a Task, create a branch, make and test the changes, record meaningful progress on the issue, and create a pull request that closes the Task.
Why use it?
It keeps task work traceable and enforces project rules such as using a feature branch and providing a runnable test command.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the TodoWrite tool.

Part of the ghpm plugin — 11 commands shipped together

Good fit Use it to select a Task, create a branch, make and test the changes, record meaningful progress on the issue, and create a pull request that closes the Task.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/el-feo/ai-context/tdd-task
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/el-feo/ai-context

Made for: Claude Code.

Or install ghpm, the plugin that ships this one along with the rest of its 11 commands.

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 tdd-task

README.md
[![agentmods](https://agentmods.dev/badge/commands/el-feo/ai-context/tdd-task/github.svg)](https://agentmods.dev/commands/el-feo/ai-context/tdd-task)
Your own site
<a href="https://agentmods.dev/commands/el-feo/ai-context/tdd-task"><img src="https://agentmods.dev/badge/commands/el-feo/ai-context/tdd-task/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tdd-task

Your own site · 80×15
<a href="https://agentmods.dev/commands/el-feo/ai-context/tdd-task"><img src="https://agentmods.dev/badge/commands/el-feo/ai-context/tdd-task.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,060 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.00025 $0.03060
Opus 5.5 $0.00010 $0.01224
Sonnet 5.5 $0.00005 $0.00612
Haiku 4.5 $0.00003 $0.00306

Measured 1mo ago against content hash 03e3e8aa62bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tdd-task 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 1mo 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.

plugins/ghpm/commands/tdd-task.md · 419 lines

How it starts

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

Resolution order if omitted:

  1. If branch name matches ghpm/task-<N>-* or task-<N>-*, use N
  2. Most recent open issue labeled Task assigned to @me: gh issue list -l Task -a @me -s open --limit 1 --json number -q '.[0].number'
  3. Most recent open Task: gh issue list -l Task -s open --limit 1 --json number -q '.[0].number'

<usage_examples> With task number:

/ghpm:tdd-task task=#42

With focus hint:

/ghpm:tdd-task task=#42 focus=unit

Auto-resolve from branch:

# On branch: ghpm/task-42-add-auth
/ghpm:tdd-task

Auto-resolve from GitHub:

# No arguments - uses most recent assigned Task
/ghpm:tdd-task

</usage_examples>

<operating_rules>

  • Always create a feature branch before making changes. Never commit directly to main/master.
  • No local markdown artifacts. Do not write local status files; only code changes + GitHub issue/PR updates.
  • Do NOT use the TodoWrite tool to track tasks during this session.
  • Do not silently expand scope. If you must, create a new follow-up Task issue and link it.
  • Always provide a runnable test command in the final notes.
  • Minimize noise: comment at meaningful milestones.
  • All commits and PR titles MUST follow Conventional Commits format for changelog generation. </operating_rules>

<conventional_commits>

Conventional Commits Format

All commits and PR titles must follow the Conventional Commits specification to enable automated changelog generation.

Format

Read the full file on GitHub · 419 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. 1mo ago First seen · 419 lines · 25 tokens per session scan A 03e3e8aa62bf

Subscribe to this mod's changes

tdd-task is a command published in the GitHub repository el-feo/ai-context (12 stars, last pushed 2mo ago), licensed MIT. It adds 25 tokens to every session and 3,060 once invoked, about $0.0001 per session on Opus 5.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.