
SkillOpt-Sleep Self-Improvement
Lets Codex review past sessions overnight and propose validated edits to its skills and memory
- Repository
- microsoft/SkillOpt
- Stars
- 18,813
- Licence
- MIT
- Files
- 1 file
What it does
This skill teaches a Codex coding agent to run a background 'sleep' cycle. It reads your past local Codex sessions, finds recurring tasks, re-runs them through a chosen backend, and proposes bounded edits to a configured skill and the project's CLAUDE.md. Changes are staged for review, and with the default gate only edits that improve a held-out validation score are kept. Live files change only when you explicitly adopt them or request auto-adopt.
Great for
- Developers who use Codex heavily and want its project instructions and skills refined from real usage
- Teams experimenting with scheduled, offline self-optimization of agent skills
- People comfortable running shell scripts and reviewing staged proposals before adoption
Skip it if
- Users who want a quick one-off answer, since the cycle can take time and consume model budget when using the codex, claude, or azure_openai backends (the mock backend spends no API budget)
- Anyone unwilling to review staged changes, because auto-adopt can overwrite live skill and CLAUDE.md files (backups are kept for existing targets)
- Sensitive projects where past session transcripts should not be read or sent to model backends, since it reads local transcripts and may send them to external services
Try asking
- “Run a dry-run of SkillOpt-Sleep against my recent Codex sessions using the mock backend before anything else”
- “Harvest my past Codex sessions and show me the recurring tasks it finds for my example skill”
- “Schedule a nightly Codex sleep cycle at 3:17 for this project and stage proposals for review”
- “Show the status of my last SkillOpt-Sleep run and adopt only the proposals for the skill I selected”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the MIT licence and an attribution note.
skillopt-sleep.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip skillopt-sleep.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip skillopt-sleep.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Always start with a dry-run using --backend mock and check status before a real run with --backend codex.
- Set an explicit --target-skill-path to a .agents skill so the result is visible to Codex, and select skills with --skill NAME rather than adopting everything.
- Review staged proposals under <project>/.skillopt-sleep/staging before adopting, and treat accepted held-out gains as run-specific rather than guaranteed.
What's inside
- SKILL.md
Redistributed unmodified from microsoft/SkillOpt under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.