skillopt-sleep
Skill này làm gì
Rà soát các phiên Codex cục bộ trước đây của bạn, tìm các tác vụ lặp lại và đề xuất cải tiến cho một skill. Dành cho người muốn agent Codex của mình tự tốt hơn từ lịch sử làm việc mà không phải viết lại thủ công.
Khi nào nên dùng
- ✓Khi bạn muốn agent Codex học từ các phiên trước đó.
- ✓Khi bạn muốn rà soát các tác vụ lặp lại hằng đêm hoặc theo yêu cầu.
- ✓Khi bạn muốn kiểm tra hoặc áp dụng một thay đổi skill được đề xuất.
Liên kết skill
https://github.com/microsoft/SkillOpt/blob/main/plugins/codex/skills/skillopt-sleep/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Rà soát các phiên Codex trước đây của tôi và đề xuất cải tiến cho skill dự án, nhưng chưa thay đổi gì trực tiếp.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill thu thập các bản ghi phiên cục bộ, khai thác tác vụ lặp lại, phát lại chúng và đề xuất thay đổi. Thay đổi chỉ được giữ khi cải thiện điểm trên một tập giữ lại, và không có gì trực tiếp thay đổi cho đến khi bạn áp dụng đề xuất.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
SkillOpt-Sleep: usage-driven self-evolution for a local Codex agent
SkillOpt-Sleep gives the user's Codex agent a sleep cycle. On demand or on a
nightly schedule, it reviews past local sessions, re-runs recurring tasks
through the selected backend, and proposes changes to a configured skill and to
the project's CLAUDE.md. With the default validation gate enabled, it keeps
only changes that improve a held-out score. Live files change only through
explicit adoption or a user-requested --auto-adopt. There is no model-weight
training.
The current shared engine does not write AGENTS.md. For a Codex-visible
result, always select a Codex skill explicitly with --target-skill-path (for
example .agents/skills/<name>/SKILL.md). If project CLAUDE.md is not a
desired secondary target, set "evolve_memory": false in
~/.skillopt-sleep/config.json before running.
When to use
Trigger when the user wants any of:
- Codex to learn from past sessions or get better the more they use it;
- a nightly/scheduled or on-demand sleep/dream/offline self-improvement run;
- to review past sessions and distill recurring tasks;
- to consolidate feedback into memory or managed skills;
- to run
status,harvest,dry-run,run, oradoptfor SkillOpt-Sleep.
The cycle
- Harvest - read local session transcripts according to the engine configuration and normalize them into session digests.
- Mine - turn digests into recurring
TaskRecords with outcomes and checkable references where possible. - Replay - re-run mined tasks through the selected backend under the current skill and memory.
- Consolidate - reflect on failures and propose bounded edits.
- Gate - with the default gate enabled, accept edits only when the held-out validation score improves.
- Stage - write the proposal under
<project>/.skillopt-sleep/staging/<date>/; nothing live changes. - Adopt - explicitly, or through user-requested auto-adopt, copy staged files over live files with backups for existing targets.
How to drive it
Invoke the bundled runner via shell (Codex exec has shell access). The runner
finds the engine and a Python >= 3.10 automatically.
# point at the repo if it isn't auto-detected from CWD:
export SKILLOPT_SLEEP_REPO=/path/to/SkillOpt
TARGET_SKILL=.agents/skills/example/SKILL.md
bash "$SKILLOPT_SLEEP_REPO/plugins/run-sleep.sh" status --project "$(pwd)"
bash "$SKILLOPT_SLEEP_REPO/plugins/run-sleep.sh" harvest --project "$(pwd)" \
--source codex --target-skill-path "$TARGET_SKILL"
bash "$SKILLOPT_SLEEP_REPO/plugins/run-sleep.sh" dry-run --project "$(pwd)" \
--source codex --target-skill-path "$TARGET_SKILL" --backend mock
bash "$SKILLOPT_SLEEP_REPO/plugins/run-sleep.sh" run --project "$(pwd)" \
--source codex --target-skill-path "$TARGET_SKILL" --backend codex \
--max-sessions 5 --max-tasks 3 --progress
bash "$SKILLOPT_SLEEP_REPO/plugins/run-sleep.sh" status --project "$(pwd)"
bash "$SKILLOPT_SLEEP_REPO/plugins/run-sleep.sh" adopt --project "$(pwd)" --legacy
For a fan-out night, select reviewed proposals with repeatable
--skill NAME or --all-skills; do not treat bare adopt as “adopt everything.”
On Windows (CMD / PowerShell):
:: CMD
set SKILLOPT_SLEEP_REPO=C:\path\to\SkillOpt-Sleep
"%SKILLOPT_SLEEP_REPO%\plugins\run-sleep.cmd" status --project "%CD%"
# PowerShell
$env:SKILLOPT_SLEEP_REPO = "C:\path\to\SkillOpt-Sleep"
powershell -File "$env:SKILLOPT_SLEEP_REPO\plugins\run-sleep.ps1" status --project "$(pwd)"
Actions are status, harvest, dry-run, run, adopt, schedule, and unschedule.
- Default backend is
mock, which is deterministic and spends no API budget. --backend codexuses the user's Codex budget for model-driven optimization. An accepted held-out gain is run-specific evidence, not a guarantee of broader improvement; results depend on the tasks, model, and checks.--source codexreads Codex Desktop archived sessions from~/.codex/archived_sessions; use--codex-home /path/to/.codexif the archive lives elsewhere.--target-skill-pathis required for a Codex skill target. Without it, the shared default is a Claude-managed skill under~/.claude/skills/, not an.agentsskill.- Keep
dry-run --backend mockas the first smoke check unless the user explicitly asked for a real optimization run.
Scheduling
bash "$SKILLOPT_SLEEP_REPO/plugins/run-sleep.sh" schedu
Câu hỏi thường gặp
Nó có tự thay đổi tệp của tôi không?
Không. Tệp trực tiếp chỉ thay đổi khi bạn chủ động áp dụng đề xuất, trừ khi bạn yêu cầu tự động áp dụng.
Nó có huấn luyện mô hình không?
Không. Không có việc huấn luyện trọng số mô hình; nó chỉ sửa các tài liệu skill và bộ nhớ.
Nó có chạy nền được không?
Có. Nó có thể được lập lịch chạy nền, như mỗi đêm.
Chi tiết
Mô tả gốc của tác giả
Use when the user wants Codex to self-improve from past usage, asks about a nightly/offline 'sleep' or 'dream' cycle, wants Codex to review past sessions, learn preferences, consolidate memory/skills, run dry-run/run/adopt/status for SkillOpt-Sleep, or schedule background self-optimization. Drives the skillopt_sleep engine: harvest past sessions -> mine recurring tasks -> replay through a selected backend -> consolidate validated memory + skills behind a held-out gate.
repo: microsoft/SkillOpt
Độ phổ biến
- Sao GitHub
- 19k
- Vị trí xếp hạng
- #10500
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
skillopt-sleep
19kGiúp agent của bạn học từ các phiên Cursor gần đây, đề xuất cải tiến cho một skill dự án và chỉ giữ lại khi chúng có điểm tốt hơn.
skillopt-sleep
19kGiúp agent của bạn cải thiện từ việc dùng trước đây, rà soát phiên qua đêm và đề xuất thay đổi skill, bộ nhớ được kiểm tra bằng điểm giữ lại.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.