Skip to content

Commit 0d98c01

Browse files
authored
feat(trogonstack-datadog): add dashboard naming conventions skill (#33)
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
1 parent 0729e02 commit 0d98c01

6 files changed

Lines changed: 268 additions & 280 deletions

File tree

plugins/trogonstack-datadog/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "trogonstack-datadog",
3-
"description": "Datadog observability skills for designing dashboards with proper widget selection, layout patterns, and template variables using the pup CLI",
3+
"description": "Datadog observability skills for designing, redesigning, and auditing dashboards with proper widget selection, layout patterns, template variables, and operational readiness validation using the pup CLI",
44
"version": "0.1.0",
55
"author": {
66
"name": "TrogonStack",

plugins/trogonstack-datadog/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# trogonstack-datadog
22

3-
Datadog observability skills for designing dashboards with proper widget selection, layout patterns, and template variables using the pup CLI.
3+
Datadog observability skills for designing, redesigning, and auditing dashboards with proper widget selection, layout patterns, template variables, and operational readiness validation using the pup CLI.
44

55
```bash
66
claude plugin install trogonstack-datadog@trogonstack
Lines changed: 225 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
---
22
name: datadog-design-dashboard
33
description: >-
4-
Design Datadog dashboards with proper widget selection, layout organization,
5-
template variables, and group structure. Uses pup CLI for inspecting existing
6-
dashboards and validating designs. Use when designing new dashboards, auditing
7-
existing ones, or planning observability layouts for services. Do not use for:
8-
(1) Datadog agent installation or configuration, (2) monitor/alert rule design,
9-
(3) APM instrumentation or tracing setup, (4) log pipeline configuration.
4+
Design new Datadog dashboards, redesign existing ones, or audit dashboards
5+
for operational readiness. Covers widget selection, layout organization,
6+
template variables, group structure, alert threshold validation, and
7+
zero-knowledge readability. Uses pup CLI for inspecting dashboards and
8+
validating designs. Use when designing new dashboards, redesigning existing
9+
ones, auditing before on-call handoff, or reviewing after dashboard changes.
10+
Do not use for: (1) Datadog agent installation or configuration,
11+
(2) monitor/alert rule design, (3) APM instrumentation or tracing setup,
12+
(4) log pipeline configuration.
1013
allowed-tools: AskUserQuestion, Write, Read, Shell
1114
---
1215

@@ -18,8 +21,43 @@ Design a dashboard layout that tells a clear story — from high-level health si
1821

1922
**Philosophy**: The frameworks, layouts, and widget guides in this skill are starting points — not rigid rules. Every product and business is different. Understand the domain first, then adapt the frameworks to fit. The best dashboards reflect how the business actually works, not how a generic template says they should.
2023

24+
---
25+
26+
## Interview
27+
28+
First, determine the mode:
29+
- **Design mode** — user wants to create or redesign a dashboard → ask design questions, then run the full workflow
30+
- **Audit mode** — user wants to review an existing dashboard with no intent to redesign → skip to [Audit](#audit)
31+
32+
### Design Questions
33+
34+
**Skip if ALL of these are already specified**: dashboard purpose, target audience, data sources, template variable needs, dashboard strategy.
35+
36+
1. **Purpose** — "What is this dashboard for? Service overview, infrastructure, executive KPIs, debugging, or SLO tracking?"
37+
2. **Audience** — "Who will use this? On-call engineers, platform team, leadership, or mixed?"
38+
3. **Data Sources** — "Which Datadog products are involved? Metrics only, APM + Metrics, Logs + Metrics, or full stack?"
39+
4. **Scope** — "Is this for a single service, a group of services, or infrastructure-wide?"
40+
5. **Dashboard Strategy** — "One dashboard per service, or a consolidated view?" — share the trade-offs from [references/layouts.md](references/layouts.md) to help them decide. If unsure, ask: "During an outage, does your team investigate one service at a time, or do they need to see all services simultaneously?"
41+
6. **Existing Dashboard** — "Is there an existing dashboard to audit or redesign?" If yes, fetch with `pup dashboards get <id>` before designing.
42+
43+
### Audit Questions
44+
45+
**Skip if ALL of these are already specified**: dashboard ID or URL, service name or team context.
46+
47+
**Always interview if**: No dashboard ID is provided or multiple dashboards may be relevant.
48+
49+
1. **Dashboard** — "Which dashboard should I review? Provide a dashboard ID, URL, or service name to search for."
50+
2. **Business Context** — "Can you tell me what this service does for customers? Are there codebases or docs I can read to understand the product?"
51+
- Impact: Understanding the domain lets the review focus on whether the right metrics are being tracked, not just whether generic rules are followed
52+
3. **Focus** — "Is there anything specific you want me to focus on? (A) Full review, (B) Alert thresholds only, (C) Business section, (D) Layout and readability"
53+
- Default to full review if unspecified
54+
55+
---
56+
2157
## Domain Discovery
2258

59+
*Applies to design mode. Skip if auditing only.*
60+
2361
Before designing, understand what you are building observability for. The metrics that matter depend entirely on the product and business context.
2462

2563
**Ask the user**:
@@ -33,34 +71,36 @@ Before designing, understand what you are building observability for. The metric
3371

3472
**Skip domain discovery if**: You already have deep context about the service from prior conversations or the user has provided detailed specifications.
3573

36-
## Interview
37-
38-
**Skip if ALL of these are already specified**: dashboard purpose, target audience, data sources, template variable needs, dashboard strategy.
39-
40-
**Always interview if**: Auditing or redesigning an existing dashboard (needs current state review first).
41-
42-
1. **Purpose** — "What is this dashboard for? Service overview, infrastructure, executive KPIs, debugging, or SLO tracking?"
43-
2. **Audience** — "Who will use this? On-call engineers, platform team, leadership, or mixed?"
44-
3. **Data Sources** — "Which Datadog products are involved? Metrics only, APM + Metrics, Logs + Metrics, or full stack?"
45-
4. **Scope** — "Is this for a single service, a group of services, or infrastructure-wide?"
46-
5. **Dashboard Strategy** — "One dashboard per service, or a consolidated view?" — share the trade-offs from [references/layouts.md](references/layouts.md) to help them decide. If unsure, ask: "During an outage, does your team investigate one service at a time, or do they need to see all services simultaneously?"
47-
6. **Existing Dashboard** — "Is there an existing dashboard to audit or redesign?" If yes, fetch with `pup dashboards get <id>` before designing.
48-
4974
---
5075

51-
## Workflow
76+
## Design
77+
78+
*Skip to [Audit](#audit) if the user only wants to review an existing dashboard.*
5279

5380
### 1. Gather existing context
5481

5582
```bash
5683
pup dashboards list
5784
pup dashboards get <dashboard-id>
58-
pup dashboards url <dashboard-id>
5985
```
6086

6187
If auditing an existing dashboard, fetch its definition first and analyze its current structure before redesigning.
6288

63-
### 2. Choose a framework
89+
### 2. Explore available telemetry
90+
91+
Before designing widgets, check what metrics and tag values actually exist for the service. This prevents designing around metrics that don't exist or using the wrong tag values in queries.
92+
93+
```bash
94+
# See what metrics are available for the service
95+
pup metrics list --filter="<service-name>.*"
96+
97+
# Verify the service tag is active and see what metrics are flowing
98+
pup metrics list --filter="trace.*" --tag-filter="service:<service-name>"
99+
```
100+
101+
Use the actual metric names and tag values you find here when writing widget queries — do not guess or invent them. If a metric you expect does not appear, flag it to the user before building widgets around it.
102+
103+
### 3. Choose a framework
64104

65105
Match the dashboard purpose to a framework. Read [references/frameworks.md](references/frameworks.md) for detailed metric mappings and group structures.
66106

@@ -72,22 +112,15 @@ Match the dashboard purpose to a framework. Read [references/frameworks.md](refe
72112
| SLO tracking | SLI/SLO |
73113
| Debugging | Drill-down |
74114

75-
### 3. Design the layout
115+
### 4. Design the layout
76116

77-
Using your domain understanding and the chosen framework, design the group structure and select widgets. Read these references as needed:
117+
Using your domain understanding and the chosen framework, design the group structure and select widgets. Read these references before designing:
78118

79119
- **[layouts.md](references/layouts.md)** — Template variable conventions, group structure patterns, dashboard strategy trade-offs, grid sizing, anti-patterns
80120
- **[widgets.md](references/widgets.md)** — Widget selection guide, display options, sizing, naming conventions
81121
- **[thresholds.md](references/thresholds.md)** — Alert threshold markers, threshold proximity, Y-axis configuration
82122

83-
**Key principles** (not rigid rules — use judgment):
84-
- **Prefix every widget title** with its layer and priority: `I0:` (most critical infra), `P0:` (most critical platform), `D0:` (most critical domain), `B0:` (most critical business). See [widgets.md](references/widgets.md) for the full prefix system.
85-
- Start with a **Business** group (5-8 `B`-prefixed metrics) so someone with zero service knowledge can tell if customers are affected within 5 seconds. Tailor the metrics to the domain.
86-
- Timeseries widgets should have **alert threshold markers** (red lines) with thresholds close to normal traffic. If a metric doesn't warrant an alert, question whether it belongs — but context-providing metrics can earn their place.
87-
- Set **Y-axis max** explicitly near the threshold — don't let auto-scaling compress the normal range.
88-
- Order groups macro-to-micro: business → overview → domain-specific → infrastructure.
89-
90-
### 4. Write the output
123+
### 5. Write the design output
91124

92125
Present the design using this template:
93126

@@ -110,38 +143,188 @@ Present the design using this template:
110143
| ... | ... | ... | ... | ... |
111144

112145
[Repeat for each group]
113-
114-
## Quality Validation
115-
[Run quality principles below]
116146
```
117147

118-
### 5. Validate
148+
---
149+
150+
## Audit
151+
152+
Applies to both modes. Run after design, or directly if auditing an existing dashboard.
153+
154+
The core principles are: graphs should earn their place with alert thresholds, thresholds should sit close to normal traffic, a business section should exist at the top, and the dashboard should be readable by someone with zero service knowledge.
155+
156+
These are guiding principles — not a rigid checklist. Apply judgment based on the product and business context. A context-providing metric (like deployment events) may earn its place without a threshold. A service with unusual traffic patterns may need different proximity rules.
157+
158+
### 1. Fetch the dashboard
119159

120160
```bash
161+
# If given a service name, list all dashboards and identify the relevant one by title
121162
pup dashboards list
163+
164+
# If given a URL, extract the dashboard ID from the path (e.g., /dashboard/abc-def-ghi/...)
165+
166+
# Get the full dashboard definition (includes the dashboard URL in the response)
122167
pup dashboards get <dashboard-id>
168+
169+
# Verify real metric names exist
123170
pup metrics list --filter="trace.http.request.*"
124171
```
125172

173+
Parse the response to build an inventory of all widgets, groups, and their configurations.
174+
175+
### 2. Build widget inventory
176+
177+
Read [references/widgets.md](references/widgets.md) for the full widget prefix system before cataloging.
178+
179+
Catalog every widget in the dashboard:
180+
181+
| Widget Title | Prefix | Type | Group | Has Alert Threshold | Threshold Value | Notes |
182+
|-------------|--------|------|-------|--------------------:|----------------|-------|
183+
| ... | I0/P1/D0/B0/— | ... | ... | ... | ... | ... |
184+
185+
Focus on timeseries and query value widgets — these are the primary candidates for alert threshold markers.
186+
187+
### 3. Audit alert thresholds
188+
189+
Read [references/thresholds.md](references/thresholds.md) for threshold marker principles, configuration details, and findings format.
190+
191+
For each timeseries widget, check:
192+
- Does it have a marker/threshold line configured?
193+
- Is the marker colored red for visibility?
194+
- Does the threshold correspond to an actual monitor/alert?
195+
196+
### 4. Audit threshold proximity
197+
198+
Read [references/thresholds.md](references/thresholds.md) for proximity guidance, Y-axis configuration rules, and findings format.
199+
200+
For each widget with a threshold, check:
201+
- What is the typical (normal) value range?
202+
- Where is the threshold set?
203+
- Is there excessive whitespace between the normal line and the alert line?
204+
- Is the Y-axis auto-scaled or explicitly set?
205+
206+
### 5. Audit business section
207+
208+
**Principle**: A dedicated Business (`B`) group should exist at the top of the dashboard with 5-8 key metrics for immediate outage identification. Business metrics are customer-visible outcomes — not infrastructure or domain internals. The specific metrics should reflect the product's business transactions, not generic traffic and error rates.
209+
210+
Check:
211+
- Does a Business group exist (named "Business", "B", or equivalent)?
212+
- Is it the first group on the dashboard?
213+
- Do its widgets use the `B0-N:` prefix?
214+
- Does it contain 5-8 metrics covering: customer-visible success rates, key transaction flows, and SLA-impacting latency?
215+
- Can someone determine "are customers affected?" within 5 seconds of opening the dashboard?
216+
217+
**Findings format**:
218+
219+
```markdown
220+
#### Business Section Audit
221+
222+
**Status**: MISSING / INCOMPLETE / OK
223+
224+
**Current state**: [Description of what exists]
225+
226+
**Recommended metrics** (if missing or incomplete):
227+
1. B0: Key transaction success rate (are critical flows completing?)
228+
2. B0: Customer-facing error rate (are requests failing for customers?)
229+
3. B1: API p99 latency (are responses slow for customers?)
230+
4. B1: Total request rate (are we receiving traffic?)
231+
5. B2: Queue depth or processing lag (is async work backing up?)
232+
6. B2: Key business event throughput (e.g. orders created, payments processed)
233+
```
234+
235+
### 6. Apply zero-knowledge viewer test
236+
237+
**Principle**: Someone with zero knowledge of the service should be able to spot problems by looking for red indicators.
238+
239+
Evaluate:
240+
- Can you identify a problem in under 10 seconds without reading widget titles?
241+
- Are thresholds visible as red lines on every graph?
242+
- Is conditional formatting applied to query value widgets (green/yellow/red)?
243+
- Are group names self-explanatory?
244+
- Is there a note widget with runbook links or team ownership?
245+
246+
**Findings format**:
247+
248+
```markdown
249+
#### Zero-Knowledge Readability Audit
250+
251+
| Check | Status | Finding |
252+
|-------|--------|---------|
253+
| Problems visible in <10s | FAIL | No red lines on 8 of 12 graphs |
254+
| Conditional formatting on QV widgets | PARTIAL | 2 of 4 QV widgets have thresholds |
255+
| Group names self-explanatory | OK | All groups use clear names |
256+
| Runbook/ownership note | MISSING | No note widget with team info |
257+
```
258+
259+
### 7. Generate audit report
260+
261+
Compile all findings into a structured report:
262+
263+
```markdown
264+
# Dashboard Audit: [Dashboard Title]
265+
266+
**Dashboard ID**: [id]
267+
**URL**: [url]
268+
**Review date**: [date]
269+
270+
## Summary
271+
272+
[2-3 sentence summary: overall health of the dashboard, critical issues count]
273+
274+
## Critical Issues
275+
276+
[List issues that must be fixed before the dashboard is production-ready]
277+
278+
## Alert Threshold Audit
279+
[From step 3]
280+
281+
## Threshold Proximity Audit
282+
[From step 4]
283+
284+
## Business Section Audit
285+
[From step 5]
286+
287+
## Zero-Knowledge Readability Audit
288+
[From step 6]
289+
290+
## Recommended Actions
291+
292+
### Must Fix
293+
1. [Action item with specific widget and group reference]
294+
295+
### Should Fix
296+
1. [Action item]
297+
298+
### Nice to Have
299+
1. [Action item]
300+
```
301+
126302
---
127303

128304
## Quality Principles
129305

306+
- [ ] Widget queries use real metric names verified via `pup metrics list` — no invented metric names
130307
- [ ] Dashboard reflects the actual product and business — metrics tailored to the domain
131-
- [ ] Dashboard title is concise (no environment, region, or version)
132-
- [ ] Template variables defined for env, service, and relevant scopes (default `*`)
308+
- [ ] Dashboard title follows `[service] Purpose` pattern — no "Dashboard" suffix, no environment in the title
309+
- [ ] `title` field updated in the JSON (not just the filename) — redeploy after any title change
310+
- [ ] Template variables match the dashboard type — see [references/layouts.md](references/layouts.md)
311+
- [ ] Widget queries use template variable scopes verified via `pup metrics list` — no hardcoded env, service, or host values; use the variable set appropriate for the dashboard type (see [references/layouts.md](references/layouts.md))
133312
- [ ] **Business group** with 5-8 `B`-prefixed metrics tailored to the service's customer-visible outcomes
134313
- [ ] Groups ordered macro-to-micro (business → overview → details)
135-
- [ ] **Timeseries widgets have alert threshold markers** (red lines) where the metric is alertable
314+
- [ ] **Every widget title uses the layer-priority prefix** (`I0:`, `P1:`, `D0:`, `B0:`, etc.) — see [references/widgets.md](references/widgets.md)
315+
- [ ] Widget titles use sentence case, don't repeat group name
316+
- [ ] **Timeseries widgets have alert threshold markers** (red lines) where the metric is alertable — see [references/thresholds.md](references/thresholds.md)
136317
- [ ] **Thresholds close to normal traffic** — no excessive whitespace
137318
- [ ] **Zero-knowledge readability** — someone with no service knowledge can spot problems via red indicators
138-
- [ ] **Widget titles prefixed** with layer and priority (`I0:`, `P1:`, `D0:`, `B0:`, etc.)
139-
- [ ] Widget titles use sentence case, don't repeat group name
319+
- [ ] Query Value widgets have conditional formatting (green/yellow/red)
140320
- [ ] Every metric earns its place — if it spikes, someone can act on it
321+
- [ ] All audit findings include specific widget names and group references
322+
- [ ] Recommended actions categorized by priority (must/should/nice-to-have)
323+
- [ ] Dashboard URL included in audit report
141324

142325
## References
143326

144327
- **[Observability Frameworks](references/frameworks.md)** — RED, USE, Golden Signals, SLI/SLO with metric mappings
145328
- **[Layout & Structure](references/layouts.md)** — Template variables, group patterns, dashboard strategy, grid sizing, anti-patterns
146-
- **[Widgets](references/widgets.md)** — Widget types, display options, sizing, naming conventions
329+
- **[Widgets](references/widgets.md)** — Widget prefix system, types, display options, sizing, naming conventions
147330
- **[Alert Thresholds](references/thresholds.md)** — Threshold markers, proximity guide, Y-axis configuration

plugins/trogonstack-datadog/skills/datadog-design-dashboard/references/layouts.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,26 @@ Template variable conventions, group structure patterns, dashboard strategy trad
88

99
Template variables make one dashboard serve many contexts. Define them before laying out widgets.
1010

11-
**Standard variables** (include when applicable):
11+
**`env` is always required.** The remaining variables depend on the dashboard type:
12+
13+
| Dashboard Type | Template Variables |
14+
|---------------|-------------------|
15+
| Service Overview (RED), Debugging | `env` · `service` |
16+
| Infrastructure (USE) | `env` · `host` · `availability_zone` |
17+
| Executive / Golden Signals | `env` · `team` · `region` |
18+
19+
**Optional variables** (add when relevant to the dashboard type):
1220

1321
| Variable | Tag | Use Case |
1422
|----------|-----|----------|
15-
| `env` | `env` | Environment filtering (prod, staging, dev) |
16-
| `service` | `service` | Service scoping |
1723
| `region` | `region` | Regional filtering |
1824
| `availability_zone` | `availability_zone` | AZ-level drill-down |
1925
| `host` | `host` | Host-level investigation |
26+
| `endpoint` | `http.url` | Per-route investigation (Debugging dashboards) |
2027

21-
- Start with the broadest scope (`env`) and narrow down
28+
- For **service dashboards** (RED, Debugging): scope every widget query with `{$service,$env}`
29+
- For **infrastructure dashboards**: scope queries with `{$host,$env}` or `{$availability_zone,$env}` instead
30+
- For **executive dashboards**: scope queries with `{$team,$env}` or `{$region,$env}` instead
2231
- Use `*` as the default value so dashboards load with full scope
2332
- Never put environment or region in the dashboard title — that is what template variables are for
2433
- Name variables after the tag they filter on

0 commit comments

Comments
 (0)