Context layer for your agent. ToggleX captures the user's work sessions, projects, focus scores, and context switches across the web — giving the agent aware...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install toggle或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install toggle⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/toggle/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: toggle version: 1.0.5 description: > Context layer for your agent. ToggleX captures the user's work sessions, projects, focus scores, and context switches across the web — giving the agent awareness of what the user has actually been doing. Use this skill PROACTIVELY: generate daily digests, nudge stale projects, detect context-switching, spot repeated workflows and propose automations, predict the user's next action based on learned routines, and answer recall questions from memory. Also use when the user asks about their activity, tasks, sessions, productivity, time, or anything work-related. Keywords: what did I do, what was I working on, today, yesterday, my day, activity, sessions, refresh my data, productivity, time tracking, context, pick up where I left off, what was I looking at, stale, pattern, automate, digest, report, focus, scattered, deep work, predict, next task, routine, anticipate, briefing. metadata: openclaw: requires: env: - TOGGLE_API_KEY bins: - python3 primaryEnv: TOGGLE_API_KEY emoji: "👁️" homepage: https://x.toggle.pro ---
ToggleX gives you awareness of the user's real work activity across the web — which projects, how long, how focused, and what they left unfinished. Unlike skills that only know what the user tells you, Toggle knows what they did.
The script fetches raw JSON from the ToggleX API. You are responsible for all intelligence on top of that data: summarization, pattern detection, nudges, and automations.
> {baseDir} throughout this document refers to the root directory of this skill's installation (the folder containing this SKILL.md file). This is standard OpenClaw skill convention.
---
| Action | Command | |--------|---------| | Fetch today | python3 {baseDir}/scripts/toggle.py | | Fetch date range | python3 {baseDir}/scripts/toggle.py --from-date YYYY-MM-DD --to-date YYYY-MM-DD | | Fetch + save to memory | python3 {baseDir}/scripts/toggle.py --persist {baseDir}/../../memory | | Cron run (skip cron check) | python3 {baseDir}/scripts/toggle.py --persist {baseDir}/../../memory --skip-cron-check |
---
https://ai-x.toggle.pro/public-openclaw/workflows
Operated by ToggleX (https://x.toggle.pro). Your TOGGLE_API_KEY is sent as an x-openclaw-api-key header. No other data is transmitted.
Get your TOGGLE_API_KEY from:
https://x.toggle.pro/new/clawbot-integration
Never paste the key into chat. Set it in OpenClaw config:
{
"skills": {
"entries": {
"toggle": {
"apiKey": "your_key_here"
}
}
}
}
Or export in shell: export TOGGLE_API_KEY=your_key_here
---
The script returns raw JSON. The top-level response looks like:
{
"userId": "...",
"startDate": "YYYY-MM-DD",
"endDate": "YYYY-MM-DD",
"totalWorkflows": 44,
"totalDays": 1,
"workflowsByDate": {
"YYYY-MM-DD": [ ...workflow entries... ]
},
"summary": {
"totalContextSwitches": 0,
"totalDurationMinutes": 797
}
}
{
"workflowId": "3cd901ef-b708-4869-8ce0-52364ce494e6",
"date": "2026-02-19",
"workflowType": "AI Image Generation Debugging, Toggle/OpenClaw Skill Configuration",
"workflowDescription": "The user began by browsing the OpenClaw GitHub repository...",
"primaryDomain": "github.com",
"secondaryDomains": "[\"http://127.0.0.1:18789/agents\",\"https://github.com/openclaw/openclaw\"]",
"productivityScore": "92.00",
"productivityNotes": "Reviewing the ClawHub documentation ensured correct skill file structure...",
"type": "WORK",
"startTime": "2026-02-19T10:49:12.253Z",
"endTime": "2026-02-19T11:34:27.809Z",
"duration": 1746.629,
"durationMinutes": 29,
"isBreakPeriod": false,
"isLeisure": false,
"isWork": true,
"sessionCount": 10,
"activeSessionCount": 10,
"projectTask": {
"id": "05f01090-...",
"name": "OpenClaw Environment: Gateway Configuration & Image Generation Skill Integration",
"goal": "Configure and validate the local OpenClaw environment...",
"isDone": false,
"context": "Local OpenClaw instance; GitHub repositories...",
"prompts": [
"What verification steps should I follow to confirm the config changes took effect?",
"How can I test the skill invocation through the OpenClaw chat interface?"
],
"project": {
"id": "ab576749-...",
"name": "Toggle Pro AI Chat Feature Development",
"description": "End-to-end development of AI Chat functionality...",
"isActive": true,
"summary": "The project currently reports 0 of 0 tasks completed..."
}
}
}
productivityScore is a string (e.g. "92.00"), not a number. Parse to float before comparing against thresholds.secondaryDomains is a stringified JSON array, not an actual array. Parse it with JSON.parse() if you need individual URLs.duration is in seconds (float). durationMinutes is a rounded integer approximation.projectTask can be null — some WORK entries have no project context. Always check before accessing nested fields.duration: 0 and durationMinutes: 0. These are brief interactions (e.g. a single page view). Include them in sequence analysis but don't count them as substantial sessions.startTime and endTime are UTC (ISO 8601). Convert to the user's local timezone before grouping by "today" or "yesterday" or displaying times. If the user's timezone is unknown, ask once and store in state.yaml under timezone.| Field | Description | |-------|-------------| | type | "WORK", "BREAK", or "LEISURE" | | workflowType | Short label for the session (e.g. "Build Investigation and Scripting") | | workflowDescription | Detailed narrative of what the user did. May contain raw URLs — do not echo these to the user unless asked. Summarize in your own words. | | primaryDomain | Main website/app (e.g. "github.com", "claude.ai", "127.0.0.1") | | productivityScore | "0.00" to "100.00" (string). 90+ = sharp, 70–89 = solid, below 70 = fragmented | | startTime / endTime | ISO 8601 UTC timestamps. endTime may equal startTime for instantaneous actions, or be null if ongoing. | | duration | Session length in seconds (float) | | durationMinutes | Rounded session length in minutes (int) | | projectTask.name | Human-readable task description | | projectTask.goal | What the user was trying to accomplish | | projectTask.prompts | AI-generated follow-up questions relevant to the task. Use these — if the user asks "what should I do next on this project?", these are high-quality suggestions directly tied to their recent work. | | projectTask.project.name | Parent project name — use for grouping and stale-project detection | | projectTask.project.summary | Running project summary — useful for briefings and recall | | summary.totalContextSwitches | API-provided count of context switches for the period. Use this instead of calculating manually. | | summary.totalDurationMinutes | Total tracked time in minutes |
type: "WORK" entries; skip BREAK unless asked; mention LEISURE briefly if presentstartTime — the API does not return entries in chronological ordertotalWorkflows is 0, tell the user Toggle wasn't running or captured nothing for that periodworkflowType as the headline and workflowDescription for detail — but paraphrase the description, don't dump it raw (it contains URLs, OAuth tokens, and internal paths)---
The script exits with a non-zero code and prints to stderr on failure. Handle these cases:
...
安装 Toggle 后,可以对 AI 说这些话来触发它
Help me get started with Toggle
Explains what Toggle does, walks through the setup, and runs a quick demo based on your current project
Use Toggle to context layer for your agent
Invokes Toggle with the right parameters and returns the result directly in the conversation
What can I do with Toggle in my product manager workflow?
Lists the top use cases for Toggle, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/toggle/ 目录(个人级,所有项目可用),或 .claude/skills/toggle/(项目级)。重启 AI 客户端后,用 /toggle 主动调用,或让 AI 根据上下文自动发现并使用。
Toggle 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Toggle 可免费安装使用。请查阅仓库了解许可证信息。
Context layer for your agent. ToggleX captures the user's work sessions, projects, focus scores, and context switches across the web — giving the agent aware...
Toggle 属于「Product Manager」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my product manager tasks using Toggle
Identifies repetitive steps in your workflow and sets up Toggle to handle them automatically