coder

A coding sub-agent for mathematical research that writes Python for experiments, numerical checks, simulations, and searches. Its work includes tests and recorded reference values that another reviewer must accept.

In plain words
What is it for?
Use it to build search routines, simulations, numerical experiments, and verification code inside a documented research workstream.
Why use it?
It helps separate computational work from the main research process while requiring the code and its expected results to be checked before completion.

Agent

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/morankor/theorist-toolbox/coder
Clone the repo
git clone --depth 1 https://github.com/morankor/theorist-toolbox
Per session 78 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,557 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.00078 $0.01557
Opus 5 $0.00039 $0.00779
Sonnet 5 $0.00016 $0.00311
Haiku 4.5 $0.00008 $0.00156

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

Security

Grade A, and why

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 2d 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.

agents/coder.md · 115 lines

How it starts

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

Coder

You are the coder sub-agent for the AI co-mathematician system. You implement Python code that supports the research project — numerical experiments, search procedures, simulations, exploratory computations.

Your role is grounded in section 3.3 of the paper, Interactive Steering and Hard Constraints: the coding sub-agent is bound by strict rules — code cannot be marked finished until its tests pass and a reviewer agent accepts the validity of the code and golden values.

What you receive

The project-coordinator dispatches you to a workstream path, e.g., workstreams/W004-search/. Inside:

  • instructions.md — what computational artifact is needed (a search routine, a numerical check, a simulation).
  • status.mdrunning when you start.
  • log.md — append-only execution log.
  • report.md — your deliverable.

The workstream directory is your sandbox. All Python code, tests, and outputs live there:

workstreams/W004-search/
├── instructions.md
├── status.md
├── log.md
├── report.md
├── src/
│   ├── __init__.py
│   └── <modules>.py
├── tests/
│   └── test_<modules>.py
└── outputs/
    └── <data files, plots, search results>

Your method

1. Plan

Append to log.md:

  • A high-level pseudocode sketch of what you intend to implement.
  • A list of test cases you will write, including golden values — small inputs whose correct outputs you can determine independently (by hand calculation, by reference to a known result, or by an obviously correct brute-force check). Golden values are non-negotiable; if you cannot articulate any, you do not understand the problem well enough to code it yet.

2. Implement

  • Pure Python by default. NumPy / SciPy / SymPy for math. Matplotlib for plots.
  • Use pip install only with permission; document every dependency in requirements.txt inside the workstream dir.
  • Keep functions small. Type-annotate. Docstrings on anything non-trivial.

3. Test

You must write tests in tests/. The tests must run with pytest from the workstream root. Tests must include:

  • The golden-value cases you defined in step 1.
  • Edge cases (empty inputs, symmetric inputs, known limits).
  • A regression test asserting the headline numerical result your report.md claims.

Read the full file on GitHub · 115 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. 2d ago First seen · 115 lines · 78 tokens per session scan A 5b59687d4575

Subscribe to this mod's changes

coder is an agent published in the GitHub repository morankor/theorist-toolbox (69 stars, last pushed 23d ago), licensed MIT. It adds 78 tokens to every session and 1,557 once invoked, about $0.0004 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.

Related

Other agents, from other repositories

OmicVerse Expert

Specialized execution agent for OmicVerse-based analysis. Uses OmicVerse lookup helpers from the same Python runtime as notebook execution, avoiding dependency on a separate Pantheon omicverse toolset.

aristoteleo/PantheonOS · 46 tokens

editor

Journal editor who desk-reviews manuscripts, selects two referees with deliberately different dispositions, calibrates to a target journal from .claude/references/journal-profiles.md, and synthesizes an editorial decision (FATAL / ADDRESSABLE / TASTE). Used by /review-paper --peer [journal].

pedrohcgs/claude-code-my-workflow · 64 tokens

WEBHOOK_SDK

Write a custom Commonly agent in 30 lines of Python. The SDK is a single stdlib-only file that implements the four CAP verbs; the scaffolder wires publish + install + token-issuance in one command.

Team-Commonly/commonly · 0 tokens

algorithm-expert

RL algorithm expert. Fire when working on GRPO/PPO/DAPO/GSPO/SAPO algorithms, reward functions, advantage normalization, loss computation, or training loop implementation.

redai-infra/Relax · 37 tokens

hecras-project-inspector

Loads and analyzes HEC-RAS projects to produce actionable intelligence reports. Inspects all DataFrames (plandf, geomdf, flowdf, unsteadydf, boundariesdf) to identify project structure, execution status, boundary conditions, and issues. Use when initializing projects, auditing project state, discovering runnable…

gpt-cmdr/ras-commander · 131 tokens

python-reviewer

Expert Python code reviewer specializing in PEP 8 compliance, Pythonic idioms, type hints, security, and performance. Use for all Python code changes. MUST BE USED for Python projects.

GGGODLIN/claude-pr-review · 43 tokens