Run or manage the SkillOpt-Sleep self-evolution cycle (review past sessions, replay tasks through a selected backend, consolidate validated memory + skills, or
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-skillopt-263815344237 ,按照其中的说明把「skillopt-sleep」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
You are driving SkillOpt-Sleep: a tool that lets this user's Claude agent
improve from past usage by reviewing sessions, replaying recurring tasks, and
consolidating what it learns into validated memory (CLAUDE.md) and skills
(SKILL.md). With the default gate enabled, a change is kept only if it improves
a held-out replay score. Nothing live is modified until adoption unless the
user explicitly requests --auto-adopt.
(If $ARGUMENTS is empty, treat it as status.)
The engine is the skillopt_sleep Python package in this repo. Split
$ARGUMENTS into the first action token and its remaining options, then use the
plugin's bundled runner so the right interpreter and repo are on the path.
Preserve the user's remaining options (for example --preferences, --backend,
or --target-skill-path) instead of silently dropping them:
"${CLAUDE_PLUGIN_ROOT}/scripts/sleep.sh" <action> --project "$(pwd)" --scope invoked <remaining options>
<action> is one of:
| action | what it does |
|---|---|
status | show how many nights have run + the latest staged proposal (READ-ONLY) |
dry-run | harvest → mine → replay → report, but stage nothing (no-staging preview) |
run | full cycle: stage a validation report and any accepted proposal; only explicit --auto-adopt may also update live files |
adopt | apply the latest staged proposal to live CLAUDE.md / SKILL.md (backs up first) |
harvest | debug: print the recurring tasks mined from recent sessions |
schedule | install a nightly cron entry for this project (--hour --minute, off-:00 by default) |
unschedule | remove the nightly cron entry (--all to remove every managed entry) |
Default backend is mock (deterministic, no API spend). To use real budget for
model-driven optimization, add --backend claude or --backend codex. An
accepted gain is evidence on this run's held-out tasks, not a guarantee of
general improvement; results depend on the tasks, model, and checks. To steer
what the optimizer writes, add --preferences "<your house rules>".
run: if it prints a staging directory, Read its report.md and
show the user:
dry-run: no staging directory or report.md is created. Summarize
the score, gate decision, and edits from stdout (or request --json when
machine-readable output is useful).run that produced an accepted proposal: inspect whether stdout says
it was auto-adopted. If not, tell the user nothing live changed, run or cite
status, and offer the exact reviewed mode: adopt --legacy, repeatable
adopt --skill NAME, or adopt --all-skills. Never imply that bare adopt
means “adopt everything.” If it was auto-adopted, report the updated paths
and any still-pending fan-out names explicitly.adopt: confirm which live files were updated and that backups were
written under the staging dir's backup/.CLAUDE.md or SKILL.md yourself — let the engine's explicit
adopt or user-requested --auto-adopt path apply its manifest and backup
behavior. Respect the review gate.~/.claude. Replay in mock mode runs no
shell side effects.mock or first run harvest --output <file>, review/redact the file, set
"reviewed": true, and then pass it with --tasks-file.schedule manages a cron entry when crontab is available; otherwise it
prints a line for manual installation.