add-dashboard
microsoft/amplifier-app-nanoclaw/.claude/skills/add-dashboard/SKILL.md
Add a monitoring dashboard to NanoClaw. Installs @nanoco/nanoclaw-dashboard and a pusher that sends periodic JSON snapshots.
Skill4 starsChanged 4 months ago
- Reads credentials
- Installs packages
What's in it
- /add-dashboard — NanoClaw Dashboard
- Architecture
- Steps
- 1. Install the npm package
- 2. Copy the pusher module
- 3. Add exports to src/db/index.ts
- 4. Wire into src/index.ts
- 5. Add environment variables to .env
- 6. Build and restart
- 7. Verify
- Dashboard Pages
- Troubleshooting
- Removal
---
name: add-dashboard
description: Add a monitoring dashboard to NanoClaw. Installs @nanoco/nanoclaw-dashboard and a pusher that sends periodic JSON snapshots.
---
# /add-dashboard — NanoClaw Dashboard
Adds a local monitoring dashboard showing agent groups, sessions, channels, users, token usage, context windows, message activity, and real-time logs.
## Architecture
```
NanoClaw (pusher) Dashboard (npm package)
┌──────────┐ POST JSON ┌──────────────┐
│ collects │ ────────────────→ │ /api/ingest │
│ DB data │ every 60s │ in-memory │
│ tails │ ────────────────→ │ /api/logs/ │
│ log file │ every 2s │ push │
└──────────┘ │ serves UI │
└──────────────┘
```
## Steps
### 1. Install the npm package
```bash
pnpm install @nanoco/nanoclaw-dashboard
```
### 2. Copy the pusher module
Copy the resource file into src:
```
.claude/skills/add-dashboard/resources/dashboard-pusher.ts → src/dashboard-pusher.ts
```
### 3. Add exports to src/db/index.ts
Add these two export blocks if not already present:
```typescript
// After the messaging-groups exports, add:
export {
getMessagingGroupsByAgentGroup,
} from './messaging-groups.js';
// Before the credentials exports, add:
export {
createDestination,
getDestinations,
getDestinationByName,
getDestinationByTarget,
hasDestination,
deleteDestination,
} from './agent-destinations.js';
```
### 4. Wire into src/index.ts
Add the `readEnvFile` import at the top if not already present:
```typescript
import { readEnvFile } from './env.js';
```
Add after step 7 (OneCLI approval handler), before the `log.info('NanoClaw running')` line:
```typescript
// 8. Dashboard (optional)
const dashboardEnv = readEnvFile(['DASHBOARD_SECRET', 'DASHBOARD_PORT']);
const dashboardSecret = process.env.DASHBOARD_SECRET || dashboardEnv.DASHBOARD_SECRET;
const dashboardPort = parseInt(process.env.DASHBOARD_PORT || dashboardEnv.DASHBOARD_PORT || '3100', 10);
if (dashboardSecret) {
const { startDashboard } = await import('@nanoco/nanoclaw-dashboard');
const { startDashboardPusher } = await import('./dashboard-pusher.js');
startDashboard({ port: dashboardPort, secret: dashboardSecret });
startDashboardPusher({ port: dashboardPort, secret: dashboardSecret, intervalMs: 60000 });
} else {
log.info('Dashboard disabled (no DASHBOARD_SECRET)');
}
```
### 5. Add environment variables to .env
```
DASHBOARD_SECRET=<generate-a-random-secret>
DASHBOARD_PORT=3100
```
Generate the secret: `node -e "console.log('nc-' + require('crypto').randomBytes(16).toString('hex'))"`
### 6. Build and restart
Run from your NanoClaw project root:
```bash
pnpm run build
source setup/lib/install-slug.sh
systemctl --user restart $(systemd_unit) # Linux
# or: launchctl kickstart -k gui/$(id -u)/$(launchd_label) # macOS
```
### 7. Verify
```bash
curl -s http://localhost:3100/api/status
curl -s -H "Authorization: Bearer <secret>" http://localhost:3100/api/overview
```
Open `http://localhost:3100/dashboard` in a browser.
## Dashboard Pages
| Page | Shows |
|------|-------|
| Overview | Stats, token usage + cache hit rate, context windows, activity chart |
| Agent Groups | Sessions, wirings, destinations, members, admins |
| Sessions | Status, container state, context window usage bars |
| Channels | Live/offline status, messaging groups, sender policies |
| Messages | Per-session inbound/outbound messages |
| Users | Privilege hierarchy: owner > admin > member |
| Logs | Real-time log streaming with level filter |
## Troubleshooting
- **"No data yet"**: Wait 60s for first push, or check logs for push errors
- **401 errors**: Verify `DASHBOARD_SECRET` matches in `.env`
- **Port conflict**: Change `DASHBOARD_PORT` in `.env`
- **No logs**: Check `logs/nanoclaw.log` exists
## Removal
```bash
pnpm uninstall @nanoco/nanoclaw-dashboard
rm src/dashboard-pusher.ts
# Remove the dashboard block from src/index.ts
# Remove DASHBOARD_SECRET and DASHBOARD_PORT from .env
pnpm run build
```
More agent context in microsoft/amplifier-app-nanoclaw
51 other files this repository gives its agents.
CLAUDE.md
Skill
- add-amplifier-agent.claude/skills/add-amplifier-agent/SKILL.md
- add-atomic-chat-tool.claude/skills/add-atomic-chat-tool/SKILL.md
- add-codex.claude/skills/add-codex/SKILL.md
- add-deltachat.claude/skills/add-deltachat/SKILL.md
- add-discord.claude/skills/add-discord/SKILL.md
- add-emacs.claude/skills/add-emacs/SKILL.md
- add-gcal-tool.claude/skills/add-gcal-tool/SKILL.md
- add-gchat.claude/skills/add-gchat/SKILL.md
- add-github.claude/skills/add-github/SKILL.md
- add-gmail-tool.claude/skills/add-gmail-tool/SKILL.md
- add-imessage.claude/skills/add-imessage/SKILL.md
- add-karpathy-llm-wiki.claude/skills/add-karpathy-llm-wiki/SKILL.md
- add-linear.claude/skills/add-linear/SKILL.md
- add-macos-statusbar.claude/skills/add-macos-statusbar/SKILL.md
- add-matrix.claude/skills/add-matrix/SKILL.md
- add-mnemon.claude/skills/add-mnemon/SKILL.md
- add-ollama-provider.claude/skills/add-ollama-provider/SKILL.md
- add-ollama-tool.claude/skills/add-ollama-tool/SKILL.md
- add-opencode.claude/skills/add-opencode/SKILL.md
- add-parallel.claude/skills/add-parallel/SKILL.md
- add-resend.claude/skills/add-resend/SKILL.md
- add-rtk.claude/skills/add-rtk/SKILL.md
- add-signal.claude/skills/add-signal/SKILL.md
- add-slack.claude/skills/add-slack/SKILL.md
- add-teams.claude/skills/add-teams/SKILL.md
- add-telegram.claude/skills/add-telegram/SKILL.md
- add-vercel.claude/skills/add-vercel/SKILL.md
- add-webex.claude/skills/add-webex/SKILL.md
- add-wechat.claude/skills/add-wechat/SKILL.md
- add-whatsapp-cloud.claude/skills/add-whatsapp-cloud/SKILL.md
- add-whatsapp.claude/skills/add-whatsapp/SKILL.md
- claw.claude/skills/claw/SKILL.md
- convert-to-apple-container.claude/skills/convert-to-apple-container/SKILL.md
- customize.claude/skills/customize/SKILL.md
- debug.claude/skills/debug/SKILL.md
- get-qodo-rules.claude/skills/get-qodo-rules/SKILL.md
- init-first-agent.claude/skills/init-first-agent/SKILL.md
- init-onecli.claude/skills/init-onecli/SKILL.md
- manage-channels.claude/skills/manage-channels/SKILL.md
- manage-mounts.claude/skills/manage-mounts/SKILL.md
- migrate-from-openclaw.claude/skills/migrate-from-openclaw/SKILL.md
- migrate-from-v1.claude/skills/migrate-from-v1/SKILL.md
- migrate-nanoclaw.claude/skills/migrate-nanoclaw/SKILL.md
- qodo-pr-resolver.claude/skills/qodo-pr-resolver/SKILL.md
- setup.claude/skills/setup/SKILL.md
- update-nanoclaw.claude/skills/update-nanoclaw/SKILL.md
- update-skills.claude/skills/update-skills/SKILL.md
- use-native-credential-proxy.claude/skills/use-native-credential-proxy/SKILL.md
- x-integration.claude/skills/x-integration/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

