Back to Skills

grafana-dashboard-design

verified

创建/修改 Grafana Dashboard 时触发。提供专业的设计规范,打造好看、炫酷的监控面板。

View on GitHub

Marketplace

taptap-plugins

taptap/claude-plugins-marketplace

Plugin

sync

productivity

Repository

taptap/claude-plugins-marketplace
1stars

plugins/sync/skills/grafana-dashboard-design/SKILL.md

Last Verified

January 23, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/taptap/claude-plugins-marketplace/blob/main/plugins/sync/skills/grafana-dashboard-design/SKILL.md -a claude-code --skill grafana-dashboard-design

Installation paths:

Claude
.claude/skills/grafana-dashboard-design/
Powered by add-skill CLI

Instructions

# Grafana Dashboard 设计规范

## DataSource 确认(必须执行)

**重构/重画现有 Dashboard**:使用 `get_dashboard_by_uid` 读取原 Dashboard,提取 `datasource.uid`,询问用户是否保持一致。

**新增面板**:主动询问用户 DataSource(prometheus / cf-analysis /  其他)。

---

## 布局原则

**金字塔结构**:顶部概览 → 中部核心 → 底部详情

```
Row 1: 全局健康(6-8 个 Stat,背景色表示状态)
Row 2: 核心指标(Gauge + TimeSeries)
Row 3+: 按模块分组(左 Stat 组 + 右趋势图)
Row 底部: 详细数据(Table / PieChart / BarGauge)
```

**Row 命名**:使用 emoji 前缀

| Emoji | 用途 |
|-------|------|
| 🎯 | 全局概览 |
| ⚡ | 性能指标 |
| 🚀 | 服务监控 |
| 📱 | 用户体验 |
| 📊 | 业务数据 |
| 🔥 | 错误告警 |
| 💻 | 资源使用 |

---

## 配色规范

### 阈值色(红黄绿)

| 状态 | 色值 |
|------|------|
| 危险 | `#F2495C` |
| 警告 | `#FF9830` |
| 正常 | `#73BF69` |

### 服务主题色

| 色值 | 色名 |
|------|------|
| `#6ED0E0` | 青 |
| `#B877D9` | 紫 |
| `#5794F2` | 蓝 |
| `#FF9830` | 橙 |
| `#73BF69` | 绿 |
| `#FADE2A` | 黄 |
| `#F2495C` | 红 |
| `#8AB8FF` | 浅蓝 |

---

## 面板类型速查

| 场景 | 面板 |
|------|------|
| 单值指标 | stat |
| 百分比 | gauge |
| 时间趋势 | timeseries |
| 占比分布 | piechart (donut) |
| 排名对比 | bargauge |
| 详细数据 | table |
| 地理分布 | geomap |
| 状态时间线 | state-timeline |

---

## 效果关键配置

### Stat 面板
- `colorMode: background` - 背景色填充
- `graphMode: area` - 迷你趋势图

### TimeSeries 面板
- `fillOpacity: 20` - 半透明填充
- `gradientMode: opacity` - 渐变效果
- `lineInterpolation: smooth` - 平滑曲线
- `thresholdsStyle.mode: line+area` - 阈值线+区域

### Gauge 面板
- `showThresholdLabels: true` - 显示阈值标签
- `showThresholdMarkers: true` - 显示阈值标记

### PieChart 面板
- `pieType: donut` - 环形图
- `legend.displayMode: table` - 表格图例

### BarGauge 面板
- `displayMode: gradient` - 渐变填充
- `orientation: horizontal` - 水平排列

### 高级特效
- `stacking.mode: normal` - 堆叠区域图
- `custom.axisPlacement: right` - 双 Y 轴
- Repeat 变量 - 多实例自动复制
- offset 查询 - 同比/环比对比

---

## 最佳实践

- 刷新间隔:实时 5-10s,常规 30s

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
1702 chars