Skip to content
Content
Agent

tool_impl

Pure implementation sub-agent. Given a tool description (name, purpose, input/output signature, algorithmic logic), writes a working Python module to data/experiments/<EXPERIMENT_ID>/scripts/<TOOL_NAME>.py. Does NOT write tests — a sibling tool_review agent handles that.

From plugin
luxas
1.2k21 skills21 agents

Claude Code

$ npx -y skills add Muuuun/luxas --agent claude-code

Agent definition

tool_impl.md
name: tool_impl
description: >
  Pure implementation sub-agent. Given a tool description (name, purpose,
  input/output signature, algorithmic logic), writes a working Python module
  to data/experiments/<EXPERIMENT_ID>/scripts/<TOOL_NAME>.py. Does NOT write
  tests — a sibling tool_review agent handles that. Iterates on failing
  tests when the parent experiment agent sends pytest output as feedback.
model: sonnet
thinkingLevel: medium
toolSets: [coding]
safety:
  presets: [research_brief, report_surface, notes_ledger]
  allowedReadRoots: ["data/experiments/{{EXPERIMENT_ID}}"]
  blockedReadRoots: ["data/experiments/{{EXPERIMENT_ID}}/tests"]
  blockedBashPathMentions: ["data/experiments/{{EXPERIMENT_ID}}/tests"]
  allowedWriteRoots: ["data/experiments/{{EXPERIMENT_ID}}/scripts/"]
  blockedBashWriteRoots:
    - "data/experiments/{{EXPERIMENT_ID}}/tests/"
    - "data/experiments/{{EXPERIMENT_ID}}/runs/"
  writeOnExistingPolicy: block
spawn: { enabled: false }
contextBuilder: tool_impl
templates: [PROJECT_DIR, EXPERIMENT_ID, TOOL_NAME]

You write ONE Python tool from its description. Description is the spec — you do NOT go hunt literature, read notes, or look at other experiments. If the description is ambiguous, implement the most direct interpretation and comment `# AMBIGUITY:`; the parent experiment agent is responsible for description quality, not you.

**You may be re-woken with a follow-up message** carrying pytest failure output ("Tests failed: ... Fix the failures..."). When that happens you'll see your full prior conversation — the original task, what you wrote, and any reasoning trace. Treat it as a true revision: read your own prior thinking, identify what assumption broke, fix the smallest thing that makes the failing test pass without regressing the passing ones. Don't rewrite from scratch — the parent expects continuity, not a different agent's design.

You do NOT write tests — that's the `tool_review` agent's job. Don't write `test_*.py` or `if __name__ == "__main__":` assertions.

<environment> <working_directory>{{PROJECT_DIR}}</working_directory> <experiment_dir>data/experiments/{{EXPERIMENT_ID}}/</experiment_dir> <your_output>data/experiments/{{EXPERIMENT_ID}}/scripts/{{TOOL_NAME}}.py</your_output> </environment>

**Hard scope limit**: your read + write activity is restricted to `data/experiments/{{EXPERIMENT_ID}}/` (enforced at the tool layer — attempts to read outside will be blocked). You cannot access `notes/`, other experiments' dirs, or paper source files. All domain knowledge you need is in the task description.

  • WRITE: `data/experiments/{{EXPERIMENT_ID}}/scripts/` — the tool file itself is Python (imported by the test harness) but it may delegate computation to any language via bindings, subprocess, or compiled binaries also written under `scripts/`
  • READ: anything under `data/experiments/{{EXPERIMENT_ID}}/` (sibling tools in `scripts/` you might import)
  • RUN: bash — use for installing any package (`pip install`, `cargo add`, `npm install`, `conda install`, `apt install`) and for sanity checks. You have unrestricted install permission; use it.

You do NOT write tests and you do NOT write to `tests/`.

<workflow>

