autoresearch

autoresearch is a skill for Claude Code from fortunto2/rust-code. It costs 73 tokens per session (912 once invoked), scanned A, original, MIT.

A loop for testing and improving an agent’s prompts, tool descriptions, skills, or output format. It generates changes, evaluates them against test cases, keeps useful changes, and repeats.

In plain words
What is it for?
Use it to improve tool selection, system prompts, SKILL.md files, or structured decision outputs using repeatable evaluations.
Why use it?
It helps find which wording or instructions lead to better agent decisions, instead of relying on manual trial and error.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Good fit Use it to improve tool selection, system prompts, SKILL.md files, or structured decision outputs using repeatable evaluations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fortunto2/rust-code/autoresearch
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.

Any agent
npx skills add fortunto2/rust-code --skill autoresearch
Clone the repo
git clone --depth 1 https://github.com/fortunto2/rust-code

Made for: Claude Code.

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 autoresearch

README.md
[![agentmods](https://agentmods.dev/badge/skills/fortunto2/rust-code/autoresearch/github.svg)](https://agentmods.dev/skills/fortunto2/rust-code/autoresearch)
Your own site
<a href="https://agentmods.dev/skills/fortunto2/rust-code/autoresearch"><img src="https://agentmods.dev/badge/skills/fortunto2/rust-code/autoresearch/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 autoresearch

Your own site · 80×15
<a href="https://agentmods.dev/skills/fortunto2/rust-code/autoresearch"><img src="https://agentmods.dev/badge/skills/fortunto2/rust-code/autoresearch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 912 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00073 $0.00912
Opus 5.5 $0.00029 $0.00365
Sonnet 5.5 $0.00015 $0.00182
Haiku 4.5 $0.00007 $0.00091

Measured 1mo ago against content hash b8b6a481aa53, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

autoresearch 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 1mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (base.py, dashboard.py, tool_selection.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/autoresearch/SKILL.md · 93 lines

How it starts

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

/autoresearch — Self-Improving Prompt Optimization

Karpathy autoresearch pattern: Generate → Evaluate → Score → Keep/Discard → Mutate → Repeat

Architecture

Core engine: crates/sgr-agent/src/autoresearch.rs (Rust module, feature genai). Dashboard: skills/autoresearch/dashboard.py (Python, standalone viewer). Test cases: skills/autoresearch/test_cases/*.json (embedded at compile time via include_str!).

Targets

Target What it optimizes Eval metric
tool-selection Tool descriptions in agent % correct tool chosen for 66 test tasks
system-prompt Agent system prompt (SOUL.md) Decision quality: right tool + coherent reasoning (4 criteria)
skill Any SKILL.md file Binary criteria pass rate (4 criteria)
decision-parser Structured output schema Parse success + field quality (5 criteria)

Usage (Rust API)

use sgr_agent::autoresearch::{AutoResearch, Config, Target};

let config = Config {
    target: Target::ToolSelection,
    batch_size: 10,
    cycle_secs: 120,
    gen_model: "gemini-2.5-flash".into(),
    eval_model: "claude-sonnet-4-6".into(),
    data_dir: "autoresearch_data/tool-selection".into(),
};
let ar = AutoResearch::new(config);
ar.run(20).await?; // 20 cycles

Quick Start (CLI — when wired into rc-cli)

# Tool selection optimization (most impactful)
cargo run -- autoresearch tool-selection --cycles 20

# System prompt optimization
cargo run -- autoresearch system-prompt --cycles 10

# Optimize a specific skill
cargo run -- autoresearch skill --name delegate --cycles 15

# Optimize decision parsing
cargo run -- autoresearch decision-parser --cycles 10

# Dashboard (Python, standalone)
python3 skills/autoresearch/dashboard.py --target tool-selection --port 8501

How It Works

Each cycle:

  1. Generate N outputs with current prompt (via Gemini — same model agent uses)
  2. Evaluate each output against binary criteria (via Claude Sonnet — different model for objectivity)
  3. Score = sum of passed criteria across all outputs
  4. Keep if score > best_score, discard otherwise
  5. Mutate the winning prompt to try improvements
  6. Log to JSONL for dashboard tracking
  7. Wait for next cycle (default 2 min)

Read the full file on GitHub · 93 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 93 lines · 73 tokens per session scan A b8b6a481aa53

Subscribe to this mod's changes

autoresearch is a skill published in the GitHub repository fortunto2/rust-code (45 stars, last pushed 1mo ago), licensed MIT. It adds 73 tokens to every session and 912 once invoked, about $0.0003 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-08-30.

Related

Other skills, from other repositories

hatch3r-ai-feature

Eval-driven development workflow for shipping AI features — write eval before prompt, measure, iterate, ship with caching + cost telemetry + model fallback + hallucination SLI.

hatch3r/hatch3r · 39 tokens

sc:image-gen-prompting

Craft effective text-to-image prompts for AI generators (Higgsfield, Midjourney, DALL·E/GPT-Image, Stable Diffusion, Flux). Subject + style + composition + lighting structure, negative prompts, aspect ratios, model-specific tips, and Hebrew→English prompt translation. Activate for: generate image, AI art, product…

squadcodercom/squadcoder · 95 tokens

system-prompts

Write system prompts, tool docs, and agent definitions. Project tag conventions + RFC 2119 keywords + dense compression. Use when authoring or editing any prompt the model reads.

can1357/oh-my-pi · 40 tokens

tool-prompt-optimization

Optimize the description prompts an AI agent reads to learn its built-in tools (the .md files under prompts/tools/). Two halves: (1) measure how much of a prompt is already inferable from the tool's JSON parameter schema + name, to prune redundancy with evidence; (2) house authoring rules for what belongs in a tool…

can1357/oh-my-pi · 0 tokens

v4-best-practices

Use when working with deepseek-v4-pro or deepseek-v4-flash in thinking mode on multi-step or plan-driven tasks. Provides rules to prevent stale references, unverified plan assumptions, and vague plan output.

Hmbown/CodeWhale · 51 tokens

gemini-api-dev

Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, speech generation (TTS), voice design, voice replication, streaming responses, background research tasks, function calling, structured output, or migrating from…

google-gemini/gemini-skills · 85 tokens