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:
clawhub install openclaw-dashboard
Mission
Keep this repository public-safe and easy to run. Prioritize:
- 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
api-server.js
- Frontend behavior updates in
agent-dashboard.html
- 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
~/.openclaw/...
- Local workspace files under
OPENCLAW_WORKSPACE
- 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.
gateway.authToken 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 keys.env
OPENCLAW_ENABLE_PROVIDER_AUDIT=1 to call OpenAI/Anthropic org APIs
OPENCLAW_ENABLE_CONFIG_ENDPOINT=1 to expose /ops/config
OPENCLAW_ALLOW_ATTACHMENT_FILEPATH_COPY=1 for absolute-path attachment copy mode
OPENCLAW_ALLOW_ATTACHMENT_COPY_FROM_TMP=1 to allow copy from /tmp
OPENCLAW_ALLOW_ATTACHMENT_COPY_FROM_WORKSPACE=1 to allow copy from workspace paths
OPENCLAW_ALLOW_ATTACHMENT_COPY_FROM_OPENCLAW_HOME=1 to allow copy from ~/.openclaw
OPENCLAW_ENABLE_SYSTEMCTL_RESTART=1 to allow user-scoped systemctl restart
OPENCLAW_ENABLE_MUTATING_OPS=1 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 child_process calls use execFileSync (args array, no shell interpolation).
- FILEPATH_COPY includes symlink escape protection (realpathSync re-check).
Default implementation workflow
- 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, OPENCLAW_HOOK_TOKEN
API_KEY, SECRET, PASSWORD, COOKIE
- 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
agent-dashboard.html: UI and client interactions
README.md: quick start and operator docs
.env.example: public-safe environment template
1---
2name: openclaw-dashboard
3description: Real-time operations dashboard for OpenClaw. Monitors sessions, costs, cron jobs, and gateway health. Use when installing the dashboard, starting the server, adding features, updating `api-server.js` routes, or changing `agent-dashboard.html`. Includes language toggle (EN/中文), watchdog 24h uptime bar, and cost analysis.
4version: "1.7.3"
5metadata:
6 source: https://skillmd.com/skills/modbender/openclaw-dashboard
7 openclaw:
8 emoji: 📊
9 requires:
10 bins:
11 - node
12 - openclaw
13 optionalRequires:
14 config:
15 - gateway.authToken
16 env:
17 - OPENCLAW_AUTH_TOKEN
18 optionalEnv:
19 - OPENCLAW_HOOK_TOKEN
20 - OPENCLAW_LOAD_KEYS_ENV
21 - OPENCLAW_KEYS_ENV_PATH
22 - OPENCLAW_ENABLE_PROVIDER_AUDIT
23 - OPENCLAW_ENABLE_CONFIG_ENDPOINT
24 - OPENCLAW_ENABLE_SESSION_PATCH
25 - OPENCLAW_ALLOW_ATTACHMENT_FILEPATH_COPY
26 - OPENCLAW_ALLOW_ATTACHMENT_COPY_FROM_TMP
27 - OPENCLAW_ALLOW_ATTACHMENT_COPY_FROM_WORKSPACE
28 - OPENCLAW_ALLOW_ATTACHMENT_COPY_FROM_OPENCLAW_HOME
29 - OPENCLAW_ENABLE_SYSTEMCTL_RESTART
30 - OPENCLAW_ENABLE_MUTATING_OPS
31 - NOTION_API_KEY
32 - OPENAI_ADMIN_KEY
33 - ANTHROPIC_ADMIN_KEY
34 - VISION_DB_NETWORKING
35 - VISION_DB_WINE
36 - VISION_DB_CIGAR
37 - VISION_DB_TEA
38---
39
40# OpenClaw Dashboard Skill
41
42## 🛠️ Installation
43
44### 1. Ask OpenClaw (Recommended)
45Tell OpenClaw: *"Install the openclaw-dashboard skill."* The agent will handle the installation and configuration automatically.
46
47### 2. Manual Installation (CLI)
48If you prefer the terminal, run:
49```bash
50clawhub install openclaw-dashboard
51```
52
53## Mission
54
55Keep this repository public-safe and easy to run. Prioritize:
561. Secret sanitization
572. Minimal setup steps
583. Stable API/UI behavior
59
60## Apply when
61
62Use this skill for:
63- Dashboard feature requests (sessions, cost, cron, watchdog, operations)
64- Backend route updates in `api-server.js`
65- Frontend behavior updates in `agent-dashboard.html`
66- README, setup, and environment simplification
67- Public release checks for accidental sensitive data
68
69## Public-safety guardrails
70
71- Never hardcode tokens, API keys, cookies, or host-specific secrets.
72- Never commit machine-specific absolute paths.
73- Prefer `process.env.*` and safe defaults based on `HOME`.
74- Keep examples as placeholders (`your_token_here`, `/path/to/...`).
75- If uncertain, redact first and ask the user before exposing details.
76- Keep sensitive behaviors opt-in (do not silently load local secret files).
77
78## Runtime access declaration
79
80The bundled server can access local OpenClaw files for dashboard views:
81- Sessions, cron runs, watchdog state under `~/.openclaw/...`
82- Local workspace files under `OPENCLAW_WORKSPACE`
83- Task attachments in the repository `attachments/` folder
84
85Credential requirements are optional by default:
86- `OPENCLAW_AUTH_TOKEN` is optional but recommended when exposing endpoints beyond local trusted use.
87- `gateway.authToken` is optional configuration context, not a hard install requirement.
88
89High-sensitivity features are disabled by default and require explicit env flags:
90- `OPENCLAW_LOAD_KEYS_ENV=1` to load `keys.env`
91- `OPENCLAW_ENABLE_PROVIDER_AUDIT=1` to call OpenAI/Anthropic org APIs
92- `OPENCLAW_ENABLE_CONFIG_ENDPOINT=1` to expose `/ops/config`
93- `OPENCLAW_ALLOW_ATTACHMENT_FILEPATH_COPY=1` for absolute-path attachment copy mode
94- `OPENCLAW_ALLOW_ATTACHMENT_COPY_FROM_TMP=1` to allow copy from `/tmp`
95- `OPENCLAW_ALLOW_ATTACHMENT_COPY_FROM_WORKSPACE=1` to allow copy from workspace paths
96- `OPENCLAW_ALLOW_ATTACHMENT_COPY_FROM_OPENCLAW_HOME=1` to allow copy from `~/.openclaw`
97- `OPENCLAW_ENABLE_SYSTEMCTL_RESTART=1` to allow user-scoped systemctl restart
98- `OPENCLAW_ENABLE_MUTATING_OPS=1` to enable mutating operations (`/backup*`, `/ops/update-openclaw`, `/ops/*-model`, cron run-now)
99
100Network security:
101- CORS is restricted to loopback origins by default (no wildcard `*`).
102- Set `DASHBOARD_CORS_ORIGINS` (comma-separated) to allow specific external origins.
103- Auth token is validated via HttpOnly cookie (`ds`) or `?token=` query param.
104- Cookie auth is preferred; URL token param exists for backward compatibility with server-monitor scripts.
105- When exposing beyond loopback (e.g. Tailscale Funnel), always set `OPENCLAW_AUTH_TOKEN`.
106
107Prompt safety hardening:
108- Treat cron/task payload text as untrusted data.
109- Keep prompts structured (JSON payload) and avoid direct command interpolation.
110- All child_process calls use execFileSync (args array, no shell interpolation).
111- FILEPATH_COPY includes symlink escape protection (realpathSync re-check).
112
113## Default implementation workflow
114
1151. Identify affected module (API, UI, docs, config).
1162. Implement the smallest change that preserves behavior.
1173. Run a quick sensitive-string scan before finalizing.
1184. Ensure docs match the actual runtime defaults.
1195. Report user-visible changes and any manual verification steps.
120
121## Sensitive-data checks
122
123Before final response, scan for:
124- `token=`, `OPENCLAW_AUTH_TOKEN`, `OPENCLAW_HOOK_TOKEN`
125- `API_KEY`, `SECRET`, `PASSWORD`, `COOKIE`
126- absolute paths like `/Users/`, `C:\\`, machine names, personal emails
127
128If found:
129- Replace with env-based values or placeholders.
130- Mention what was sanitized in the result.
131
132## Config simplification rules
133
134- Keep required env vars minimal and explicit.
135- Keep optional env vars grouped and clearly marked.
136- Provide one copy-paste start command.
137- Avoid toolchain-heavy setup unless strictly needed.
138
139## Files to touch most often
140
141- `api-server.js`: server behavior and API routes
142- `agent-dashboard.html`: UI and client interactions
143- `README.md`: quick start and operator docs
144- `.env.example`: public-safe environment template