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.
# Add to your Claude Code skills
git clone https://github.com/leo-lilinxiao/codex-autoresearchGuides for using ai agents skills like codex-autoresearch.
Last scanned: 5/4/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-04T06:42:28.449Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}See how codex-autoresearch compares with popular alternatives.
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,662 GitHub stars.
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.
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.
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.
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.
No comments yet. Be the first to share your thoughts!
Based on votes and bookmarks from developers who liked this skill
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Improve a repository through repeated, reversible experiments:
hypothesize -> change -> measure -> learn -> keep or revert -> repeat
Codex chooses hypotheses and makes code changes. The control script owns measurement, commits, rollback, and the event history.
Resolve <control> to this skill's own scripts/autoresearch.py; do not assume it is installed in the target repository.
For a status or results request, run the corresponding command directly:
| Request | Command |
|---|---|
| Status | python3 <control> status --repo <repo> |
| History | python3 <control> history --repo <repo> |
| TSV export | python3 <control> history --repo <repo> --format tsv |
| HTML report | python3 <control> report --repo <repo> |
Report the requested result without starting or resuming experiments. Return the generated path for an HTML report.
Before starting or resuming an experiment, read the applicable workflow unless it is already in context:
complete, no Goal is needed.finish to finalize each coherent experiment. Do not manually commit, revert, or edit run artifacts during an active run.complete; an iteration limit, error, or external blocker has its own status.Foreground continuation belongs to the official Codex Goal. Background continuation belongs to the detached controller. An already launched background worker follows its supplied experiment contract, without starting a new launch flow.
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.
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: none
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.
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 | 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.
Before the first write, Codex shows:
Initialization requires a clean named Git branch. One run manages one repository.
Codex reuses choices and approval you have already given. Once the experiment is confirmed, it keeps working without asking you to approve each iteration.
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.
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.
git revert.complete only when the retained metric reaches the confirmed target.This strictness is intentional. Silent recovery makes long autonomous runs impossible to trust.
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.
| 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 |
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. A new direction is optional; "resume" continues the confirmed experiment.
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.
Inspired by Karpathy's autoresearch, generalized for Codex and software repositories.
@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.
MIT, see LICENSE.