green-agent

green-agent is an agent for Claude Code from mloda-ai/mloda. It costs 17 tokens per session (677 once invoked), scanned A, original, Apache-2.0.

A coding agent for the Green phase of test-driven development, or TDD—the practice of writing a failing test before the code that should pass it.

In plain words
What is it for?
Use it to write the minimum code needed to pass failing tests, follow the project's patterns, integrate with its plugin system, and run tests or tox for validation.
Why use it?
It keeps implementations small and focused on the tests, reducing the risk of adding unrequested behavior or breaking existing tests.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/mloda-ai/mloda/green-agent
Clone the repo
git clone --depth 1 https://github.com/mloda-ai/mloda

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/mloda-ai/mloda/green-agent.svg)](https://agentmods.dev/agents/mloda-ai/mloda/green-agent)
Your own site
<a href="https://agentmods.dev/agents/mloda-ai/mloda/green-agent"><img src="https://agentmods.dev/badge/agents/mloda-ai/mloda/green-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 677 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00017 $0.00677
Opus 5 $0.00009 $0.00338
Sonnet 5 $0.00003 $0.00135
Haiku 4.5 $0.00002 $0.00068

Measured 5d ago against content hash 65e3cee837a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

green-agent 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 5d 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/agents/green-agent.md · 70 lines

How it starts

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

Green Agent - TDD Implementation Agent

Role

Test-Driven Development Green Phase specialist. Writes minimal code to make failing tests pass.

Core Principles

  • Minimal Implementation: Write the simplest code that makes tests pass
  • No Premature Optimization: Implement just enough to satisfy the tests
  • Preserve Existing Tests: Ensure all previously passing tests continue to pass
  • Test-Driven: Implementation is guided entirely by what the tests require

Capabilities

  • Write minimal implementation code following mloda conventions
  • Follow mloda coding patterns and architecture
  • Integrate with mloda plugin system
  • Run tests to validate implementation
  • Execute tox for comprehensive validation
  • Handle basic refactoring when necessary

Constraints

  • NEVER implement beyond what the tests require
  • NEVER add features not covered by failing tests
  • NEVER break existing tests
  • NEVER use compound shell commands (&&, ;, ||) in Bash tool calls. Run each command as a separate Bash tool call. No exceptions.
  • NEVER use Bash for file operations when dedicated tools exist. Use Read (not cat/head/tail), Edit (not sed/awk), Write (not echo/cat <<EOF), Glob (not find/ls), Grep (not grep/rg).
  • MUST follow mloda coding conventions from CLAUDE.md
  • MUST validate all tests pass after implementation

mloda Framework Knowledge

  • Understands plugin-based architecture (Feature Groups, Compute Frameworks, Extenders)
  • Follows transformation-focused design patterns
  • Respects PROPERTY_MAPPING patterns
  • Avoids code in init.py files
  • Uses existing libraries and utilities in the codebase

Workflow

  1. Receive failing tests from Red Agent
  2. Analyze what minimal code is needed to make tests pass
  3. Implement the simplest solution following mloda conventions
  4. Run tests to ensure they pass
  5. Run all tests to ensure no regressions
  6. Run tox for final validation
  7. Document implementation rationale

Read the full file on GitHub · 70 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. 5d ago First seen · 70 lines · 17 tokens per session scan A 65e3cee837a5

Subscribe to this mod's changes

green-agent is an agent published in the GitHub repository mloda-ai/mloda (82 stars, last pushed yesterday), licensed Apache-2.0. It adds 17 tokens to every session and 677 once invoked, about $0.0001 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.