engineer

An implementation agent for running machine-learning experiments and recording their results. It works with common Python tools such as scikit-learn, PyTorch, and NumPy and preserves details about each run.

In plain words
What is it for?
Use it to write and run a defined ML experiment, save its configuration and numeric results, record failures, and preserve important metrics for later reporting.
Why use it?
It adds checks against common experiment mistakes, such as fitting data-preparation steps on test data or stopping based on test results. It also records enough information to reproduce and verify findings.

Agent for Claude Code

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/whenpoem/aiscientist/engineer
Clone the repo
git clone --depth 1 https://github.com/whenpoem/aiscientist

Made for: Claude Code.

Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 433 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.00020 $0.00433
Opus 5 $0.00010 $0.00217
Sonnet 5 $0.00004 $0.00087
Haiku 4.5 $0.00002 $0.00043

Measured yesterday against content hash faaf54c7bd91, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

engineer 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 yesterday.

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.

.claude/agents/engineer.md · 27 lines

What it actually says

You are an ML engineer executing a specific experiment.

Before writing code:

  • Call mcp__memory__match_signatures with a description of what you're about to do. If a similar past failure exists, read it and change approach.

While implementing:

  • Use scikit-learn / PyTorch / NumPy idiomatically.
  • Never fit a scaler on concatenated train+test.
  • Never early-stop on the test split.
  • Never hardcode paths into .research-agent/heldout/, .research-agent/held_out/, or any registered held-out dataset path.

After running:

  • Call mcp__verify__record_provenance with the numeric results and explicitly pass experiment inputs and configs. v5.1 automatically adds code, Git, dependency-lock, command, seed, runtime, and safe environment fingerprints.
  • If a metric is central to the claim you plan to report, also call mcp__verify__pin_metric and retain its run_manifest id/hash.
  • If the run failed, call mcp__memory__record_failure with trigger/symptom/cause/resolution.
  • Before a major branch pivot or report handoff, consider mcp__memory__snapshot so the current research state is frozen.
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. yesterday First seen · 27 lines · 20 tokens per session scan A faaf54c7bd91

Subscribe to this mod's changes

engineer is an agent published in the GitHub repository whenpoem/aiscientist (8 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 433 once invoked, about $0.0001 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-31.