By dososo
A long-running workflow skill for Codex, Claude Code, Cursor, and coding agents: contracts, disk state, traces, restarts, scoring, and cleanup.
npx claudepluginhub dososo/agent-loop-skillA workflow skill for long-running Codex, Claude Code, Cursor, and AI agent tasks with contracts, disk-backed state, role separation, verification traces, restarts, subjective scoring, and cleanup.
English | 简体中文
A practical skill for long-running AI agent work: contracts, disk-backed state, role separation, verification traces, restart criteria, subjective scoring, and cleanup.
Inspired by Andrej Karpathy's public notes on agents that run for long stretches, this package turns the loop idea into a reusable workflow for Codex, Claude Code, Cursor, and other coding agents.
This repository packages the workflow as a Codex/OpenAI skill, an AGENTS.md project instruction file, a Claude Code plugin, a CLAUDE.md project instruction file, and a Cursor project rule.
Long agent tasks usually fail because the harness is weak, not because the model cannot write code. A capable agent still needs a loop:
The goal is not a longer prompt. The goal is a shorter, repeatable loop that can survive failures, context loss, and multi-day work.
agent-loop-skill/
├── README.md
├── README.zh.md
├── AGENTS.md
├── CODEX.md
├── CLAUDE.md
├── CURSOR.md
├── EXAMPLES.md
├── .claude-plugin/
│ ├── marketplace.json
│ └── plugin.json
├── .cursor/rules/
│ └── agent-loop-skill.mdc
├── skills/agent-loop-skill/
│ ├── SKILL.md
│ └── agents/openai.yaml
├── templates/
│ ├── contract.md
│ ├── progress.md
│ ├── log.md
│ ├── scorecard.md
│ └── state.json
├── scripts/
│ └── init-agent-loop.sh
└── docs/
└── source-note.md
Copy the skill folder into your local Codex skills directory:
mkdir -p ~/.codex/skills
cp -R skills/agent-loop-skill ~/.codex/skills/agent-loop-skill
For a single project, you can also use AGENTS.md directly:
curl -o AGENTS.md https://raw.githubusercontent.com/dososo/agent-loop-skill/main/AGENTS.md
See CODEX.md for Codex-specific usage.
From Claude Code:
/plugin marketplace add dososo/agent-loop-skill
/plugin install agent-loop-skill@agent-loop-skill
New project:
curl -o CLAUDE.md https://raw.githubusercontent.com/dososo/agent-loop-skill/main/CLAUDE.md
Existing project:
printf "\n" >> CLAUDE.md
curl https://raw.githubusercontent.com/dososo/agent-loop-skill/main/CLAUDE.md >> CLAUDE.md
Copy the Cursor rule into your target project:
mkdir -p .cursor/rules
curl -o .cursor/rules/agent-loop-skill.mdc https://raw.githubusercontent.com/dososo/agent-loop-skill/main/.cursor/rules/agent-loop-skill.mdc
See CURSOR.md for details.
Inside a target project:
bash scripts/init-agent-loop.sh
This creates:
.agent-loop/contract.md
.agent-loop/progress.md
.agent-loop/log.md
.agent-loop/scorecard.md
.agent-loop/state.json
.agent-loop/traces/
The required files are contract.md, progress.md, and log.md. The rest are optional helpers.
Use the agent-loop-skill for this project. Write the contract first, store state in .agent-loop, separate Planner/Generator/Evaluator, verify each round with traces, and restart if the same acceptance item fails twice.
This is an independent implementation of loop-based agent workflow ideas inspired by Andrej Karpathy's public notes on long-running agents. See docs/source-note.md.
MIT
7-day visitors to each marketplace page
Matt Pocock's skills for real engineering, as an installable Claude Code plugin.
Development marketplace for Superpowers core skills library
Harness-native ECC skills, hooks, rules, MCP conventions, and operator workflows