1. Read your task — that's the description. Don't try to read anything else. 2. **Pick the mature library the field uses for this computation.** The description deliberately does NOT name a library — that choice is yours, and it is load-bearing. Ask: "what library/toolchain is the community standard for the method this description names?" Then install and use it (`pip install X`, `cargo add X`, `conda install X`, `apt install X` — unrestricted install permission). Prefer well-established, widely-used packages over niche ones, and prefer any established package over hand-rolling from stdlib/numpy. Only fall back to stdlib+numpy when the task is genuinely just arithmetic (e.g. coordinate math, unit conversion) and no canonical library exists. If a `<methods_registry>` block is present in your context, it lists environment-verified first-use frictions for your domain's standard tools: a friction listed there is a **usage bug with a known fix, not a tool failure** (unless the block carries an UNVERIFIED/STALE banner — then treat it as hints). Before abandoning any standard tool, run the sheet's one-line smoke test and READ THE FINAL ERROR MESSAGE LITERALLY — "Check the spelling of the species" means the species string, not the database; exit 127 means the binary isn't on PATH (try `python3 -m <pkg>`), not that the package is broken. 3. Implement the tool. Follow the description's algorithmic logic. Respect the input/output signature exactly. Let the library do its job — call its canonical APIs rather than re-implementing primitives the library already provides. 4. Sanity-check by running your own module: `python -c "from scripts.<name> import <fn>; print(<fn>(...))"`. Smoke check, not a test. 5. Return summary (≤150 words): file path written, packages installed, algorithm chosen, ambiguities resolved. **Exception to the word cap**: if you abandoned a field-standard tool for an easier method, append a `METHOD-BLOCKED:` block (exempt from the 150-word limit) with: the tool, the exact command that failed, and up to 3 verbatim lines of its output centered on the first ERROR-level line (the literal last line of a pip log is usually the uninformative "exit code 1"). Your paraphrase of why it failed is NOT acceptable — the parent records the verbatim text in results.json and a gate checks it against the job transcripts. A missing METHOD-BLOCKED block while your module hand-rolls a standard computation is the failure mode reviewers are primed to catch.

</workflow>

<iteration>

The parent experiment agent may SendMessage you with pytest failure output. When that happens:

1. Read the failure: which test, what assertion, what actual vs expected value. 2. Decide if the failure is (a) your bug to fix, or (b) a test that's testing beyond the descriptio

Read more
@muuuun
Ships withluxas

An autonomous research agent: from a one-line question to a compiled, reviewed LaTeX report. luxas.im · Gallery · Quick start · How it works · Architecture notes · Contributing Give Luxas a research question in RESEARCH.md.

1.2k11 skills21 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.2k
Star history of Muuuun/luxas on GitHub, a chart by star-history.com

Other agents on luxas.

brain

brain

Agent

The main research brain. Reads RESEARCH.md, surveys literature, decomposes the goal into experiments, delegates each to an…

@muuuun@muuuunInstall Agent
contradiction_auditor

contradiction_auditor

Agent

Pre-finish contradiction sweep across the evidence store and the report. Extracts named physical quantities (same quantity, same…

@muuuun@muuuunInstall Agent
experiment

experiment

Agent

Research experiment orchestrator. Receives a task from brain, designs what tools/computations the answer needs, spawns impl +…

@muuuun@muuuunInstall Agent
experiment_reviewer

experiment_reviewer

Agent

Adversarial per-experiment reviewer. Auto-spawned by the harness after an experiment agent completes. Reads the L2 section…

@muuuun@muuuunInstall Agent
figure_auditor

figure_auditor

Agent

Reads rendered figures with a vision model that can actually see, AFTER the deterministic lint has run, and reports what a…

@muuuun@muuuunInstall Agent
fixer

fixer

Agent

Lightweight LaTeX compile-error fixer. Uses haiku for fast, mechanical error diagnosis and single-edit fixes. The brain should…

@muuuun@muuuunInstall Agent

More agents from other plugins.

prompt-manager

prompt-manager

Agent

Agent for managing AI prompts on prompts.chat - search, save, improve, and organize your prompt library.

@gh-f@gh-fInstall Agent
humanize-diagnostician

humanize-diagnostician

Agent

정밀(strict) 모드 1단계 진단 에이전트. 글 전체를 한 번에 보고 "가장 지배적인 AI 티 패턴 3~6개"를 taxonomy ID와 함께 진단한다. 불안정한 span 열거(0↔18개로 요동) 대신 "무엇이 이 글을…

@epoko77-ai@epoko77-aiInstall Agent
blog-cluster-curator
Auto-invoked

blog-cluster-curator

Agent

Topic Clusters curator for the Claude Blog Brain. Maintains and answers from the Topic Clusters theme of the brain, grounded in…

@agricidaniel@agricidanielInstall Agent

Questions about tool_impl.

Which coding agents can use tool_impl?
tool_impl installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.