coder

Generates minimal Python production code to satisfy failing unit tests in TDD Green phase workflows.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/pcortes/swarm-attack --skill coder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coder
Source: https://github.com/pcortes/swarm-attack/tree/main/default-skills/coder
Command: npx skills add https://github.com/pcortes/swarm-attack --skill coder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the "Green" phase of Test-Driven Development (TDD) by generating production code that makes existing tests pass. It dramatically accelerates development cycles, ensures code quality by strictly adhering to test requirements, and frees developers from repetitive coding tasks, allowing them to focus on higher-level design.

Core Features & Use Cases

  • TDD Implementation: Writes minimal, correct code to satisfy failing tests, following TDD principles.
  • Test-Driven Development: Infers function signatures, return types, and exception contracts directly from test assertions and usage.
  • Code Generation: Creates new files and modifies existing ones to implement required functionality, ensuring all test imports and calls are satisfied.
  • Use Case: After a TestWriter agent creates failing tests for a new add function, this Skill reads those tests and automatically writes the add function implementation (def add(a: int, b: int) -> int: return a + b), making all tests pass without manual coding.

Quick Start

Implement the necessary Python code to make all tests in 'tests/test_math.py' pass, adhering strictly to the TDD "Green" phase.

Frequently Asked Questions about coder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate writing production code to make failing tests pass?

Test-Driven Development automates the Green phase by generating minimal production code that satisfies failing tests. This Skill reads test assertions, infers function signatures and return types, and writes implementation code—including file creation and modifications—until all tests pass without manual coding.

Can I use TDD to implement features while following existing project conventions?

Yes. This Skill reads project context, dependencies, and existing patterns (such as from_dict, to_dict, validate methods), then generates code adhering to those conventions. It explores dependencies using read, glob, and grep operations to match your codebase style.

What's the best way to accelerate feature development with code generation?

Write tests first to define requirements, then use test-driven code generation to produce implementation instantly. This approach ensures code strictly meets test requirements, eliminates repetitive coding, and lets developers focus on design rather than manual implementation.

How does Test-Driven Development ensure code quality?

TDD enforces quality by requiring production code to satisfy predefined test assertions before acceptance. Since tests define functional and technical requirements upfront, generated code cannot deviate from those contracts, ensuring correctness by design.

Do I need to write tests before using code generation?

Yes. This Skill requires existing failing tests as input. It reads test files, extracts requirements from assertions and usage patterns, then generates code to make those tests pass. Tests define the specification that code generation fulfills.

What happens if my code generation doesn't satisfy all tests?

The Skill iterates until the full test suite passes. It runs all tests after each implementation cycle, identifies remaining failures, and refines the generated code until every test passes and all functional and technical requirements are met.