Watchmen Setup
firstbatchxyz/watchmen
Walks through installing watchmen, running its init wizard, wiring the plugin into Codex or Claude Code and checking the result with doctor.
Mines recurring tasks from recent local Cursor sessions, replays them to test bounded skill edits, and stages validated improvements to a project Cursor skill for review.
$ npx skills add microsoft/SkillOpt --skill skillopt-sleep -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install microsoft/SkillOpt skillopt-sleep --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/microsoft/SkillOpt.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/cursor/skills/skillopt-sleep .claude/skills/skillopt-sleep && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "skillopt-sleep" agent skill from https://github.com/microsoft/SkillOpt/tree/main/plugins/cursor/skills/skillopt-sleep into .claude/skills/skillopt-sleep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "skillopt-sleep", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/microsoft/SkillOpt/tree/main/plugins/cursor/skills/skillopt-sleepType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add microsoft/SkillOpt --skill skillopt-sleep -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install microsoft/SkillOpt skillopt-sleep --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/SkillOpt.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/cursor/skills/skillopt-sleep .agents/skills/skillopt-sleep && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "skillopt-sleep" agent skill from https://github.com/microsoft/SkillOpt/tree/main/plugins/cursor/skills/skillopt-sleep into .agents/skills/skillopt-sleep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "skillopt-sleep", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/SkillOpt --skill skillopt-sleep -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install microsoft/SkillOpt skillopt-sleep --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/SkillOpt.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/cursor/skills/skillopt-sleep .cursor/skills/skillopt-sleep && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "skillopt-sleep" agent skill from https://github.com/microsoft/SkillOpt/tree/main/plugins/cursor/skills/skillopt-sleep into .cursor/skills/skillopt-sleep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "skillopt-sleep", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/microsoft/SkillOpt.git --path plugins/cursor/skills/skillopt-sleep--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add microsoft/SkillOpt --skill skillopt-sleep -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install microsoft/SkillOpt skillopt-sleep --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/SkillOpt.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/cursor/skills/skillopt-sleep .gemini/skills/skillopt-sleep && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "skillopt-sleep" agent skill from https://github.com/microsoft/SkillOpt/tree/main/plugins/cursor/skills/skillopt-sleep into .gemini/skills/skillopt-sleep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "skillopt-sleep", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install microsoft/SkillOpt skillopt-sleepInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add microsoft/SkillOpt --skill skillopt-sleep -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/microsoft/SkillOpt.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/cursor/skills/skillopt-sleep .github/skills/skillopt-sleep && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "skillopt-sleep" agent skill from https://github.com/microsoft/SkillOpt/tree/main/plugins/cursor/skills/skillopt-sleep into .github/skills/skillopt-sleep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "skillopt-sleep", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/SkillOpt --skill skillopt-sleep -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install microsoft/SkillOpt skillopt-sleep --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/SkillOpt.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/cursor/skills/skillopt-sleep .opencode/skills/skillopt-sleep && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "skillopt-sleep" agent skill from https://github.com/microsoft/SkillOpt/tree/main/plugins/cursor/skills/skillopt-sleep into .opencode/skills/skillopt-sleep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "skillopt-sleep", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skillopt-sleepMines recurring tasks from recent local Cursor sessions, replays them to test bounded skill edits, and stages validated improvements to a project Cursor skill for review.
The engine reviews recent local Cursor session transcripts, mines recurring checkable task records, replays those tasks under the current skill and memory through a selected backend, reflects on failures to propose bounded edits, and with its default validation gate enabled, accepts a proposal only when it improves the held-out score; a normal run only stages the proposal for review, and nothing live changes until explicit adoption, since there is no model-weight training involved. The plugin has no session-end hook and no MCP server, so a cycle only runs when asked, and a recurring schedule is installed only on explicit request.
A fixed project-relative target, .cursor/skills/skillopt-sleep-learned/SKILL.md, must be passed via --target-skill-path on the harvest, dry-run and run commands, since without it the shared engine defaults to a Claude-managed skill location that is not the intended Cursor target; the same engine can also evolve the project's CLAUDE.md unless that is disabled in a separate config file. Three equivalent command paths run the engine, a Bash script on macOS or Linux, a PowerShell script on Windows, or an installed skillopt-sleep binary, and the skill insists on stopping rather than substituting a hand-written edit if none of them is available.
The seven-step workflow ends with staging accepted proposals under a timestamped folder and adopting them only after review, backing up the existing live target first.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 343db22. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
bashFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
SkillOpt-Sleep for Cursor loads about 2.4k tokens when it runs. Until then it costs about 97 tokens; SKILL.md has 1,026 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from microsoft/SkillOpt at commit 343db22, republished under its MIT licence (© microsoft). 1,026 words, ~2,428 tokens.
.claude/skills/skillopt-sleep/SKILL.md (or your agent's skills folder).SkillOpt-Sleep reviews recent local Cursor sessions, mines recurring tasks, replays those tasks, and proposes bounded improvements to a project Cursor skill. With the default gate enabled, a proposal is accepted only when it improves the held-out score. A normal run stages the proposal for review; nothing live changes until explicit adoption. There is no model-weight training.
This plugin has no session-end hook and no MCP server. Run the cycle only when the user asks, or install a schedule only when the user explicitly requests one.
Always use this project-relative target for Cursor-visible learning:
.cursor/skills/skillopt-sleep-learned/SKILL.mdPass it through --target-skill-path on harvest, dry-run, and run.
Without an explicit target, the shared engine uses a Claude-managed skill under
~/.claude/skills, which is not the intended Cursor project skill.
The shared engine can also evolve project CLAUDE.md. If that secondary memory
target is unwanted, set "evolve_memory": false in
~/.skillopt-sleep/config.json before running.
Use one of these supported command paths consistently:
bash "$SKILLOPT_SLEEP_REPO/plugins/run-sleep.sh" <action> ...powershell -File "$env:SKILLOPT_SLEEP_REPO\plugins\run-sleep.ps1" <action> ...skillopt-sleep <action> ...If SKILLOPT_SLEEP_REPO is not set and skillopt-sleep is unavailable, stop
and explain that the engine must be installed or a SkillOpt checkout must be
selected. Do not substitute a hand-written edit for the engine workflow.
<project>/.skillopt-sleep/staging/<timestamp>/.Use the installed-command form below, or replace skillopt-sleep with the
platform-specific source runner described above.
TARGET_SKILL=.cursor/skills/skillopt-sleep-learned/SKILL.md
# Inspect current state and the latest staged proposal.
skillopt-sleep status --project "$(pwd)"
# Inspect mined tasks without provider spend.
skillopt-sleep harvest --project "$(pwd)" --source cursor \
--target-skill-path "$TARGET_SKILL" --max-sessions 5 --max-tasks 3
# First smoke check: deterministic and no provider calls.
skillopt-sleep dry-run --project "$(pwd)" --source cursor --backend mock \
--target-skill-path "$TARGET_SKILL" --max-sessions 5 --max-tasks 3 --json
# Model-driven optimization through the authenticated Cursor Agent CLI.
skillopt-sleep run --project "$(pwd)" --source cursor --backend cursor \
--target-skill-path "$TARGET_SKILL" \
--max-sessions 5 --max-tasks 3 --progress
# Inspect selections, then apply the reviewed managed proposal.
skillopt-sleep status --project "$(pwd)"
skillopt-sleep adopt --project "$(pwd)" --legacyFor fan-out proposals, use repeatable --skill NAME or --all-skills after
review. Bare adopt deliberately refuses a night containing fan-out rows.
Actions are status, harvest, dry-run, run, adopt, schedule, and
unschedule.
mock, which is deterministic and makes no provider calls.--backend cursor uses the user's authenticated Cursor Agent CLI budget for
model-driven mining, replay, judging, and reflection.--source cursor reads
~/.cursor/projects/<workspace>/agent-transcripts/*/*.jsonl.--cursor-home PATH overrides the Cursor home used for harvesting.--scope invoked selects the current workspace; --scope all includes every
Cursor workspace.--cursor-path PATH or SKILLOPT_SLEEP_CURSOR_PATH selects a non-default
cursor-agent executable.--model NAME or SKILLOPT_SLEEP_CURSOR_MODEL overrides the Cursor model.cursor-agent --list-models; when cost matters,
verify the billed variant in Cursor's usage reporting.--max-sessions, --max-tasks, and --progress.The first harvest uses a 72-hour lookback. Use --lookback-hours N for a wider
initial window or --lookback-hours 0 for all available history. A stateful
run, including a no-task run, records a harvest checkpoint; later runs use the
checkpoint rather than the initial lookback. Inspect counts with harvest or
dry-run before the first real run because those actions do not advance state.
Available backends are:
mock - deterministic, with no provider calls (default);cursor - the authenticated Cursor Agent CLI;claude - the authenticated Claude CLI;codex - the authenticated Codex CLI;copilot - the authenticated GitHub Copilot CLI;handoff - prompt/answer files for an interactive agent session;azure_openai - the configured Azure OpenAI endpoint.SkillOpt reads the target skill and inserts its text into replay prompts; it does
not invoke the file as a native Cursor skill. Ordinary Cursor backend calls run
in a new empty temporary workspace in read-only Ask mode. File reads, file
writes, and MCP tools are denied. --project controls harvesting, target files,
state, and staging; it is not the Cursor Agent execution workspace.
Cursor tool-aware replay is temporarily disabled pending live Cursor
permission-boundary validation. A task containing a tool_called check fails
nonzero before Agent mode starts. The failed replay does not add a cache entry,
stage, adopt, persist state, or advance the harvest checkpoint. Use another
backend for those tasks. Do not claim that repository- or tool-dependent
behavior was validated. The current engine does not implement a fresh-worktree
replay for Cursor.
A real-backend dry-run still makes provider calls; it only suppresses staging.
Session and task limits are workload bounds, not hard limits on calls, tokens,
time, or money. Start with small limits.
Cursor harvesting retains user/assistant text, tool names, and explicit turn errors while excluding raw tool arguments, tool outputs, and non-message records. Known secret-shaped strings are redacted, but pattern-based redaction cannot guarantee that a transcript is safe to send to a provider.
For sensitive sessions, export tasks before any real-backend replay:
TARGET_SKILL=.cursor/skills/skillopt-sleep-learned/SKILL.md
skillopt-sleep harvest --project "$(pwd)" --source cursor \
--target-skill-path "$TARGET_SKILL" \
--max-sessions 5 --max-tasks 3 --output reviewed-tasks.jsonInspect and redact the file, then set its top-level "reviewed" field to
true. Only then run:
skillopt-sleep dry-run --project "$(pwd)" --backend cursor \
--tasks-file reviewed-tasks.json --progress --jsonReal backends reject task files that remain unreviewed. Never include raw transcripts, credentials, secrets, or sensitive task content in messages, commits, or generated summaries.
gate_no_regression is a config-only safeguard in
~/.skillopt-sleep/config.json. It defaults to false; set it to true to
reject a candidate when any validation task's configured gate score decreases.
Scheduling is opt-in. The scheduler persists project, backend, time, and the
optional auto-adopt flag, but not --source, Cursor path/home/model overrides,
or --target-skill-path. Before scheduling a Cursor cycle, set at least these values in
~/.skillopt-sleep/config.json:
{
"transcript_source": "cursor",
"target_skill_path": ".cursor/skills/skillopt-sleep-learned/SKILL.md",
"backend": "cursor"
}Then run:
skillopt-sleep schedule --project "$(pwd)" --backend cursor --hour 3 --minute 17
skillopt-sleep unschedule --project "$(pwd)"The scheduler uses cron on Unix and Task Scheduler on Windows. Scheduled runs
stage proposals by default. Use --auto-adopt only when the user has explicitly
requested unattended adoption.
For dry-run and run, report:
Read staged report.md before summarizing a run. Offer adoption only after the
user reviews an accepted proposal that is still staged. Never claim broad
improvement from one run.
CLAUDE.md as a substitute for adoption.© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/cursor/skills/skillopt-sleep of microsoft/SkillOpt.
Open the folder on GitHubat commit 343db22
SkillOpt-Sleep for Cursor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| SkillOpt-Sleep for Cursor this skillmicrosoft/SkillOpt | 18k | — | ~2.4k | Automated safety check: Pass | MIT | |
| Watchmen Setupfirstbatchxyz/watchmen | 297 | — | ~1.1k | Automated safety check: Notes | MIT | |
| Watchmen Setupfirstbatchxyz/watchmen | 297 | — | ~1.2k | Automated safety check: Notes | MIT | |
| Loopany Reflectsuperdesigndev/loopany | 140 | — | ~1.4k | Automated safety check: Pass | None | |
| OmniRoute Plugins, Skills and Memory CLIdiegosouzapw/OmniRoute | 74k | — | ~1k | Automated safety check: Pass | MIT | |
| Self-Refinement from CorrectionsdavidYichengWei/agentic-engineering-framework | 158 | — | ~575 | Automated safety check: Pass | MIT |
firstbatchxyz/watchmen
Walks through installing watchmen, running its init wizard, wiring the plugin into Codex or Claude Code and checking the result with doctor.
firstbatchxyz/watchmen
Sets up watchmen on the current machine: installs the CLI, hands off the init wizard, wires the plugin and statusline into Claude Code and Codex, and verifies with doctor.
superdesigndev/loopany
Runs a self-improvement loop for loopany: reads recent task outcomes and dismissed signals, finds patterns, writes learnings and skill proposals, and applies accepted ones.
diegosouzapw/OmniRoute
Command reference for the omniroute CLI's memory, plugin, marketplace and skills commands: search and manage stored memory, install and scaffold plugins, and find skill packages.
davidYichengWei/agentic-engineering-framework
Turns mistakes you correct into proposed updates to persistent Rules and Skills so the same error does not recur in later sessions, triggered automatically or with /reflect.
tigerless-labs/autoharness
Use when the user says /learn or asks to save this lesson.
microsoft/SkillOpt
Runs an on-demand or nightly sleep cycle that reviews past Claude Code sessions and proposes validated updates to CLAUDE.md and skills.
microsoft/SkillOpt
Runs a nightly or on-demand sleep cycle for a local Codex agent: review past sessions, replay recurring tasks and stage validated skill and memory edits for adoption.
microsoft/SkillOpt
Runs a usage-driven self-improvement cycle for the dsh agent: harvest past sessions, mine recurring tasks, replay them and stage validated skill edits.
microsoft/SkillOpt
Reference-only OpenClaw adaptation of SkillOpt-Sleep. Use it to study or port the contributed DeepSeek wrapper, not as a ready-to-run installation.
Categories
Mines recurring tasks from recent local Cursor sessions, replays them to test bounded skill edits, and stages validated improvements to a project Cursor skill for review. The engine reviews recent local Cursor session transcripts, mines recurring checkable task records, replays those tasks under the current skill and memory through a selected backend, reflects on failures to propose bounded edits, and with its default validation gate enabled, accepts a proposal only when it improves the held-out score; a normal run only stages the proposal for review, and nothing live changes until explicit adoption, since there is no model-weight training involved. The plugin has no session-end hook and no MCP server, so a cycle only runs when asked, and a recurring schedule is installed only on explicit request.
SkillOpt-Sleep for Cursor fits situations like: having Cursor learn from recent local sessions into a reusable project skill; running an offline consolidation pass over recurring Cursor tasks; reviewing and adopting a staged SkillOpt-Sleep skill proposal; checking SkillOpt-Sleep's status or scheduling a recurring harvest.
Run `npx skills add microsoft/SkillOpt --skill skillopt-sleep -a claude-code`. Or copy the skill folder (plugins/cursor/skills/skillopt-sleep in microsoft/SkillOpt) into .claude/skills/skillopt-sleep in your project. Claude Code loads it when a task matches its description.
Run `npx skills add microsoft/SkillOpt --skill skillopt-sleep -a codex`. Or copy the skill folder (plugins/cursor/skills/skillopt-sleep in microsoft/SkillOpt) into .agents/skills/skillopt-sleep in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/SkillOpt --skill skillopt-sleep -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/skillopt-sleep, .gemini/skills/skillopt-sleep, .github/skills/skillopt-sleep and .opencode/skills/skillopt-sleep in your project.
Going by SKILL.md and its folder, SkillOpt-Sleep for Cursor needs the command-line tools its instructions call (bash). Our summary lists: The skillopt-sleep engine installed, or a SkillOpt source checkout with SKILLOPT_SLEEP_REPO set; Local Cursor session transcripts.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
SkillOpt-Sleep for Cursor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with SkillOpt-Sleep for Cursor: Watchmen Setup (firstbatchxyz/watchmen, 297 stars), Watchmen Setup (firstbatchxyz/watchmen, 297 stars), Loopany Reflect (superdesigndev/loopany, 140 stars) and OmniRoute Plugins, Skills and Memory CLI (diegosouzapw/OmniRoute, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
microsoft (a GitHub organization, an official publisher) maintains it in microsoft/SkillOpt, which has 18,087 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 6, 2026.
Source: microsoft/SkillOpt on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.