dashboards-as-code

dashboards-as-code is a skill for Claude Code, Codex from lukasrepublic/agentic-foundry. It costs 189 tokens per session (1,222 once invoked), scanned A, original, MIT.

A migration method for converting monitoring dashboards from hand-built definitions into version-controlled code. It compares the coded result with immutable exports of the original dashboards to check that nothing was lost.

In plain words
What is it for?
Use it to migrate dashboard fleets, generate common panel types, preserve rows and variables, and flag unknown panel types for human review.
Why use it?
It prevents panels or dashboard settings from silently disappearing during a manual rewrite.

Skill for Claude CodeCodex

Part of the foundry plugin — 47 skills, 8 agents, 8 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lukasrepublic/agentic-foundry/dashboards-as-code
Any agent
npx skills add lukasrepublic/agentic-foundry --skill dashboards-as-code
Clone the repo
git clone --depth 1 https://github.com/lukasrepublic/agentic-foundry

Made for: Claude Code, Codex.

Or install foundry, the plugin that ships this one along with the rest of its 47 skills, 8 agents, 8 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dashboards-as-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/dashboards-as-code.svg)](https://agentmods.dev/skills/lukasrepublic/agentic-foundry/dashboards-as-code)
Your own site
<a href="https://agentmods.dev/skills/lukasrepublic/agentic-foundry/dashboards-as-code"><img src="https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/dashboards-as-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 189 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,222 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00189 $0.01222
Opus 5 $0.00095 $0.00611
Sonnet 5 $0.00038 $0.00244
Haiku 4.5 $0.00019 $0.00122

Measured 3d ago against content hash 9b05653cf01d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dashboards-as-code scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/dashboards-as-code/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

dashboards-as-code — migrate hand-authored dashboards to code, provably lossless

A hand-port of a dashboard fleet is silently lossy by default; nobody notices the dropped panel until an on-call engineer opens it mid-incident. This skill drives the migration through a round-trip fidelity gate so an as-code migration CANNOT land unless it is provably lossless.

The five-part harness

  • Golden originals are IMMUTABLE — never hand-edited. One JSON export per dashboard, extracted from the running platform, is the diff oracle for the whole migration. Fixing a diff by editing the golden is falsifying the oracle.
  • The emitter uses a generic panel factory, and its unknown-kind fallback FLAGS — never silently guesses. Common panel kinds (time-series, stat, gauge, table, logs, pie, bar) map through one factory; rows, template variables, and library-panel references are first-class. A panel kind the factory does not know routes to a default kind WITH the x_foundry_unverified flag set — the gate then refuses green on it, so it becomes a human-review item instead of a silent guess. A dashboard too irregular to emit cleanly may be hand-authored — it still goes through the same gate.
  • The renderer compiles code → platform JSON, auto-discovering every compiled dashboard (a dashboard that fails to render is a gate failure, not a skipped file).
  • The semantic-signature extractor reduces both sides to parity-bearing fields only — panels → {kind, queries, layout position}, template variables, datasource references. Byte comparison is useless (a newer builder SDK emits a different schemaVersion and injects defaults the old export lacks); the signature is the symmetric normalization. Layout is enforced — the right panels in the wrong places still fails.
  • ONE shared definition of MATCH, two call sites. The signature() predicate in scripts/foundry-dashboard-fidelity.py is invoked by BOTH the per-dashboard convert self-verify (emit → compile → render → round-trip vs golden in one command) AND the fleet gate (gate --golden <dir> --rendered <dir>N/N MATCH, fail-closed on any mismatch, missing pair, flagged panel, or zero pairs). A converter can never self-certify green under a looser rule than the merge gate enforces.

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 75 lines · 189 tokens per session scan A 9b05653cf01d

Subscribe to this mod's changes

dashboards-as-code is a skill published in the GitHub repository lukasrepublic/agentic-foundry (1 stars, last pushed yesterday), licensed MIT. It adds 189 tokens to every session and 1,222 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.