Custom tabs
The 12 built-in panels (Overview, Plan, Sprints, Activity, Pending, Log, Postmortems, Usage, Scheduled Jobs, Repos, Docs, Skills) โ plus a guided "Start Here" onboarding checklist โ cover the most common operator workflows, but they will not cover every use case. When you need something else โ a customer-feedback log, an OKR tracker, a content calendar, a research notebook, a Stripe-events viewer โ add your own panel in about 2 minutes through the wizard or the CLI.
Custom tabs are first-class citizens. They render alongside the built-ins on /preview/operator, they get a slot in ai-ops-dashboard.config.ts, and they get registered into the AI memory files (CLAUDE.md, AGENTS.md) so Claude Code and other agents can read from and write to them through the CLI without any extra prompting.
See also: HANDBOOK.md for the project model, AGENTS.md for the agent contract, USAGE.md for the CLI reference.
When to use which archetype
Every custom tab inherits from one of 5 archetypes. The archetype decides the data shape, where the data lives, the renderer, and the CLI subcommand surface. Pick the closest match โ you can always edit the generated panel afterward.
| Archetype | Data shape & location | Renderer | Example use cases | |---|---|---|---| | list | JSON items[] in data/<slug>.json โ each row has id, title, status, plus optional why, tags[] | Filterable cards, sorted by status rank then date, with status pills | Task queue, customer feedback, bug backlog, lead pipeline, OKR tracker | | timeline | Append-only Markdown in docs/<slug>.md โ ## YYYY-MM-DD HH:MM โ title entries, newest first, optional **Tags:** | Reverse-chronological cards with timestamps and color-coded tags | Decision log, incident timeline, research journal, changelog, "things I learned this week" | | metrics | JSON metrics[] in data/<slug>.json โ name, value, plus optional unit, trend, target | KPI card grid with trend arrows (โ โ โ) and optional targets | Stripe MRR, GitHub stars, NPS, uptime / SLA, sprint velocity | | folder | A knowledge/<slug>/ directory of Markdown files, each with YAML frontmatter (title, date, optional status, tags) | Document list sorted by date, with status / tag chips and archive support | Case studies, ADRs, design briefs, runbooks, customer success stories | | rest | Read-only cache (data/<slug>.cache.json) of a REST endpoint's JSON, refreshed on demand | Card list with item count and last-sync time; prompts you to refresh when empty | Live GitHub issues / PRs, external status page, public API data, Notion export |
`rest` is read-only โ it supports only refresh and list (the data lives upstream, so you never add to it). The other four are writable through the CLI.
Quick chooser:
- Append events you rarely edit โ `timeline`.
- Track records whose status changes over time โ `list`.
- Show numbers (current value, trend, target) โ `metrics`.
- Keep a set of long-form docs, one file each โ `folder`.
- Mirror a live external API โ `rest`.
Adding a custom tab
Two paths. Both produce identical output โ the wizard is faster for one-offs, the CLI is better for scripting and for adding tabs from inside an AI session.
Option A: Web wizard
pnpm devThen navigate to http://localhost:3000/admin/add-tab. The wizard walks 6 steps:
- Tab name โ human label that appears on the tab strip (e.g. "Customer feedback").
- Slug โ kebab-case identifier used in URLs, file names, and CLI commands. Auto-suggested from the name; edit if you want something shorter.
- Archetype โ pick one of the 5 above. The wizard previews the data shape and the sample render.
- Schema โ confirm or extend the default fields for your archetype. Add custom columns here (e.g.
rating: numberfor customer feedback). - Seed data โ paste 1โ3 example rows so the panel is not empty on first render. Optional but recommended.
- Review โ diff of all files that will be created or mutated. Click Apply.
The wizard writes the files, hot-reloads the dev server, and drops you on the new tab. Total elapsed time is usually under 2 minutes.
Option B: CLI
npx ai-ops-dashboard panel addRuns the same flow as interactive prompts. For scripting, pass all the answers as flags in one shot:
npx ai-ops-dashboard panel add \
--name "Customer feedback" \
--slug customer-feedback \
--archetype list \
--fields "rating:number,source:string" \
--seed ./feedback-seed.jsonThe CLI is the right choice when you are scaffolding tabs from inside a Claude Code session, when you are adding several at once, or when you want the add step to live in a setup script that another operator can re-run.
What gets generated
Each panel add mutates exactly 8 files. Knowing the list helps you predict diffs and helps you remove a tab cleanly later.
- `components/panels/<slug>-panel.tsx` โ the React component that renders the tab. Created from the archetype template.
- The data file โ
data/<slug>.jsonforlistandmetrics,docs/<slug>.mdfortimeline, aknowledge/<slug>/directory forfolder, ordata/<slug>.cache.jsonforrest. Treat it like any other tracked data file. - `ai-ops-dashboard.config.ts` โ appended: import of the new panel + entry in the
panels[]array (controls tab order and labeling). - `data/panel-manifest.json` โ appended: manifest entry with slug, archetype, data path, and schema. Read by the dashboard and by AI agents.
- `AGENTS.md` โ appended: a "Custom panel:
<slug>" section describing the CLI commands and data path, so any code-running agent can interact with it. - `CLAUDE.md` โ appended: a one-paragraph entry under "Custom tabs" pointing Claude Code at the same surface.
- `.claude/skills/ai-ops-dashboard/SKILL.md` โ appended: registers the new subcommand so the skill surfaces it to Claude.
- `recipes/<slug>.md` โ created: a short "how to use this tab" recipe with example CLI calls, written to the docs so the next operator finds it.
Nothing else is touched. If you see edits outside these 8 files, treat that as a bug โ file an issue with the diff.
Using the new tab from AI
Because the wizard / CLI registers the new tab in CLAUDE.md, AGENTS.md, and the ai-ops-dashboard skill, any AI session that opens this repo will see the tab immediately. You do not have to prompt-engineer it.
Sample Claude Code prompt right after adding a customer-feedback tab:
> Add a customer-feedback item โ Title: "Loved the new export flow." Rating: 5. Source: in-app survey.
Claude reads CLAUDE.md, sees the registered tab and its CLI surface, and runs:
npx ai-ops-dashboard customer-feedback add \
--title "Loved the new export flow." \
--rating 5 \
--source "in-app survey"The entry lands in data/customer-feedback.json, the dashboard picks it up on the next request, and the entry shows on the new tab. No other touchpoint โ no schema edit, no manifest edit, no restart โ is required.
The same path works from agent-mode tools (Cowork SKILLs, GitHub Actions, scheduled cron). The CLI is the universal surface.
Editing custom tabs after creation
The generated files are yours. Treat them as ordinary code.
- Change the render โ edit
components/panels/<slug>-panel.tsxdirectly. Add filters, columns, sparklines, whatever you want. The archetype template is a starting point, not a contract. - Change the schema โ edit
data/panel-manifest.jsonand update the panel TSX to read the new fields. The CLI'saddsubcommand auto-generates flags from the manifest schema on next build, so add the field there if you want CLI support. - Edit existing entries โ edit the tab's data file directly (
data/<slug>.json,docs/<slug>.md, or theknowledge/<slug>/folder, per archetype). There is no row-by-row admin UI; the source of truth is the file.
The manifest is read fresh on every dashboard request in dev, and at build time in production. You do not need to restart pnpm dev after a schema tweak.
Removing a custom tab
Three steps, all by hand to keep the operation auditable:
# 1. Delete the panel component.
rm components/panels/<slug>-panel.tsx
# 2. Edit ai-ops-dashboard.config.ts โ remove the import line and the entry from the panels[] array.
# 3. Optionally delete the data file if you no longer want the history:
rm data/<slug>.json # or docs/<slug>.md ยท knowledge/<slug>/ ยท data/<slug>.cache.json, per archetypeOn the next build, the manifest auto-prunes any entry whose panel file no longer exists, and the AGENTS.md / CLAUDE.md / SKILL.md blocks are pruned in the same pass. If you want the AI memory cleanup to happen immediately rather than at next build, run npx ai-ops-dashboard manifest refresh.
Troubleshooting
Five issues you are likely to hit, in order of frequency:
- "Slug already exists" / bad slug. Slugs must be unique, kebab-case, and not collide with the 12 built-in panels (
overview,plan,sprints,activity,pending,log,postmortems,usage,scheduled,repos,docs,skills). Pick a more specific slug โcustomer-feedbacknotfeedback,stripe-eventsnotevents.
- Archetype mismatch โ data does not render. You picked
timelinebut seeded alist-shaped payload (rows with statuses), or vice versa. The renderer expects the archetype's field set. Fix: either re-seed in the right shape, or switch the archetype indata/panel-manifest.jsonand regenerate the panel TSX withnpx ai-ops-dashboard panel regenerate <slug>.
- AI cannot find the tab.
CLAUDE.mdis read at session start. If you added the tab mid-session, the running session does not yet know about it. Restart the session (close + reopen the Claude Code conversation) or have Claude re-readCLAUDE.mdexplicitly. Same applies forAGENTS.mdwith other agents.
- CLI dispatch fails (`unknown command: <slug>`). The CLI reads from the manifest. If the manifest entry is missing, run
npx ai-ops-dashboard manifest refreshto rebuild it fromai-ops-dashboard.config.ts+ the panel files on disk. If that does not fix it, check that the panel TSX exports a default component โ the manifest builder skips files without one.
- Validator rejects the tab on build.
pnpm prebuildruns a panel-coverage validator that fails if a panel is registered inai-ops-dashboard.config.tsbut its data file is missing, or vice versa. Read the error โ it names the missing file. The fix is almost always to either commit the seed data file or remove the dangling registration.
If you hit something not on this list, the most useful diagnostic is npx ai-ops-dashboard panel inspect <slug> โ it dumps the manifest entry, the data file path, the panel component path, and the CLI subcommand surface for that slug in one view.
Cross-reference: HANDBOOK.md (project model), AGENTS.md (agent contract), USAGE.md (CLI reference), panels.md (built-in panel catalogue).