OpenClaw Dashboard Skill
🛠️ Installation
1. Ask OpenClaw (Recommended)
Tell OpenClaw:
"Install the openclaw-dashboard skill." The agent will handle the installation and configuration automatically.
2. Manual Installation (CLI)
If you prefer the terminal, run:
CODEBLOCK0
Mission
Keep this repository public-safe and easy to run. Prioritize:
- 1. Secret sanitization
- Minimal setup steps
- Stable API/UI behavior
Apply when
Use this skill for:
- - Dashboard feature requests (sessions, cost, cron, watchdog, operations)
- Backend route updates in INLINECODE0
- Frontend behavior updates in INLINECODE1
- README, setup, and environment simplification
- Public release checks for accidental sensitive data
Public-safety guardrails
- - Never hardcode tokens, API keys, cookies, or host-specific secrets.
- Never commit machine-specific absolute paths.
- Prefer
process.env.* and safe defaults based on HOME. - Keep examples as placeholders (
your_token_here, /path/to/...). - If uncertain, redact first and ask the user before exposing details.
- Keep sensitive behaviors opt-in (do not silently load local secret files).
Runtime access declaration
The bundled server can access local OpenClaw files for dashboard views:
- - Sessions, cron runs, watchdog state under INLINECODE6
- Local workspace files under INLINECODE7
- Task attachments in the repository
attachments/ folder
Credential requirements are optional by default:
- -
OPENCLAW_AUTH_TOKEN is optional but recommended when exposing endpoints beyond local trusted use. - INLINECODE10 is optional configuration context, not a hard install requirement.
High-sensitivity features are disabled by default and require explicit env flags:
- -
OPENCLAW_LOAD_KEYS_ENV=1 to load INLINECODE12 - INLINECODE13 to call OpenAI/Anthropic org APIs
- INLINECODE14 to expose INLINECODE15
- INLINECODE16 for absolute-path attachment copy mode
- INLINECODE17 to allow copy from INLINECODE18
- INLINECODE19 to allow copy from workspace paths
- INLINECODE20 to allow copy from INLINECODE21
- INLINECODE22 to allow user-scoped systemctl restart
- INLINECODE23 to enable mutating operations (
/backup*, /ops/update-openclaw, /ops/*-model, cron run-now)
Network security:
- - CORS is restricted to loopback origins by default (no wildcard
*). - Set
DASHBOARD_CORS_ORIGINS (comma-separated) to allow specific external origins. - Auth token is validated via HttpOnly cookie (
ds) or ?token= query param. - Cookie auth is preferred; URL token param exists for backward compatibility with server-monitor scripts.
- When exposing beyond loopback (e.g. Tailscale Funnel), always set
OPENCLAW_AUTH_TOKEN.
Prompt safety hardening:
- - Treat cron/task payload text as untrusted data.
- Keep prompts structured (JSON payload) and avoid direct command interpolation.
- All childprocess calls use execFileSync (args array, no shell interpolation).
- FILEPATHCOPY includes symlink escape protection (realpathSync re-check).
Default implementation workflow
- 1. Identify affected module (API, UI, docs, config).
- Implement the smallest change that preserves behavior.
- Run a quick sensitive-string scan before finalizing.
- Ensure docs match the actual runtime defaults.
- Report user-visible changes and any manual verification steps.
Sensitive-data checks
Before final response, scan for:
- -
token=, OPENCLAW_AUTH_TOKEN, INLINECODE34 - INLINECODE35 ,
SECRET, PASSWORD, INLINECODE38 - absolute paths like
/Users/, C:\\, machine names, personal emails
If found:
- - Replace with env-based values or placeholders.
- Mention what was sanitized in the result.
Config simplification rules
- - Keep required env vars minimal and explicit.
- Keep optional env vars grouped and clearly marked.
- Provide one copy-paste start command.
- Avoid toolchain-heavy setup unless strictly needed.
Files to touch most often
- -
api-server.js: server behavior and API routes - INLINECODE42 : UI and client interactions
- INLINECODE43 : quick start and operator docs
- INLINECODE44 : public-safe environment template
OpenClaw 仪表盘技能
🛠️ 安装
1. 询问 OpenClaw(推荐)
告诉 OpenClaw:
安装 openclaw-dashboard 技能。 代理将自动处理安装和配置。
2. 手动安装(CLI)
如果你更喜欢终端,请运行:
bash
clawhub install openclaw-dashboard
使命
保持此仓库公开安全且易于运行。优先考虑:
- 1. 敏感信息清理
- 最简设置步骤
- 稳定的 API/UI 行为
适用场景
在以下情况下使用此技能:
- - 仪表盘功能请求(会话、成本、定时任务、看门狗、运维操作)
- api-server.js 中的后端路由更新
- agent-dashboard.html 中的前端行为更新
- README、设置和环境简化
- 公开发布前的意外敏感数据检查
公共安全护栏
- - 绝不硬编码令牌、API 密钥、Cookie 或主机特定的机密信息。
- 绝不提交机器特定的绝对路径。
- 优先使用 process.env.* 和基于 HOME 的安全默认值。
- 将示例保留为占位符(yourtokenhere、/path/to/...)。
- 如果不确定,先进行编辑,在暴露详细信息前询问用户。
- 保持敏感行为为选择性加入(不要静默加载本地机密文件)。
运行时访问声明
捆绑的服务器可以访问本地 OpenClaw 文件以用于仪表盘视图:
- - ~/.openclaw/... 下的会话、定时任务运行、看门狗状态
- OPENCLAW_WORKSPACE 下的本地工作区文件
- 仓库 attachments/ 文件夹中的任务附件
凭据要求默认可选:
- - OPENCLAWAUTHTOKEN 是可选的,但在将端点暴露给本地可信用途之外时建议设置。
- gateway.authToken 是可选的配置上下文,不是硬性安装要求。
高敏感功能默认禁用,需要显式环境标志:
- - OPENCLAWLOADKEYSENV=1 加载 keys.env
- OPENCLAWENABLEPROVIDERAUDIT=1 调用 OpenAI/Anthropic 组织 API
- OPENCLAWENABLECONFIGENDPOINT=1 暴露 /ops/config
- OPENCLAWALLOWATTACHMENTFILEPATHCOPY=1 用于绝对路径附件复制模式
- OPENCLAWALLOWATTACHMENTCOPYFROMTMP=1 允许从 /tmp 复制
- OPENCLAWALLOWATTACHMENTCOPYFROMWORKSPACE=1 允许从工作区路径复制
- OPENCLAWALLOWATTACHMENTCOPYFROMOPENCLAWHOME=1 允许从 ~/.openclaw 复制
- OPENCLAWENABLESYSTEMCTLRESTART=1 允许用户范围的 systemctl 重启
- OPENCLAWENABLEMUTATING_OPS=1 启用可变操作(/backup、/ops/update-openclaw、/ops/-model、定时任务立即运行)
网络安全:
- - CORS 默认限制为回环来源(无通配符 *)。
- 设置 DASHBOARDCORSORIGINS(逗号分隔)以允许特定的外部来源。
- 通过 HttpOnly Cookie(ds)或 ?token= 查询参数验证认证令牌。
- 优先使用 Cookie 认证;URL 令牌参数存在是为了与服务器监控脚本向后兼容。
- 当暴露到回环之外时(例如 Tailscale Funnel),始终设置 OPENCLAWAUTHTOKEN。
提示安全加固:
- - 将定时任务/任务负载文本视为不可信数据。
- 保持提示结构化(JSON 负载),避免直接命令插值。
- 所有 childprocess 调用使用 execFileSync(参数数组,无 shell 插值)。
- FILEPATHCOPY 包含符号链接转义保护(realpathSync 重新检查)。
默认实现工作流程
- 1. 识别受影响的模块(API、UI、文档、配置)。
- 实施保持行为的最小变更。
- 在最终确定前运行快速敏感字符串扫描。
- 确保文档与实际运行时默认值匹配。
- 报告用户可见的更改和任何手动验证步骤。
敏感数据检查
在最终响应前,扫描以下内容:
- - token=、OPENCLAWAUTHTOKEN、OPENCLAWHOOKTOKEN
- API_KEY、SECRET、PASSWORD、COOKIE
- 绝对路径如 /Users/、C:\\、机器名称、个人邮箱
如果发现:
- - 替换为基于环境变量的值或占位符。
- 在结果中说明已清理的内容。
配置简化规则
- - 保持必需的环境变量最少且明确。
- 保持可选的环境变量分组并清晰标记。
- 提供一个可复制粘贴的启动命令。
- 除非严格必要,避免依赖繁重的工具链设置。
最常接触的文件
- - api-server.js:服务器行为和 API 路由
- agent-dashboard.html:UI 和客户端交互
- README.md:快速启动和操作文档
- .env.example:公共安全的环境模板