fisker086/keyops/grafana
Claude Code and agent skill by fisker086/keyops
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Grafana 仪表盘查询。当目标环境配置了 graf_url 时启用。用于列出仪表盘、获取仪表盘中的 PromQL 查询,便于复用已有面板的查询逻辑。
Install
npx vskill@latest install fisker086/keyops/grafanaSKILL.md
Grafana 技能
当用户任务涉及查看 Grafana 仪表盘、从仪表盘提取 PromQL、复用已有监控面板逻辑时,使用本技能。
适用场景
- 了解环境中有哪些仪表盘
- 从仪表盘提取 PromQL 表达式,避免手写
- 巡检时参考已有监控面板的查询
- 故障排查时快速定位相关仪表盘
工具箱详解
1. list_all_dashboards
获取 Grafana 中所有仪表盘列表,返回 title、uid、tags。
| 参数 | 类型 | 必填 | 说明 | |
|---|---|---|---|---|
| - | - | - | 无需参数 |
示例:{}
2. get_dashboard_metadata
获取指定 UID 仪表盘中的 PromQL 查询,用于提取可复用的查询表达式。
| 参数 | 类型 | 必填 | 说明 | |
|---|---|---|---|---|
| uid | string | 是 | 仪表盘 UID,从 list_all_dashboards 获取 |
示例:{"uid": "abc123"}
典型流程
- 调用
list_all_dashboards获取仪表盘列表 - 根据 title/tags 筛选相关仪表盘
- 调用
get_dashboard_metadata提取该仪表盘的 PromQL - 将提取的 PromQL 传给 Prometheus 技能的
execute_promql_query执行
参数兜底与默认动作(强约束)
- 未提供
uid时,必须先list_all_dashboards,再让用户确认目标仪表盘 - 同名或近似仪表盘多条命中时,先给候选列表(title + uid),不自行拍板
- 提取到多个 PromQL 时,优先选择与用户问题最相关的面板查询并说明选择理由
失败重试与降级策略
get_dashboard_metadata失败时,先确认 uid 是否仍有效(可能已删除/迁移)- 若 Grafana API 不可用,降级到 Prometheus 技能:给出可替代的 PromQL 草案
- 禁止虚构仪表盘或 PromQL;未获取到时明确说明“未检索到可用面板/查询”
标准输出结构(建议统一)
- 结论:找到哪些相关仪表盘/是否提取到可用查询
- 证据:仪表盘 title、uid、匹配标签、提取到的核心 PromQL
- 下一步:推荐执行的
execute_promql_query参数(query/duration/step)
与 Prometheus 技能配合
Grafana 技能通常与 Prometheus 技能配合使用:Grafana 负责发现和提取查询,Prometheus 负责执行。若环境同时配置了两者,可先查 Grafana 再查 Prometheus。
激活条件
目标环境已配置 graf_url 和 graf_token(Grafana API Token,需 Viewer 及以上权限)。
角色化评审要求(发布前)
- 适用角色:
inspector、sre - 评审模式:
inspector:走极速评审(2-3 分钟)sre:在极速评审基础上,额外检查“证据链完整”- 必查三板斧:
- 参数兜底与默认值
- 失败重试与降级策略
- 输出结构(结论/证据/下一步)
sre额外必查:- 仪表盘筛选/PromQL 提取结论是否可被 title、uid、标签、查询语句复核
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinginternal/aiassistant/skills/grafana/SKILL.md
Popularity
- Repository stars
- 30
- Repository forks
- 14
- 7-day trend score
- 17
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/fisker086/keyops/grafana)