Skip to content
SkillModel-led2,241 tokens in use

SkillOpt Sleep for Codex

Gives Codex a sleep cycle: it reviews past sessions, replays recurring tasks and stages skill and CLAUDE.md edits that pass a held-out score gate.

19,169 stars on the repository MIT Licensemicrosoft/SkillOpt · plugins/codex/skills/skillopt-sleep

Skill label

measured from its files

What installing SkillOpt Sleep for Codex costs

107tokens idle
2,241tokens in use

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

shelldetected

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter12/15
  • Structure25/25
  • Examples15/15
  • Output15/15
  • Size13/15
  • Resources10/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent
  • Runs shell commands−5

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 55

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity96
  • Maintenance84
  • Community68
  • Maturity28
  • Momentum40

SkillOpt Sleep for Codex runs the skillopt_sleep engine against local Codex sessions. It mines recurring tasks, replays them under your current skill, and proposes bounded edits to a Codex skill you name with a target path.

With the default gate on, only edits that raise a held-out score are kept. Proposals are staged for review and live files change only on explicit adoption, with backups.

What You Get

  • Run actions for status, harvest, dry-run, run, adopt, schedule and unschedule
  • Runner scripts for macOS and Linux (shell) and for Windows (CMD and PowerShell)
  • A mock backend for a first smoke check, plus claude, codex, copilot, handoff and azure_openai backends
  • Staged proposals with a report, so the agent can show baseline and candidate scores and the exact edits

Common Use Cases

  • Teach a Codex skill from the tasks you repeat across sessions
  • Schedule a nightly run for a Codex-targeted skill after setting the transcript source and target path in the config file
  • Dry-run with the mock backend to check the setup without spending budget
  • Run on a Windows machine through the PowerShell or CMD runner

What Makes It Unique

This variant is written around Codex limits. It requires an explicit target skill path, warns that the shared engine would otherwise write a Claude-managed skill, and notes that the scheduler does not remember the source or target path, so they go into the config file first. It cites one recorded benchmark run and states it is evidence for that setup only.

Under The Hood

The skill is prose that tells the agent to run a bundled runner script (run-sleep.sh, or the Windows CMD and PowerShell equivalents) located through the SKILLOPT_SLEEP_REPO variable, which starts the Python skillopt_sleep engine. It reads archived Codex sessions from the Codex home folder, read-only, and removes secret-shaped strings before use, though the skill says this is not a guarantee. A real backend sends truncated task content to its provider. Runs write staging files in the project, adopt overwrites the target skill and project CLAUDE.md after a backup, and schedule installs a nightly cron entry. The validation example also runs a benchmark script that needs an external eval data folder.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers