codex-autoresearch

作者 leo-lilinxiao已验证

Codex Autoresearch Skill — A self-directed iterative system for Codex that continuously cycles through: modify, verify, retain or discard, and repeat indefinitely. Inspired by Karpathy’s autoresearch concept.

2,204
Stars
123
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/leo-lilinxiao/codex-autoresearch

快速入门

使用 codex-autoresearch 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

Tell Codex what measurable result you want. Codex inspects the repository, confirms the experiment with you, changes one thing, verifies it, keeps improvements, reverts failures, and repeats until the target is reached.

Autoresearch works for test failures, coverage, type errors, warnings, latency, binary size, reproducible security findings, and any other outcome a command can measure.

Quick Start

Install from Codex:

$skill-installer install https://github.com/leo-lilinxiao/codex-autoresearch

Open a clean Git repository with Full Access:

codex --dangerously-bypass-approvals-and-sandbox

Then invoke the skill:

You:   $codex-autoresearch
       Reduce `python3 scripts/score.py` error_count to 0.

Codex: Baseline: 5
       Target: 0 (lower is better)
       Scope: src/
       Verify: python3 scripts/score.py, JSON key error_count
       Guard: python3 -m pytest -q
       Run in foreground or background?

You:   Background. Go.

Codex launches the confirmed run. No Codex configuration changes or special prompt syntax are required.

See Installation for manual and development installs.

The Loop

inspect evidence
      |
change one focused thing
      |
commit and measure
      |
      +-- improved + guard passes --> keep
      |
      +-- otherwise ---------------> revert
      |
append an audit event
      |
repeat until target

The control script owns commits, verification, rollback, and state. Codex owns the hypotheses and code changes.

Foreground And Background

Foreground Background

Runs in Current Codex task Detached controller

Continuation Official Codex Goal One codex exec worker per iteration

Best for Watching and steering live Long or overnight runs

Control Codex Goal pause/resume Ask $codex-autoresearch for status, stop, or resume

Foreground and background use the same experiment rules. A run uses one mode at a time. Foreground continuation uses a Codex Goal; background continuation belongs to the detached controller.

What Gets Confirmed

Before the first write, Codex shows:

  • the goal and numeric target;

  • repository-relative paths it may change;

  • the metric command and explicit parser;

  • an optional regression guard;

  • foreground or background mode;

  • an optional iteration limit.

Initialization requires a clean named Git branch. One run manages one repository.

Results

Run artifacts live in autoresearch-results/ and stay uncommitted:

Path Purpose

run.json Immutable confirmed configuration

events.jsonl Append-only baseline, iteration, stop, and completion history

logs/ Full metric, guard, and background worker output

runtime.json Background process state

runtime.log Background controller lifecycle events

report.html Optional, regenerated visual snapshot

events.jsonl is the state history. Missing, malformed, contradictory, or partial state is an error; the skill never guesses a result from old files or conversational memory.

Review Results

Ask the skill to show the validated experiment history:

$codex-autoresearch show experiment history
Codex Autoresearch
Run: 0a516883  Status: complete  Mode: foreground
Metric: error_count  2 -> 0  Target: 0 (lower is better)

SEQ  ITER  EVENT     PREVIOUS  TRIAL  RETAINED  DESCRIPTION
---  ----  --------  --------  -----  --------  ------------------------------------
  0     0  baseline         -      -         2  Initial measurement
  1     1  discard          2      3         2  Broaden parser fallback
  2     2  keep             2      1         1  Fix nested parser branch
  3     3  keep             1      0         0  Remove final parser error
  4     3  complete         -      -         0  retained metric satisfies the target

The same validated events can be exported as TSV or rendered as a self-contained static report:

$codex-autoresearch export experiment history as TSV
$codex-autoresearch generate an HTML report

The report is written to autoresearch-results/report.html. It is a replaceable snapshot, not runtime state.

Safety Model

  • Every trial is a Git commit.

  • A non-improving trial or failed guard is reverted with git revert.

  • Out-of-scope edits, branch changes, HEAD drift, malformed metrics, command failures, timeouts, and generated byproducts stop the run with an exact error and log path.

  • Autoresearch artifacts are never staged.

  • A run reports complete only when the retained metric reaches the confirmed target.

  • A genuine external blocker is reported explicitly; a difficult or unsuccessful hypothesis is not treated as blocked.

This strictness is intentional. Silent recovery makes long autonomous runs impossible to trust.

Good Metrics

The verify command must exit successfully and place one finite number on its final non-empty stdout line. It may instead print a JSON object on that line when Codex names one numeric key explicitly.

7
{"error_count": 7, "passed": 12}

Use a guard for behavior the metric does not protect, such as a test suite around a latency benchmark. The guard must pass at baseline.

Documentation

Guide Contents

Installation Install, update, and verify the skill

User Guide Configuration, lifecycle, state, and troubleshooting

Examples Practical prompts and metric patterns

Contributing Architecture and validation for contributors

FAQ

Does installation change my Codex settings?

No. Installation copies the skill files. Use a current Codex release so foreground runs can use the built-in Goal capability.

Why Full Access?

Each iteration creates or reverts a Git commit. Restricted sandboxes may block writes under .git. Background runs therefore default to Full Access; workspace-write remains an explicit option when its limitations are acceptable.

Can I stop and resume?

Yes. Interrupt or pause a foreground Goal. For background, invoke $codex-autoresearch and ask for status, stop, or resume with a new direction.

Can it run without Git or across several repos?

No. Git is the experiment memory and rollback boundary. Use one run per repository so commit ownership and metrics remain unambiguous.

Is this only for small changes?

No. One experiment should test one coherent hypothesis. Its size should match the hypothesis, while still being independently measurable and reversible.

Acknowledgments

Inspired by Karpathy's autoresearch, generalized for Codex and software repositories.

Citation

@misc{codex-autoresearch,
  author = {Li, Linxiao},
  title = {Codex Autoresearch: Autonomous Goal-Driven Experimentation for Codex},
  year = {2026},
  publisher = {GitHub},
  url = {https://github.com/leo-lilinxiao/codex-autoresearch}
}

GitHub also reads CITATION.cff for its Cite this repository menu.

Star History

License

MIT, see LICENSE.

常见问题

What is codex-autoresearch?

codex-autoresearch is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by leo-lilinxiao. Codex Autoresearch Skill — A self-directed iterative system for Codex that continuously cycles through: modify, verify, retain or discard, and repeat indefinitely. Inspired by Karpathy’s autoresearch concept. It has 2,204 GitHub stars.

Is codex-autoresearch safe to use?

Yes. codex-autoresearch passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install codex-autoresearch?

Clone the repository with "git clone https://github.com/leo-lilinxiao/codex-autoresearch" and add it to your Claude Code skills directory (see the Installation section above). codex-autoresearch ships a SKILL.md manifest, so compatible agents can discover and load it automatically.

What programming language is codex-autoresearch written in?

codex-autoresearch is primarily written in Python. It is open-source under leo-lilinxiao on GitHub, so you can review or fork the full source.

Are there alternatives to codex-autoresearch?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh codex-autoresearch against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情