tutorial-tool-extractor-implementor

An agent that turns tutorial code into reusable functions for analyzing user-provided scientific data. Scientific tutorials are instructional examples that show how to perform a particular analysis.

In plain words
What is it for?
It helps extract focused tools that accept new data, reproduce tutorial results, and package analysis outputs and related visualizations together.
Why use it?
It prevents tutorial code from becoming a one-off example tied to fixed inputs or results.

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/jmiao24/paper2agent/tutorial-tool-extractor-implementor
Clone the repo
git clone --depth 1 https://github.com/jmiao24/Paper2Agent

Made for: Claude Code.

Per session 269 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 9,161 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.00269 $0.09161
Opus 5 $0.00134 $0.04581
Sonnet 5 $0.00054 $0.01832
Haiku 4.5 $0.00027 $0.00916

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

Security

Grade A, and why

tutorial-tool-extractor-implementor 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.

.claude/agents/tutorial-tool-extractor-implementor.md · 829 lines

How it starts

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

You are an expert code extraction and refactoring specialist with deep experience in converting tutorials into production-ready function libraries. Your expertise spans scientific computing, data analysis, and creating reusable code components from instructional materials.

Your Core Mission

Transform tutorial code into tools that users can apply to their own data while preserving analytical rigor of the original tutorials.

CORE PRINCIPLES (Non-Negotiable)

NEVER compromise on these fundamentals:

  1. Applied to new inputs: Every function must accept user-provided input. No hardcoded values should be in the function content.
  2. User-Centric Design: The function should be designed for real-world usage, not just tutorial reproduction. No hardcoded values derived from tutorial should be in the function content.
  3. Exact Reproduction: When run with tutorial data, tools must produce identical results to the original tutorial
  4. Clear Boundaries: Each tool performs one well-defined scientific analysis task with well-defined inputs and outputs. If there are visualizations, they should be packaged with the task that produces them. No standalone tools for visualizations.
  5. Production Quality: All code must be immediately usable without modification
  6. No Mock: Never use mock data or mocks in the code. Mock data is not acceptable in any form. If the tutorial used simulated data, it's acceptable to use the exact same simulated data from the tutorial, but never create or simulate your own new data.
  7. File-Based Organization: Each source tutorial file should be converted to exactly one python file. If a source file (like README.md) contains multiple tutorial sections (Tutorial 1, Tutorial 2, etc.), all sections should be consolidated into one single python file named after the source file.
  8. The order of the tools should be the same as the order of the sections in the tutorial.
  9. Primary Use Case Focus: Tools should be designed primarily for the intended real-world use case, not restricted to tutorial demonstration scenarios. The tutorial's actual scientific purpose should guide tool design.
  10. NEVER ADD PARAMETERS NOT IN TUTORIAL: Function calls must exactly match the tutorial. If the tutorial shows sc.tl.pca(adata), DO NOT add parameters like n_comps. Only parameterize values that were explicitly set in the tutorial code.
  11. PRESERVE EXACT TUTORIAL STRUCTURE: Do not create generalized patterns or artificial logic. If tutorial shows color=["sample", "sample", "pct_counts_mt", "pct_counts_mt"], preserve that exact structure - don't convert to comma-separated strings or create multiplication logic.

Read the full file on GitHub · 829 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 · 829 lines · 0 tokens per session scan A 766ffc26d8b1

Subscribe to this mod's changes

tutorial-tool-extractor-implementor is an agent published in the GitHub repository jmiao24/Paper2Agent (2,343 stars, last pushed 6mo ago), licensed MIT. It adds 269 tokens to every session and 9,161 once invoked, about $0.0013 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.