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