Skillopt Sleep logo

Skillopt Sleep

OrganizationPopular
microsoft
skillopt-sleep

Use when the user wants Cursor to learn from recent local sessions, asks for an offline sleep or dream cycle, wants to consolidate recurring work into a Cursor skill, or requests SkillOpt-Sleep status, harvest, dry-run, run, scheduling, review, or adoption. Drives the validation-gated skillopt_sleep engine with Cursor transcripts and the optional Cursor Agent CLI backend.

Overview

Publishermicrosoft
RepositorySkillOpt
Skill nameskillopt-sleep
Stars
17.2K
Forks
1.6K
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by microsoft on GitHub. Read the source before you install it.

Installation

Install the Skillopt Sleep AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/microsoft/SkillOpt.git /tmp/SkillOpt
mkdir -p .claude/skills
cp -r /tmp/SkillOpt/plugins/cursor/skills/skillopt-sleep .claude/skills/skillopt-sleep
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Skillopt Sleep in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Skillopt Sleep on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Skillopt Sleep is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

SkillOpt-Sleep for Cursor

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.

Cursor target

Always use this project-relative target for Cursor-visible learning:

text
.cursor/skills/skillopt-sleep-learned/SKILL.md

Pass 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.

Choose the runner

Use one of these supported command paths consistently:

  1. Source checkout on macOS/Linux: bash "$SKILLOPT_SLEEP_REPO/plugins/run-sleep.sh" <action> ...
  2. Source checkout on Windows: powershell -File "$env:SKILLOPT_SLEEP_REPO\plugins\run-sleep.ps1" <action> ...
  3. Installed engine on any platform: 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.

Core workflow

  1. Harvest local Cursor JSONL transcripts read-only.
  2. Mine recurring, checkable task records from session digests.
  3. Replay tasks under the current skill and memory through the selected backend.
  4. Reflect on failures and propose bounded edits.
  5. Gate the candidate on held-out real tasks.
  6. Stage accepted proposals under <project>/.skillopt-sleep/staging/<timestamp>/.
  7. Adopt only after review, backing up existing live targets first.

Commands

Use the installed-command form below, or replace skillopt-sleep with the platform-specific source runner described above.

bash
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)" --legacy

For 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.

  • Default backend is 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.
  • Check model identifiers with cursor-agent --list-models; when cost matters, verify the billed variant in Cursor's usage reporting.
  • Keep live runs bounded with --max-sessions, --max-tasks, and --progress.
  • A held-out gain is evidence for that run, not a promise of general improvement.

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.

Reviewable data path

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:

bash
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.json

Inspect and redact the file, then set its top-level "reviewed" field to true. Only then run:

bash
skillopt-sleep dry-run --project "$(pwd)" --backend cursor \
  --tasks-file reviewed-tasks.json --progress --json

Real 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

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:

json
{
  "transcript_source": "cursor",
  "target_skill_path": ".cursor/skills/skillopt-sleep-learned/SKILL.md",
  "backend": "cursor"
}

Then run:

bash
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.

Report results

For dry-run and run, report:

  • session and task counts;
  • held-out baseline and candidate scores;
  • gate action and accepted/rejected edit counts;
  • exact proposed edits;
  • staging directory, when one was created.

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.

Hard rules

  • Harvest is read-only. Never edit Cursor transcript files.
  • Never hand-edit the target skill or CLAUDE.md as a substitute for adoption.
  • Do not run a real backend on sensitive content without confirming its data boundary or using the reviewed-task workflow.
  • Do not add a session-end hook or imply that installing this plugin schedules anything.
  • Show validation evidence before recommending adoption.
  • Treat generated edits as proposals, not as source of truth.

Frequently asked questions

What does the Skillopt Sleep AI skill do?

Use when the user wants Cursor to learn from recent local sessions, asks for an offline sleep or dream cycle, wants to consolidate recurring work into a Cursor skill, or requests SkillOpt-Sleep status, harvest, dry-run, run, scheduling, review, or adoption. Drives the validation-gated skillopt_sleep engine with Cursor transcripts and the optional Cursor Agent CLI backend.

Why use Skillopt Sleep on TypingMind?

Because you install it once and use it with any model. Skillopt Sleep is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Skillopt Sleep in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/microsoft/SkillOpt/tree/main/plugins/cursor/skills/skillopt-sleep. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Skillopt Sleep?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Skillopt Sleep?

As many as you like. As long as a model supports skills, you can use Skillopt Sleep with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Skillopt Sleep AI skill free?

Yes. It is published on GitHub by microsoft under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