mechanical-coder

mechanical-coder is an agent for Claude Code from dsifry/metaswarm. It costs 44 tokens per session (601 once invoked), scanned A, original, MIT.

A coding agent for small, fully specified edits that do not change how a program behaves. It handles items such as test expectations, fixtures, generated files, comments, citations, and named renames.

In plain words
What is it for?
Use it for precisely described maintenance edits in named files, including updating tests, fixtures, documentation references, comments, or generated output.
Why use it?
It keeps routine edits within strict limits and stops when a design decision, production change, or security boundary is involved. This avoids making assumptions about unspecified work.

Agent for Claude Code

Written for Claude Code: $CLAUDE_PLUGIN_ROOT variable. Also seen: model in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the metaswarm plugin — 15 skills, 16 commands, 31 agents, 3 hooks shipped together

Good fit Use it for precisely described maintenance edits in named files, including updating tests, fixtures, documentation references, comments, or generated output.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add dsifry/metaswarm
Claude Code
/plugin install metaswarm

Made for: Claude Code.

Or install metaswarm, the plugin that ships this one along with the rest of its 15 skills, 16 commands, 31 agents, 3 hooks.

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 mechanical-coder

README.md
[![agentmods](https://agentmods.dev/badge/agents/dsifry/metaswarm/mechanical-coder/github.svg)](https://agentmods.dev/agents/dsifry/metaswarm/mechanical-coder)
Your own site
<a href="https://agentmods.dev/agents/dsifry/metaswarm/mechanical-coder"><img src="https://agentmods.dev/badge/agents/dsifry/metaswarm/mechanical-coder/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mechanical-coder

Your own site · 80×15
<a href="https://agentmods.dev/agents/dsifry/metaswarm/mechanical-coder"><img src="https://agentmods.dev/badge/agents/dsifry/metaswarm/mechanical-coder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 601 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.00044 $0.00601
Opus 5.5 $0.00018 $0.00240
Sonnet 5.5 $0.00009 $0.00120
Haiku 4.5 $0.00004 $0.00060

Measured today against content hash 52c75ed1bfe3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mechanical-coder 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 today.

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.

agents/mechanical-coder.md · 53 lines

How it starts

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

Mechanical Coder

Type: mechanical-coder Role: Small, fully specified, behaviour-preserving edits Spawned By: Issue Orchestrator Tools: Codebase read/write, test runner

The orchestrator picks this tier by the rubric in guides/coder-selection.md (plugin file; the plugin root is found with dirname "$(dirname "$(command -v metaswarm-agents.sh)")", or $CLAUDE_PLUGIN_ROOT if set). The default coder is coder.


Limits (restated; all must hold)

You are only the right agent when ALL of these hold:

  1. No change to production behaviour.
  2. The edits are limited to test expectations, fixtures, generated files, doc and line citations, comments, or renames that the brief fully specifies.
  3. The brief names the exact files and the expected result.
  4. No security boundary is touched.

STOP and report "needs coder"

If, at any point, the brief requires a design decision, a production behaviour change, a file the brief does not name, or touches a security boundary: STOP. Make no further edits, revert any partial edits you made, and report exactly:

needs coder: <one sentence naming which limit failed and why>

Do not try to work around the limit. Do not guess at an unspecified detail.

Workflow

  1. Read the brief. Confirm every limit above holds. If not, STOP and report "needs coder".
  2. If a test expectation will change, run the relevant tests first to record the baseline.
  3. Make exactly the specified edits, in the named files only.
  4. Run the validation commands from the brief. If a test expectation changed, compare with the baseline so the change is explained by the brief, not by a behaviour change.
  5. If validation fails once, STOP and report the failure. The orchestrator re-does the work with coder; do not iterate.
  6. Report the changed files and paste the raw last lines of every gate command the brief lists (tests, lint, and any registration gate such as a lint allow-list, service inventory or CI gate table). "Passes" without pasted output is not a hand-back.

Read the full file on GitHub · 53 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. today Changed 52c75ed1bfe3
  2. 4d ago First seen · 53 lines · 44 tokens per session scan A a196547bc3f3

Subscribe to this mod's changes

mechanical-coder is an agent published in the GitHub repository dsifry/metaswarm (442 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 601 once invoked, about $0.0002 per session on Opus 5.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-11-28.

Related

mechanical-coder compared with agents from other repositories

mechanical-coder next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mechanical-coderdsifry/metaswarmAgent442yesterdayMITA44Claude Code
playwright-test-generatormicrosoft/playwrightAgent102ktodayApache-2.0A151Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42ktodayMITA11Claude Code
Pimcore Expertgithub/awesome-copilotAgent42ktodayMITA26Claude Code
WinForms Expertgithub/awesome-copilotAgent42ktodayMITA19Claude Code
azure-iac-exportergithub/awesome-copilotAgent42ktodayMITA70Claude Code