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)
clawhub install openclaw-dashboard
Mission
Keep this repository public-safe and easy to run. Prioritize:
- Secret sanitization
- Minimal setup steps
- Stable API/UI behavior
Architecture (v2.0)
The dashboard uses a modular backend + tab-based frontend architecture.
Backend entry point: backend/server.js
Business logic: backend/providers/ — one file per data domain
Frontend: frontend/tabs/ + frontend/shared/ — one JS file per tab
Runtime data: stored in ~/.openclaw/dashboard/ (outside skill dir, not Git-tracked)
Provider map
| Provider |
Routes |
Responsibility |
sessions.js |
/ops/sessions, /api/sessions |
Session stats + model |
ledger.js |
/ops/ledger/*, /api/cost/* |
SQLite token/cost data |
cron.js |
/ops/cron, /ops/cron-costs, /cron/today |
Cron jobs + run history + cost breakdown |
watchdog.js |
/ops/watchdog |
Watchdog state + timeline |
spark.js |
/ops/dgx-status, /api/spark/* |
DGX Spark inference node |
system.js |
/ops/system |
Host metrics (CPU/RAM/disk) |
ground-truth.js |
/api/ground-truth/*, /ops/models |
Model registry + colors |
tasks.js |
/tasks, /tasks/:id |
Task CRUD + notes |
config.js |
/ops/config, /files, /skills |
Config viewer + file editor |
ops-legacy.js |
/ops/* (remaining) |
Audit, channels, model switch, restart |
Frontend tab map
| Tab |
File |
Key functions |
| Overview |
tabs/overview.js |
loadSessions(), loadTasks() |
| Cost |
tabs/cost.js |
loadOpsChannels(), loadOpsAlltime() |
| Cron |
tabs/cron.js |
loadCronEnhanced(), loadCronCosts(), loadCronRuns() |
| Health |
tabs/health.js |
renderAgentMonitor(), loadSystemInfo(), renderWatchdogStatus() |
| Config |
tabs/config.js |
loadConfig(), loadSkills(), loadFileList() |
| Shared |
shared/api.js |
Auth, apiFetch(), watchdog renderers, toast, markdown |
| Shared |
shared/ui-utils.js |
timeSince(), task state |
| Shared |
shared/boot.js |
Init, week nav, chart renderers, confirm dialog |
Apply when
Use this skill for:
- Dashboard feature requests (sessions, cost, cron, watchdog, operations)
- Backend route additions/fixes in
backend/providers/
- Frontend behavior updates in
frontend/tabs/ or frontend/shared/
- README, setup, and environment simplification
- Public release checks for accidental sensitive data
Key rules for agents editing this codebase
- No duplicate function definitions across
api.js and ui-utils.js. Shared utilities belong in api.js (loaded first). ui-utils.js only holds timeSince() and task state.
- Cross-tab function calls are implicit — JS shares the same
window scope. Keep shared helpers in shared/ files.
- Runtime data goes to
~/.openclaw/dashboard/, not skill root. Path is set in backend/lib/config.js via OPENCLAW_DASHBOARD_TASKS env or default.
/ops/models returns { registry: {...object...}, colors, displayNames, models } — registry must be an object keyed by alias, not an array.
/ops/cron-costs returns { summary, jobs, dailyTrend, review, rows } — all five keys required for Cron tab to render correctly.
hideStale query param on /ops/sessions filters sessions with no activity for 7+ days.
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 data in
~/.openclaw/dashboard/tasks.json
- Task attachments in
~/.openclaw/dashboard/attachments/
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
OPENCLAW_ENABLE_MUTATING_OPS=1 to enable model-switch, backup, update ops
Network security:
- CORS restricted to loopback by default.
- Auth via HttpOnly cookie (
ds) or Authorization: Bearer header.
- Set
DASHBOARD_CORS_ORIGINS (comma-separated) for external origins.
Default implementation workflow
- Identify which provider or tab file owns the feature.
- Implement the smallest change that preserves behavior.
- Check: does any other tab/shared file also define the same function? If yes, deduplicate.
- Run a sensitive-string scan before finalizing.
- Ensure docs match the actual runtime defaults.
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, and mention what was sanitized.
Files to touch most often
backend/providers/*.js — server behavior and API routes
frontend/tabs/*.js — tab-specific UI logic
frontend/shared/api.js — auth, fetch, shared renderers
backend/lib/config.js — path and env configuration
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 backend routes, or changing frontend tabs. Includes language toggle (EN/中文), watchdog 24h uptime bar, and cost analysis.4---56# OpenClaw Dashboard Skill78## 🛠️ Installation910### 1. Ask OpenClaw (Recommended)11Tell OpenClaw: *"Install the openclaw-dashboard skill."* The agent will handle the installation and configuration automatically.1213### 2. Manual Installation (CLI)14```bash15clawhub install openclaw-dashboard16```1718## Mission1920Keep this repository public-safe and easy to run. Prioritize:211. Secret sanitization222. Minimal setup steps233. Stable API/UI behavior2425## Architecture (v2.0)2627The dashboard uses a **modular backend + tab-based frontend** architecture.2829**Backend entry point:** `backend/server.js` 30**Business logic:** `backend/providers/` — one file per data domain 31**Frontend:** `frontend/tabs/` + `frontend/shared/` — one JS file per tab 32**Runtime data:** stored in `~/.openclaw/dashboard/` (outside skill dir, not Git-tracked)3334### Provider map35| Provider | Routes | Responsibility |36|---|---|---|37| `sessions.js` | `/ops/sessions`, `/api/sessions` | Session stats + model |38| `ledger.js` | `/ops/ledger/*`, `/api/cost/*` | SQLite token/cost data |39| `cron.js` | `/ops/cron`, `/ops/cron-costs`, `/cron/today` | Cron jobs + run history + cost breakdown |40| `watchdog.js` | `/ops/watchdog` | Watchdog state + timeline |41| `spark.js` | `/ops/dgx-status`, `/api/spark/*` | DGX Spark inference node |42| `system.js` | `/ops/system` | Host metrics (CPU/RAM/disk) |43| `ground-truth.js` | `/api/ground-truth/*`, `/ops/models` | Model registry + colors |44| `tasks.js` | `/tasks`, `/tasks/:id` | Task CRUD + notes |45| `config.js` | `/ops/config`, `/files`, `/skills` | Config viewer + file editor |46| `ops-legacy.js` | `/ops/*` (remaining) | Audit, channels, model switch, restart |4748### Frontend tab map49| Tab | File | Key functions |50|---|---|---|51| Overview | `tabs/overview.js` | `loadSessions()`, `loadTasks()` |52| Cost | `tabs/cost.js` | `loadOpsChannels()`, `loadOpsAlltime()` |53| Cron | `tabs/cron.js` | `loadCronEnhanced()`, `loadCronCosts()`, `loadCronRuns()` |54| Health | `tabs/health.js` | `renderAgentMonitor()`, `loadSystemInfo()`, `renderWatchdogStatus()` |55| Config | `tabs/config.js` | `loadConfig()`, `loadSkills()`, `loadFileList()` |56| Shared | `shared/api.js` | Auth, `apiFetch()`, watchdog renderers, toast, markdown |57| Shared | `shared/ui-utils.js` | `timeSince()`, task state |58| Shared | `shared/boot.js` | Init, week nav, chart renderers, confirm dialog |5960## Apply when6162Use this skill for:63- Dashboard feature requests (sessions, cost, cron, watchdog, operations)64- Backend route additions/fixes in `backend/providers/`65- Frontend behavior updates in `frontend/tabs/` or `frontend/shared/`66- README, setup, and environment simplification67- Public release checks for accidental sensitive data6869## Key rules for agents editing this codebase70711. **No duplicate function definitions** across `api.js` and `ui-utils.js`. Shared utilities belong in `api.js` (loaded first). `ui-utils.js` only holds `timeSince()` and task state.722. **Cross-tab function calls are implicit** — JS shares the same `window` scope. Keep shared helpers in `shared/` files.733. **Runtime data goes to `~/.openclaw/dashboard/`**, not skill root. Path is set in `backend/lib/config.js` via `OPENCLAW_DASHBOARD_TASKS` env or default.744. **`/ops/models` returns `{ registry: {...object...}, colors, displayNames, models }`** — `registry` must be an object keyed by alias, not an array.755. **`/ops/cron-costs` returns `{ summary, jobs, dailyTrend, review, rows }`** — all five keys required for Cron tab to render correctly.766. **`hideStale` query param** on `/ops/sessions` filters sessions with no activity for 7+ days.7778## Public-safety guardrails7980- Never hardcode tokens, API keys, cookies, or host-specific secrets.81- Never commit machine-specific absolute paths.82- Prefer `process.env.*` and safe defaults based on `HOME`.83- Keep examples as placeholders (`your_token_here`, `/path/to/...`).84- If uncertain, redact first and ask the user before exposing details.85- Keep sensitive behaviors opt-in (do not silently load local secret files).8687## Runtime access declaration8889The bundled server can access local OpenClaw files for dashboard views:90- Sessions, cron runs, watchdog state under `~/.openclaw/...`91- Local workspace files under `OPENCLAW_WORKSPACE`92- Task data in `~/.openclaw/dashboard/tasks.json`93- Task attachments in `~/.openclaw/dashboard/attachments/`9495High-sensitivity features are disabled by default and require explicit env flags:96- `OPENCLAW_LOAD_KEYS_ENV=1` to load `keys.env`97- `OPENCLAW_ENABLE_PROVIDER_AUDIT=1` to call OpenAI/Anthropic org APIs98- `OPENCLAW_ENABLE_CONFIG_ENDPOINT=1` to expose `/ops/config`99- `OPENCLAW_ALLOW_ATTACHMENT_FILEPATH_COPY=1` for absolute-path attachment copy100- `OPENCLAW_ENABLE_MUTATING_OPS=1` to enable model-switch, backup, update ops101102Network security:103- CORS restricted to loopback by default.104- Auth via HttpOnly cookie (`ds`) or `Authorization: Bearer` header.105- Set `DASHBOARD_CORS_ORIGINS` (comma-separated) for external origins.106107## Default implementation workflow1081091. Identify which provider or tab file owns the feature.1102. Implement the smallest change that preserves behavior.1113. Check: does any other tab/shared file also define the same function? If yes, deduplicate.1124. Run a sensitive-string scan before finalizing.1135. Ensure docs match the actual runtime defaults.114115## Sensitive-data checks116117Before final response, scan for:118- `token=`, `OPENCLAW_AUTH_TOKEN`, `OPENCLAW_HOOK_TOKEN`119- `API_KEY`, `SECRET`, `PASSWORD`, `COOKIE`120- absolute paths like `/Users/`, `C:\\`, machine names, personal emails121122If found: replace with env-based values or placeholders, and mention what was sanitized.123124## Files to touch most often125126- `backend/providers/*.js` — server behavior and API routes127- `frontend/tabs/*.js` — tab-specific UI logic128- `frontend/shared/api.js` — auth, fetch, shared renderers129- `backend/lib/config.js` — path and env configuration130- `README.md` — quick start and operator docs131- `env.example` — public-safe environment template