跳到正文
Skillpedia
智能体8.2k · #12522

autoresearch-create

它能做什么

这项技能为你选定的目标(例如速度或体积)设置一个重复的测试与改进循环。适合希望 AI 不断尝试小改动并测量结果的人。

适用场景

  • ✓当你想通过尝试大量改动来优化某件事(例如程序的运行速度)时。
  • ✓当你要求 AI 运行 autoresearch,或对某个目标开始实验时。
  • ✓当你希望测量结果保存在日志中,而不是靠猜测时。

技能链接

https://github.com/davebcn87/pi-autoresearch/blob/main/skills/autoresearch-create/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davebcn87/pi-autoresearch/blob/main/skills/autoresearch-create/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请设置 autoresearch,让我的排序函数运行得更快,并在它持续改进时继续进行。”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能首先询问要测量什么,然后在名为 .auto 的文件夹中保存计划和测量脚本。它会运行每个想法,记录结果,保留改进,并撤销失败的尝试。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Autoresearch

Autonomous experiment loop: try ideas, keep what works, discard what doesn't, never stop.

Tools

  • init_experiment — configure session (name, metric, unit, direction). Call again to re-initialize with a new baseline when the optimization target changes.
  • run_experiment — runs command, times it, captures output.
  • log_experiment — records result. keep auto-commits. discard/crash/checks_failed auto-reverts code changes (autoresearch files preserved). Always include secondary metrics dict. Dashboard: ctrl+shift+t.

Session files

All session files live in a single .auto/ subfolder at the working directory root. This keeps everything in one place — easy to preserve across reverts, gitignore, and clean up.

File Purpose
.auto/prompt.md Experiment prompt / playbook (heart of the session)
.auto/measure.sh Benchmark script — emits METRIC name=value lines
.auto/log.jsonl Append-only result log (written by the tools)
.auto/ideas.md Ideas backlog (optional)
.auto/checks.sh Correctness checks (optional)
.auto/config.json Session config (optional)
.auto/hooks/{before,after}.sh Lifecycle hooks (optional)

Always create files in the .auto/ layout. Legacy flat autoresearch.* files are still read for in-flight sessions, but new sessions should use .auto/.

Setup

  1. Ask (or infer): Goal, Command, Metric (+ direction), Files in scope, Constraints.
  2. git checkout -b autoresearch/<goal>-<date>
  3. Read the source files. Understand the workload deeply before writing anything.
  4. mkdir -p .auto, then write .auto/prompt.md and .auto/measure.sh (see below). Commit both.
  5. init_experiment → run baseline → log_experiment → start looping immediately.

.auto/prompt.md

This is the heart of the session. A fresh agent with no context should be able to read this file and run the loop effectively. Invest time making it excellent.

# Autoresearch: <goal>

## Objective
<Specific description of what we're optimizing and the workload.>

## Metrics
- **Primary**: <name> (<unit>, lower/higher is better) — the optimization target
- **Secondary**: <name>, <name>, ... — independent tradeoff monitors

## How to Run
`./.auto/measure.sh` — outputs `METRIC name=number` lines.

## Files in Scope
<Every file the agent may modify, with a brief note on what it does.>

## Off Limits
<What must NOT be touched.>

## Constraints
<Hard rules: tests must pass, no new deps, etc.>

## What's Been Tried
<Update this section as experiments accumulate. Note key wins, architectural
insights, and discarded ideas: why they failed and what would justify revisiting them.>

Update .auto/prompt.md periodically — especially the "What's Been Tried" section — so resuming agents have full context.

.auto/measure.sh

Bash script (set -euo pipefail) that: pre-checks fast (syntax errors in <1s), runs the benchmark, and outputs structured lines to stdout. Keep the script fast — every second is multiplied by hundreds of runs.

For fast, noisy benchmarks (< 5s), run the workload multiple times inside the script and report the median. This produces stable data points and makes the confidence score reliable from the start. Slow workloads (ML training, large builds) don't need this — single runs are fine.

Structured output

  • METRIC name=value — primary metric (must match init_experiment's metric_name) and any secondary metrics. Parsed automatically by run_experiment.

Design the script to inform optimization

The script should output whatever data helps you make better decisions in the next iteration. Think about what you'll need to see after each run to know where to focus:

  • Phase timings when the workload has distinct stages
  • Error counts, failure categories, or test names when checks can fail in different ways
  • Memory usage, cache hit rates, or other runtime diagnostics when relevant
  • Anything domain-specific that would help localize regressions or identify bottlenecks

The script runs the same code every iteration — but you can update it during the loop if you discover you need more signal. Add instrumentation as you learn what matters.

Agent-supplied ASI via log_experiment

Use log_experiment's asi parameter to annotate each run with whatever would help the next iteration make a better decision. Free-form key/value pairs — you de

常见问题

开始之前我需要提供什么?

它需要一个优化目标和一种测量方式,并会帮你设置这两者。

它会撤销我的代码改动吗?

被丢弃或失败的实验会自动撤销,而保留的实验则会被提交。

它如何跟踪结果?

每次运行都会写入 .auto 文件夹中的日志,因此你可以回顾尝试过的内容。

详情

作者的原始描述

Set up and run an autonomous experiment loop for any optimization target. Gathers what to optimize, then starts the loop immediately. Use when asked to "run autoresearch", "optimize X in a loop", "set up autoresearch for X", or "start experiments".

repo: davebcn87/pi-autoresearch

热度

GitHub 星标
8.2k
排名
#12522
许可证
MIT
更新时间
2026/10/7

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能