← Back to Skills Marketplace
axelhu

Sleep

by AxelHu · GitHub ↗ · v1.7.1 · MIT-0
cross-platform ⚠ suspicious
140
Downloads
0
Stars
0
Active Installs
7
Versions
Install in OpenClaw
/install openclaw-sleep
Description
睡觉技能。收到 /sleep 时,将当前 session 中未完成的事项记录到文件,然后通过 Gateway API reset session。醒来时 hook 自动读取并注入未完成事项到新 session 上下文。
Usage Guidance
This skill appears to implement the described sleep/wake flow, but it contains a few mismatches and privacy risks you should consider before installing: - Dependency mismatch: SKILL.md uses the openclaw CLI and python3 snippets (openclaw session current, openclaw gateway call, python json parsing) but the skill metadata lists no required binaries. Ensure your environment provides these tools before relying on the instructions. - Local token access: The example resets the session by reading ~/.openclaw/openclaw.json to extract gateway.auth.token. That file contains an authentication token — installing or running the example will require access to that token. Confirm the file contents and permissions and avoid exposing that token to other agents or users. - Sensitive data in previews: The instructions explicitly tell users/agents to include 'code paths, configuration values, API endpoints, error messages' in preview files. That can lead to secrets or credentials being written to workspace previews. Before using the skill, decide a safe policy: never put secrets/passwords/API keys in preview files; restrict filesystem permissions on the previews/ and hooks/ directories; consider redacting or encrypting sensitive fields. - Audit the hook code: handler.ts is short and performs only local file reading/writing and event injection. Still, review it and confirm the log path (~/.openclaw/workspace/hooks/session-sleep-wake/hook.log) is acceptable and that logs won't leak sensitive content. If you have a central/shared machine (the 'main agent'), follow the install note to only install the hook there. - Safer alternatives: instead of extracting tokens from local JSON, consider using an authenticated CLI command that obtains a scoped token or use an explicit, purpose-scoped token stored in a safer place. Limit which agents/users can call sessions.reset for other sessions. Given these issues the skill is not clearly malicious, but the mismatches and the encouragement to store detailed config/context (which may include secrets) make it 'suspicious' — proceed only after applying the mitigations above and verifying tokens/files referenced by the skill.
Capability Analysis
Type: OpenClaw Skill Name: openclaw-sleep Version: 1.7.1 The skill implements a session state preservation mechanism that requires the AI agent to read the user's local configuration file (~/.openclaw/openclaw.json) to extract a gateway authentication token. It then uses this token to programmatically reset the session via the 'openclaw gateway call' command. While these actions are aligned with the stated 'sleep' and 'wake' functionality, the practice of an AI agent programmatically accessing and utilizing its own platform credentials from disk is a high-risk pattern. The bundle also includes a TypeScript hook (handler.ts) that executes during the agent's bootstrap phase to inject data into the session context.
Capability Assessment
Purpose & Capability
Overall the code and documentation implement the described sleep+wake behavior (write per-session preview files, call sessions.reset, hook injects preview on agent:bootstrap). However SKILL.md uses the openclaw CLI and python3 in examples and reads ~/.openclaw/openclaw.json for a gateway token, yet the skill metadata lists no required binaries or environment variables — a mismatch between declared requirements and actual instructions.
Instruction Scope
Instructions direct the agent/user to write a preview file containing 'technical details: code paths, configuration values, API endpoints, error messages' — which can encourage including secrets or sensitive configuration in a workspace file. The SKILL.md also instructs reading a local auth file (~/.openclaw/openclaw.json) to extract a gateway token and then calling sessions.reset. Accessing local authentication files and asking users/agents to record detailed config values goes beyond mere 'note-taking' and is a privacy risk.
Install Mechanism
This is instruction-only with a small handler.ts hook included as a template — there is no remote download or script execution from untrusted URLs. Hook installation is manual (copy files into ~/.openclaw/workspace/hooks/ and restart), which limits automatic code fetching risk. The handler is simple and performs only local filesystem operations and event-based injection.
Credentials
Metadata declares no required env vars or credentials, but the runtime example reads ~/.openclaw/openclaw.json to get gateway.auth.token (via a python snippet) and then supplies that token to the gateway call. The skill therefore expects access to a local auth token (not declared). Additionally, SKILL.md's encouragement to include configuration values and API endpoints in preview files can lead to storing secrets in workspace files with unclear protections.
Persistence & Privilege
The skill does not request always:true and does not modify other skills. The hook writes a local log file (~/.openclaw/workspace/hooks/session-sleep-wake/hook.log) and reads/writes files within the user's workspace hooks and previews directories — scope is limited to its own paths. This is expected behavior for a hook, though local logs and preview files should be considered sensitive.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install openclaw-sleep
  3. After installation, invoke the skill by name or use /openclaw-sleep
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.7.1
修复: 执行流程增加Step 1获取session key,明确操作对象为本人,防止误睡其他agent的session
v1.5.1
修复: 执行流程增加Step 1获取session key,明确操作对象为本人,防止误睡其他agent的session
v1.7.0
- 新增“安装说明”部分,指明 Hook 只需主 agent 安装一次,其他 agent 仅需安装技能本身 - 删除 ClawHub 区块内的安装与发布信息,迁移相关内容至专门安装说明 - 其他文档位置和表达优化,未影响 skill 使用方法和核心流程
v1.6.0
openclaw-sleep v1.6.0 - 预览文件存储路径调整:preview 文件现在写入 `$HOME/.openclaw/workspace/previews/`,而非 workspace/previews/。 - SKILL.md 和脚本示例中的路径说明统一,明确 preview 必须存储到专属工作空间内的 previews 目录。 - 强化文件目录创建说明和示例脚本,确保 previews 目录存在。
v1.5.0
设计调整:移除被动关键词触发,改为 Agent 主动判断 + /sleep 强制兜底,避免误触发。
v1.4.0
支持自然语言触发:困了/去睡觉了/睡了/晚安等均可触发睡觉流程。
v1.3.0
正式版发布。修复 hook 触发条件说明;完善 reset 执行流程(Step 3 改为 Gateway API 调用);增加预览文件格式规范。
Metadata
Slug openclaw-sleep
Version 1.7.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 7
Frequently Asked Questions

What is Sleep?

睡觉技能。收到 /sleep 时,将当前 session 中未完成的事项记录到文件,然后通过 Gateway API reset session。醒来时 hook 自动读取并注入未完成事项到新 session 上下文。 It is an AI Agent Skill for Claude Code / OpenClaw, with 140 downloads so far.

How do I install Sleep?

Run "/install openclaw-sleep" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Sleep free?

Yes, Sleep is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Sleep support?

Sleep is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Sleep?

It is built and maintained by AxelHu (@axelhu); the current version is v1.7.1.

💬 Comments