Guide · Agent skill
How to use the SkillOpt-Sleep Cursor skill: install and run
Updated · written with AI from the project's own documentation and checked against our catalogue data
SkillOpt-Sleep is an agent skill that lets Cursor review your recent local coding sessions, find tasks you repeat, and propose improvements to a project skill file. This guide explains what the skill does, how to install it, how to ask for it in plain language, and how to run the cycle with safe defaults. You will also learn what it needs and which data it may send to a model provider.
Quick start
- 1Install the skill. Download the ZIP from this page, unzip it, and place the skillopt-sleep folder in ~/.claude/skills/ or your project's .claude/skills/. You can also upload it under Settings, Capabilities, Skills in the Claude apps.
- 2Install or select the engine. Make the skillopt-sleep command available, or set SKILLOPT_SLEEP_REPO to a SkillOpt source checkout.
- 3Check status. Run skillopt-sleep status with your project path to see the current state before doing anything else.
- 4Run a mock dry-run. Run dry-run with the mock backend and the Cursor target path. It makes no provider calls and is the safe first check.
- 5Run a bounded cycle. When the dry-run looks right, run with the cursor backend using small --max-sessions and --max-tasks limits and --progress.
- 6Review and adopt. Inspect the staged proposal with status, then run adopt only after you have reviewed it.
What the skill makes the agent do
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, and nothing live changes until you explicitly adopt it. The skill does not train model weights.
The skill has no session-end hook and no MCP server. It runs only when you ask, or when you explicitly request a schedule.
Install the skill from the ZIP
Download the skillopt-sleep ZIP from this page and unzip it. Place the skillopt-sleep folder in one of these locations, depending on whether you want it for all projects or one project.
You can also upload the skill in the Claude apps under Settings, then Capabilities, then Skills.
- Personal: ~/.claude/skills/
- Project: .claude/skills/ inside your project folder
Install the SkillOpt-Sleep engine
The skill drives an engine. You need either the installed skillopt-sleep command or a SkillOpt source checkout with the SKILLOPT_SLEEP_REPO environment variable set to that checkout. If neither is available, the skill stops and asks you to install the engine. It will not substitute hand-written edits for the engine workflow.
Use one runner consistently. The installed form is skillopt-sleep <action>. From a source checkout on macOS or Linux, the runner is bash with the plugins/run-sleep.sh script. On Windows it is PowerShell with plugins/run-sleep.ps1.
- Local Cursor JSONL transcripts under ~/.cursor/projects
- An authenticated Cursor Agent CLI (cursor-agent) for the cursor backend
- Optional: authenticated claude, codex or copilot CLIs, or Azure OpenAI configuration, for those backends
Ask for it with natural requests
You do not need to remember command names. The skill triggers when you ask Cursor to learn from recent local sessions, run an offline sleep or dream cycle, consolidate recurring work into a Cursor skill, or check SkillOpt-Sleep status, harvest, dry-run, run, scheduling, review or adoption.
Good requests name the action and the scope. For example, ask for a status check first, or ask for a dry-run on the current project before any real run.
- Check SkillOpt-Sleep status for this project.
- Harvest recent Cursor sessions and show me the recurring tasks you found, without calling any model.
- Run a dry-run of SkillOpt-Sleep with the mock backend.
- Show me the latest staged proposal and what would change before adopting it.
Run the cycle step by step
Use the target path .cursor/skills/skillopt-sleep-learned/SKILL.md for Cursor-visible learning. Pass it with --target-skill-path on harvest, dry-run and run. Without it, the shared engine uses a Claude-managed skill under ~/.claude/skills, which is not the intended Cursor project skill.
Start with the deterministic mock backend. It is the default and makes no provider calls. Move to the cursor backend only after the mock check looks right, and keep runs small.
- The first harvest uses a 72-hour lookback. Use --lookback-hours N for a wider window or --lookback-hours 0 for all history.
- A stateful run records a harvest checkpoint, so later runs use it instead of the initial lookback.
- Inspect counts with harvest or dry-run before the first real run, because those actions do not advance state.
- Use --scope invoked for the current workspace or --scope all for every Cursor workspace.
TARGET_SKILL=.cursor/skills/skillopt-sleep-learned/SKILL.md
skillopt-sleep status --project "$(pwd)"
skillopt-sleep harvest --project "$(pwd)" --source cursor --target-skill-path "$TARGET_SKILL" --max-sessions 5 --max-tasks 3
skillopt-sleep dry-run --project "$(pwd)" --source cursor --backend mock --target-skill-path "$TARGET_SKILL" --max-sessions 5 --max-tasks 3 --json
skillopt-sleep run --project "$(pwd)" --source cursor --backend cursor --target-skill-path "$TARGET_SKILL" --max-sessions 5 --max-tasks 3 --progress
skillopt-sleep status --project "$(pwd)"
skillopt-sleep adopt --project "$(pwd)" --legacyReview and adopt the proposal
A normal run stages its proposal under <project>/.skillopt-sleep/staging/<timestamp>/. Review the staged result with status. Adoption is a separate, manual step, and the engine backs up existing live targets before it changes them.
For fan-out proposals, use repeatable --skill NAME or --all-skills after review. Bare adopt refuses a night that contains fan-out rows.
- A held-out gain is evidence for that run, not a promise of general improvement.
- Session and task limits are workload bounds, not hard limits on calls, tokens, time or money. Start with small limits.
Safety notes: scripts, network and transcripts
This skill runs scripts and uses the network. The cursor, claude, codex, copilot and azure_openai backends make paid provider calls and send replay content to the provider. Ordinary Cursor backend calls run in a new empty temporary workspace in read-only Ask mode, with file reads, file writes and MCP tools denied.
Harvesting keeps user and assistant text, tool names and explicit turn errors. It excludes raw tool arguments, tool outputs and non-message records, and it redacts known secret-shaped strings. Pattern-based redaction cannot guarantee that a transcript is safe to send, so for sensitive sessions export tasks first with --output reviewed-tasks.json, inspect and redact the file, and set its top-level reviewed field to true before any real-backend run.
Tool-aware replay for Cursor is temporarily disabled. A task containing a tool_called check fails before Agent mode starts. Use another backend for tool- or repository-dependent tasks.
- Real backends reject task files that remain unreviewed.
- gate_no_regression is a config-only safeguard in ~/.skillopt-sleep/config.json. It defaults to false.
- Do not put raw transcripts, credentials or sensitive task content into messages, commits or summaries.
What people use it for
- A developer who repeats similar Cursor tasks wants a project skill file refined from those sessions.
- A team wants a reviewable, validation-gated way to evolve a shared Cursor project skill.
- Someone wants a recurring-task report from recent sessions using harvest, with no model calls.
Frequently asked questions
Is SkillOpt-Sleep free to use?
The source gives the licence as MIT. The cursor, claude, codex, copilot and azure_openai backends make paid provider calls, and they use your own authenticated CLI or Azure OpenAI budget. The default mock backend makes no provider calls.
What do I need to install before using it?
You need the skillopt-sleep engine installed, or a SkillOpt source checkout with SKILLOPT_SLEEP_REPO set. You also need local Cursor JSONL transcripts under ~/.cursor/projects, and an authenticated Cursor Agent CLI (cursor-agent) for the cursor backend.
Where do I put the skillopt-sleep folder?
Place it in ~/.claude/skills/ for personal use, or in .claude/skills/ inside a project. You can also upload the skill in the Claude apps under Settings, then Capabilities, then Skills.
Does SkillOpt-Sleep change my skills automatically?
No. A normal run stages a proposal for review, and nothing live changes until you explicitly run adopt. Adoption backs up existing live targets first.
Does it train or fine-tune the model?
No. The skill does not train model weights. It proposes bounded edits to a project skill file and tests them against held-out tasks.
Why does it use a skill path under .cursor instead of ~/.claude?
Without an explicit target, the shared engine uses a Claude-managed skill under ~/.claude/skills. Passing --target-skill-path .cursor/skills/skillopt-sleep-learned/SKILL.md points the output at the Cursor project skill.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use SkillOpt-Sleep if you repeat similar Cursor tasks, are comfortable with a command-line engine, and want every change reviewed before it goes live. Pick something else if you want automatic skill changes without review, if your transcripts must not reach a model provider, or if your main work depends on tools or repository state, since Cursor tool-aware replay is disabled.
Download the skill