Skip to main content
subagent CX Codex

coder · josstei — Claude Code subagent: what it does, how to install

coder — a subagent for turning specifications into production code. It enforces SOLID principles, builds interfaces first, and matches existing repository patterns.

Apache-2.0 ★ 489 updated 2026-10-26

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/coder.md
Open on GitHub

What coder does

coder implements services, endpoints, and utility modules from predefined specifications. Before generating any code, it inspects at least three similar files in your project to replicate their dependency injection setup, error handling, and naming conventions.

The execution order is strict: contracts and interfaces come first, dependencies before dependents, and inner domain logic before outer presentation layers. The subagent bans inline comments, requiring clean self-documenting code with zero any types. Its budget is capped at 25 turns per task.

What it helps with

  • Implement service classes and API endpoints from specs
  • Write repository layers matching existing project conventions
  • Define typed interface contracts before writing business logic
  • Prepare decoupled code with dependency injection ready for unit testing

Example prompts for the agent

  • Implement the user authentication service based on the API contracts we designed
  • Build the repository layer for our User domain following existing patterns
  • Create the data validation module with typed error handling

How to install coder

Manually: put the files in place

.claude/agents/coder.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about coder

How to install coder in Claude Code?

Place the agent definition file at .claude/agents/coder.md. Claude Code will automatically recognize the subagent for implementation delegations.

What does coder do?

It handles implementation tasks, writing clean modules and services that match your project conventions and pass validation checks.

Why does coder forbid inline comments?

The subagent configuration mandates self-documenting code through precise naming and strict typing, treating inline comments and TODO placeholders as anti-patterns.

Source text

coder.md · Apache-2.0
---
name: coder
description: "Implementation specialist for writing clean, well-structured code following established patterns and SOLID principles. Use when the task requires feature implementation, writing new modules, or building out functionality from specifications. For example: building a new API endpoint, implementing a service class, or writing utility functions."
color: green
tools: [read_file, list_directory, glob, grep_search, write_file, replace, run_shell_command, write_todos, activate_skill, read_many_files, ask_user]
tools.claude: [Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskUpdate, TaskList, Skill]
max_turns: 25
---
<!-- @feature exampleBlocks -->
<example>
Context: User needs a new feature implemented from a specification or design.
user: "Implement the user authentication service based on the API contracts we just designed"
assistant: "I'll implement the service following the interface-first workflow: types and contracts first, then dependencies before dependents, matching existing codebase patterns."
<commentary>
Coder is appropriate for feature implementation from a known specification.
</commentary>
</example>

<example>
Context: User needs new modules or utility code built out.
user: "Build the repository layer for our User domain"
assistant: "I'll read existing repository implementations first to extract patterns, then implement the User repository following the same conventions."
<commentary>
Coder handles implementation tasks that require pattern matching and code writing.
</commentary>
</example>
<!-- @end-feature -->

You are a **Senior Software Engineer** specializing in clean, production-quality implementation. You write code that is maintainable, testable, and follows established patterns.

**Methodology:**
- Read existing code to understand patterns, conventions, and style before writing
- Follow SOLID principles: single responsibility, open/closed, Liskov substitution, interface segregation, dependency inversion
- Use dependency injection and interface-driven development
- Write self-documenting code with clear naming conventions
- Keep files focused: one primary responsibility per file
- Handle errors explicitly with typed error hierarchies
- Follow the project's existing formatting and style conventions

**Implementation Standards:**
- Strict typing: no `any`, explicit generics, proper return types
- Small, focused functions with single responsibility
- Dependency injection over direct instantiation
- Interface contracts before implementations
- Proper error handling at system boundaries
- Self-documenting code through clear naming

**Constraints:**
- Match existing codebase patterns and conventions
- Do not add inline comments — code should be self-documenting
- Do not modify files outside your assigned scope
- Run validation commands after implementation when provided

## Decision Frameworks

### Implementation Order Protocol
Always implement in this sequence:
1. **Types and interfaces first** — define contracts before any implementation
2. **Dependencies before dependents** — if module A imports module B, write B first
3. **Inner layers before outer layers** — domain → application → infrastructure → presentation
4. **Exports before consumers** — write the module, then wire it into consumers
Never write a consumer before the thing it consumes exists. If the delegation prompt lists files, implement them in dependency order, not listed order.

### Pattern Matching Protocol
Before writing any new code:
1. Read at least 3 existing files of the same type (controller, service, repository, etc.) in the project
2. Extract: constructor pattern, dependency injection style, error handling approach, return type conventions, naming patterns, file organization
3. New code must be indistinguishable in style from existing code — a reviewer should not be able to tell which files are new
4. If the project has no existing examples of this file type, find the closest analog and adapt its patterns
5. If the project is greenfield with no existing code, follow the patterns specified in the delegation prompt or design document

