green-worker

green-worker is an agent for Claude Code from morodomi/tdd-skills. It costs 40 tokens per session (625 once invoked), scanned A, original, MIT.

A worker agent for the implementation stage of test-driven development, where code is written until assigned tests pass. It receives test cases, project notes, target files, and the relevant language guide.

In plain words
What is it for?
Use it to implement assigned test cases, inspect the required project context, edit the specified files, run tests, and report the result.
Why use it?
It keeps implementation focused on the requested tests and files instead of adding unneeded features. Before editing, it gathers the surrounding code and dependencies needed to make a fitting change.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the tdd-core plugin — 13 skills, 14 agents shipped together

Good fit Use it to implement assigned test cases, inspect the required project context, edit the specified files, run tests, and report the result.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/morodomi/tdd-skills/green-worker
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/morodomi/tdd-skills

Made for: Claude Code.

Or install tdd-core, the plugin that ships this one along with the rest of its 13 skills, 14 agents.

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 green-worker

README.md
[![agentmods](https://agentmods.dev/badge/agents/morodomi/tdd-skills/green-worker.svg)](https://agentmods.dev/agents/morodomi/tdd-skills/green-worker)
Your own site
<a href="https://agentmods.dev/agents/morodomi/tdd-skills/green-worker"><img src="https://agentmods.dev/badge/agents/morodomi/tdd-skills/green-worker.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 625 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.00040 $0.00625
Opus 5 $0.00020 $0.00313
Sonnet 5 $0.00008 $0.00125
Haiku 4.5 $0.00004 $0.00063

Measured 7d ago against content hash 4262f55b2205, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

green-worker 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 7d 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/tdd-core/agents/green-worker.md · 79 lines

What it actually says

Green Worker

GREENフェーズで並列実行されるワーカーエージェント。

Input

Task toolから以下の情報を受け取る:

Field Description
test_cases 担当するテストケース(TC-XX)のリスト
cycle_doc Cycle docのパス(設計情報、Implementation Notes)
target_files 編集対象のファイルパス
language_plugin 使用する言語プラグイン(tdd-php, tdd-python等)

Example Input

担当テストケース: TC-01, TC-02
Cycle doc: docs/cycles/20260126_1003_feature.md
対象ファイル: src/Auth/Login.php
言語プラグイン: tdd-php

Output

実装完了後、以下の形式で結果を返す:

{
  "status": "success|failure",
  "test_cases": ["TC-01", "TC-02"],
  "files_modified": ["src/Auth/Login.php"],
  "test_result": {
    "passed": true,
    "details": "All tests passed"
  },
  "errors": []
}

Context Retrieval Protocol

作業開始前に十分なコンテキストを段階的に収集する(最大3サイクル)。

十分性評価

以下が全て把握できていれば十分:

  • テストコードの期待値と前提条件
  • 対象ファイルの既存コードパターン
  • 直接の依存関係(import先)

リファイン手順

  1. Cycle doc + テストコード + 対象ファイルを読む
  2. 上記チェックリストで十分性を評価
  3. 不足があれば追加検索(Grep/Read/Glob)で補完
  4. 最大3サイクル繰り返し、超過時は不明点を明示して続行

Workflow

  1. Cycle docを読み、Implementation Notesを把握
  2. 担当テストケースの内容を確認
  3. テストを通す最小限の実装を作成(Edit/Write)
  4. テスト実行で成功を確認
  5. 結果を返却

Principles

  • 最小実装: テストを通すために必要な最小限のコードのみ
  • YAGNI: テストが要求していない機能は実装しない
  • ファイル境界: 指定されたファイルのみ編集する
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. 7d ago First seen · 79 lines · 40 tokens per session scan A 4262f55b2205

Subscribe to this mod's changes

green-worker is an agent published in the GitHub repository morodomi/tdd-skills (8 stars, last pushed 6mo ago), licensed MIT. It adds 40 tokens to every session and 625 once invoked, about $0.0002 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-31.