sleep
睡觉技能。收到 /sleep 时,将当前 session 中未完成的事项记录到文件,然后通过 Gateway API reset session。醒来时 hook 自动读取并注入未完成事项到新 session 上下文。
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/axelhu/axel-sleepWhat This Skill Does
The Sleep skill is a sophisticated session-state management tool designed for OpenClaw AI agents. It functions as a "save-point" mechanism, allowing an agent to pause its current thought process, serialize its pending tasks and technical context into a structured Markdown file, and reset its volatile memory. This is critical for agents handling long-running, multi-step development tasks where session context may become cluttered or hit token limits. By using the /sleep command, the agent performs a deep-dive analysis of its progress, identifies actionable technical details, and prepares a roadmap for when the user wakes the agent up. Upon restart, the agent automatically detects these saved files, ensuring zero loss of productivity and seamless continuity.
Installation
You can easily integrate this skill into your OpenClaw environment by running the following command in your terminal:
clawhub install openclaw/skills/skills/axelhu/axel-sleep
Once installed, ensure your agent has read/write permissions to the workspace/previews/ directory, as the skill depends on local file persistence to store state.
Use Cases
- Complex Development Cycles: When working on large codebases where you need to step away for hours or days, use sleep to snapshot the exact line of code, active branches, and planned refactors.
- Session Cleanup: If an agent starts exhibiting "hallucinations" or performance degradation due to a massive conversation history, use sleep to clean the state while keeping your task list intact.
- Task Handoffs: Use sleep to transition between different project focuses or to prepare a summary for when you need to switch contexts between different team members.
Example Prompts
- "/sleep: I have finished the API implementation for the login endpoint, but the database schema migration is still failing with a 500 error on line 42. Please document the current state and reset the session."
- "/sleep: I am pausing the documentation project. We have successfully generated the core modules, but the CSS layout for the sidebar is still overlapping on mobile devices. Save our progress."
- "/sleep: Everything is done for this task. Please record the completion status and reset the context so we can start the next feature fresh."
Tips & Limitations
- Be Detailed: The effectiveness of the resume depends entirely on the detail captured. Always include specific error codes, file paths, and current variables.
- Pending vs. All Done: Always ensure your agent correctly flags the status as
pendingorall_doneto help your workflow management. - Security: Because this skill saves files to the local disk, ensure that you are not storing sensitive production credentials or API keys in the plaintext Markdown files within
workspace/previews/if you are working in a non-secure or shared environment.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-axelhu-axel-sleep": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, external-api
Related Skills
contacts
通讯录查询与维护技能。用于查找联系人信息(open_id、chat_id、account_id 等)、记录新联系人、或查询历史沟通偏好。触发时机:(1) 需要 @某人或向某渠道发消息时 (2) 认识新联系人后需要录入通讯录时 (3) 查询某人的联系方式或交流偏好时 (4) 询问"谁知道xxx的飞书ID"或"怎么联系xxx"时。
superpowers-overview
Use when starting any development work or when unsure which superpowers development skill to use - provides entry point and navigation to the full superpowers skill suite for OpenClaw agents
superpowers-subagent-dev
Use when executing implementation plans with independent tasks - coordinates task execution by dispatching subagents per task with verification checkpoints, adapted for OpenClaw's isolated session model
superpowers-executing-plans
Use when executing a written implementation plan in the current session with sequential task execution and review checkpoints - for when subagent-driven mode is not available
Openclaw Sleep
Skill by axelhu