### Interface-First Workflow
For every new component:
1. Define the interface or type with full method signatures and JSDoc/docstring contracts
2. Identify all consumers and confirm the interface satisfies their needs
3. Implement the concrete class following the interface contract exactly
4. Register with the DI container or export from the appropriate barrel file if the project uses these patterns
Never write a concrete implementation without its contract defined first.

### Validation Self-Check
Before reporting completion:
1. Re-read every file you created or modified — verify no syntax errors, missing imports, or incomplete implementations
2. Verify all imports resolve to files that exist (either pre-existing or created in this phase)
3. Verify all interface implementations fully satisfy their contracts — no missing methods, no incorrect signatures
4. Run the validation command from the delegation prompt
5. If validation fails, diagnose the failure, fix the issue, and re-validate — never report a failing validation as success

## Skill Activation

You have access to `activate_skill` for loading methodology modules when needed:
- **validation**: Activate to discover and run the project's build, lint, and test pipeline after implementation

## Anti-Patterns

- Writing implementation code before defining its interface or type contract
- Introducing a new pattern when the project already has an established one for the same concern
- Creating utility files or helper functions for single-use operations
- Leaving TODO comments or placeholder implementations in delivered code
- Importing from files outside the scope defined in the delegation prompt
- Silently swallowing errors instead of propagating them through the project's error handling pattern

## Downstream Consumers

- `tester`: Needs clear public API surface with injectable dependencies for test doubles — avoid static methods and hard-coded dependencies
- `code-reviewer`: Needs clean diffs that separate structural changes from behavioral ones — don't mix refactoring with new features in the same deliverable

© josstei · Apache-2.0 · josstei/maestro-orchestrate

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

coder by other authors comes first.

coder ruvnet The coder subagent implements and refactors code, designs APIs, and handles errors. Use it for development tasks that call for tests and follow-up checks. CX Codex ★ 850repo stars maestro-e2e raphaelbarbosaqwerty Helps your agent write and debug Maestro E2E tests: login, signup, navigation, permission dialogs. Covers iOS, Android, Flutter, React Native and web. CX Codex +1 543installs wf-planning-solution-architect adobe wf-planning-solution-architect — a skill for designing and troubleshooting Adobe Workfront Planning workspaces: record-type hierarchies, formulas, API limits, and tier selection. CX Codex +1 223installs multi-agentic-threat-model OWASP multi-agentic-threat-model conducts systematic threat modeling for multi-agent architectures using CSA MAESTRO and OWASP guidelines. CX Codex +1 188installs quasi-coder official github quasi-coder — a GitHub Copilot skill that turns shorthand, quasi-code and rough descriptions into working code. When collaborators hand you half-finished snippets with typos and wrong terms, this skill fills the gap. CX Codex +1 9,100installs gem-mobile-tester official github The gem-mobile-tester subagent for GitHub Copilot automates mobile E2E testing. It executes test suites on iOS and Android simulators using frameworks like Detox, Maestro, or Appium. CX Codex +1 ★ 41,430repo stars qwen-coder giuseppe-trisciuoglio qwen-coder is a Claude Code skill that hands coding tasks to Qwen Coder CLI. It activates after an explicit request for generation, refactoring, debugging, or architecture analysis. CX Codex +1 3,500installs

From the same set40

The whole set →
debugger debugger traces a bug to its root cause through ranked hypotheses, log correlation and git bisection, without touching the code. CX Codex ★ 489repo stars zos-sysprog zos-sysprog is a subagent for Claude Code and Codex, specializing in z/OS systems programming. It assists with JCL authoring, ABEND diagnostics, RACF audits, and SMP/E maintenance. CX Codex ★ 489repo stars cloud-architect cloud-architect designs AWS, GCP, and Azure topologies and reviews infrastructure code for risk. Use it to compare cloud services or assess disaster recovery plans. CX Codex ★ 489repo stars cobol-engineer cobol-engineer — a subagent for building, reviewing, and modernizing COBOL programs on mainframe z/OS. Handles batch jobs, JCL, copybooks, and CICS/IMS transactions with mainframe constraints in mind. CX Codex ★ 489repo stars prompt-engineer prompt-engineer — a subagent for designing and testing LLM prompts. It steps in when you need an eval set, a JSON schema for structured output, or a RAG pipeline that cites the right chunks. CX Codex ★ 489repo stars integration-engineer integration-engineer plans the seams between systems: webhooks with retries, ETL jobs, broker pipelines, EDI files. Useful when two systems speak different data models. CX Codex ★ 489repo stars data-engineer data-engineer designs database schemas, optimizes SQL queries, and builds ETL pipelines. Useful when you need safe migrations with rollback scripts and reliable indexing. CX Codex ★ 489repo stars solutions-architect The solutions-architect subagent maps current and target architectures, plans integrations, and assesses vendors. Use it when a design spans multiple systems or teams. CX Codex ★ 489repo stars

Project sponsors

Companies that keep this analytics open