The Coder Agent
The Coder agent (@coder) is the most precision-oriented of the three built-in agents. It has the lowest temperature, a methodology-driven prompt, and exactly one tool enabled.
The Prompt
You are a senior software engineer and coding mentor.
Help users write, debug, and understand code across all major languages
and frameworks. Provide clear explanations with code examples. Follow
best practices for the language in question. When debugging, think step
by step. When explaining, use analogies when helpful. Be precise with
technical details and honest about trade-offs.Configuration
| Setting | Value | Why |
|---|---|---|
| Temperature | 0.4 | Low randomness — deterministic, accurate technical output |
| Tools | Web search only | Can look up docs/APIs, but doesn't trigger unrelated tools |
| Model | Apple Intelligence | Best quality for nuanced code reasoning |
What Makes This Prompt Work
1. Dual Identity
“a senior software engineer and coding mentor”
Two roles in one. “Senior software engineer” signals deep technical competence. “Coding mentor” signals that it should teach, not just produce code.
This dual framing means the agent gives you working code and helps you understand it. Without “mentor,” you'd get code dumps. Without “senior engineer,” you'd get oversimplified explanations.
2. Scope Without Boundaries
“across all major languages and frameworks”
Unlike the Guide (explicit feature list) or the Writer (specific creative forms), the Coder uses a broad scope statement. Programming languages are too numerous to list, and listing specific ones would imply weakness in unlisted ones.
3. Quality Standard
“Provide clear explanations with code examples. Follow best practices for the language in question.”
The phrase “for the language in question” is important. It tells the model that Python best practices differ from Rust best practices, and it should switch conventions based on context.
4. Methodology Directives
“When debugging, think step by step. When explaining, use analogies when helpful.”
These are the most important lines in the prompt. They define how the agent reasons:
Triggers chain-of-thought reasoning for debugging — break problems into pieces, check assumptions, trace logic
Gives permission to reach beyond pure technical language — but only when it actually helps
5. Values Statement
“Be precise with technical details and honest about trade-offs.”
This combats a common AI failure mode: confidently recommending a single approach without acknowledging alternatives or downsides. “Honest about trade-offs” means if there's a performance vs. readability trade-off, the agent says so.
Why Only Web Search Is Enabled
The Coder has exactly one tool: web search. This is deliberate:
Why web search
Code questions often require current info — API docs, framework versions, deprecation notices. Without it, the agent is limited to training data.
Why not other tools
Calendar, weather, contacts — none help with coding. If a user says “How do I handle dates in Swift?”, an agent with calendar tools might access their calendar instead.
The principle: Enable tools that serve the agent's purpose. Disable everything else.
Why Temperature 0.4?
In technical work, predictability is a feature:
- •The model strongly prefers the most probable token — syntactically correct, idiomatic code
- •Variable names, function signatures, and API calls are generated with high confidence
- •Explanations follow logical structure rather than creative tangents
The tradeoff: At very low temperature, the model can feel repetitive or formulaic. 0.4 is a sweet spot — deterministic enough for accuracy, warm enough to avoid robotic output.
Adapting This Pattern
Use the Coder pattern when building agents that:
- •Need technical accuracy above all else
- •Should explain their reasoning, not just give answers
- •Handle diverse subtopics within a broad domain
- •Benefit from methodical, step-by-step approaches
Template
You are a [senior role] and [teaching/mentoring role].
Help users [core tasks] across [scope]. [Quality standard.]
[Best practice directive.] When [situation 1], [methodology].
When [situation 2], [methodology]. Be [precision value] and
[honesty value].Examples
Data Science Agent
You are a senior data scientist and analytics mentor. Help users with
data analysis, visualization, statistical modeling, and machine learning
across Python, R, and SQL. Provide clear explanations with annotated
code. Follow statistical best practices and cite assumptions. When
exploring data, start with summary statistics before modeling. When
presenting results, distinguish correlation from causation. Be rigorous
with methodology and transparent about limitations.DevOps Agent
You are a senior infrastructure engineer and DevOps mentor. Help users
with CI/CD pipelines, containerization, cloud architecture, and
deployment across major platforms. Provide working configurations with
comments explaining each decision. Follow the principle of least
privilege and infrastructure-as-code. When troubleshooting, check logs
and metrics systematically. When designing, consider scalability and
cost. Be exact with configuration details and upfront about operational
trade-offs.