Autoresearch logo

Autoresearch

Community
fortunto2
autoresearch

Self-improving optimization via Karpathy autoresearch pattern. Generates → evaluates → scores → mutates prompts/descriptions in a loop. Targets — tool-selection, system-prompt, skill, decision-parser. Use when "optimize tools", "autoresearch", "improve skill X", "self-improve prompts", "optimize tool descriptions".

Overview

Publisherfortunto2
Repositoryrust-code
Skill nameautoresearch
Stars
46
Forks
12
Bundled files
6
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by fortunto2 on GitHub. Read the source before you install it.

Installation

Install the Autoresearch AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/fortunto2/rust-code/tree/master/skills/autoresearch
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fortunto2/rust-code.git /tmp/rust-code
mkdir -p .claude/skills
cp -r /tmp/rust-code/skills/autoresearch .claude/skills/autoresearch
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Autoresearch in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Autoresearch on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Autoresearch is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

/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

TargetWhat it optimizesEval metric
tool-selectionTool descriptions in agent% correct tool chosen for 66 test tasks
system-promptAgent system prompt (SOUL.md)Decision quality: right tool + coherent reasoning (4 criteria)
skillAny SKILL.md fileBinary criteria pass rate (4 criteria)
decision-parserStructured output schemaParse success + field quality (5 criteria)

Usage (Rust API)

rust
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)

bash
# 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)

Environment

  • GEMINI_API_KEY — for generation (tests with same model the agent uses)
  • ANTHROPIC_API_KEY — for evaluation and mutation (different model for objectivity)

Tips

  • Binary evals — yes/no criteria work best. Avoid Likert scales.
  • Don't over-constrain — too many narrow criteria → model games the eval.
  • 10-20 cycles usually enough for significant improvement.
  • Apply results — best prompt saved to data/<target>/best_prompt.txt.

Cost

  • Tool selection: ~$0.05/cycle (cheap — one LLM call per test, string match eval)
  • System prompt: ~$0.20/cycle (gen + LLM eval per test)
  • Skill: ~$0.30/cycle (gen + LLM eval per test, longer outputs)
  • Decision parser: ~$0.15/cycle (gen + partial local eval)
  • 20 cycles ≈ $1-6 depending on target. Permanent improvement.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Autoresearch AI skill do?

Self-improving optimization via Karpathy autoresearch pattern. Generates → evaluates → scores → mutates prompts/descriptions in a loop. Targets — tool-selection, system-prompt, skill, decision-parser. Use when "optimize tools", "autoresearch", "improve skill X", "self-improve prompts", "optimize tool descriptions".

Why use Autoresearch on TypingMind?

Because you install it once and use it with any model. Autoresearch is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Autoresearch in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/fortunto2/rust-code/tree/master/skills/autoresearch. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Autoresearch?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Autoresearch?

As many as you like. As long as a model supports skills, you can use Autoresearch with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Autoresearch AI skill free?

Yes. It is published on GitHub by fortunto2 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