Agent Skillsgrafana/skills › skill-authoring

skill-authoring

GitHub

指导如何编写、审查和优化Grafana SKILL.md文件,确保符合Anthropic规范和CI门禁标准。涵盖触发描述撰写、渐进式披露结构、四维度评分rubric及验证修复流程,适用于新建技能、PR审查或优化低分技能。

skills/grafana-core/skill-authoring/SKILL.md grafana/skills

Trigger Scenarios

创建新的 skill 审查 skill PR skill 的 Tessl 评分低于 75 skill 描述未被代理正确触发 重构长 SKILL.md 为 bundle 用户询问如何编写、改进、优化、审计或修复 skill

Install

npx skills add grafana/skills --skill skill-authoring -g -y
More Options

Non-standard path

npx skills add https://github.com/grafana/skills/tree/main/skills/grafana-core/skill-authoring -g -y

Use without installing

npx skills use grafana/skills@skill-authoring

指定 Agent (Claude Code)

npx skills add grafana/skills --skill skill-authoring -a claude-code -g -y

安装 repo 全部 skill

npx skills add grafana/skills --all -g -y

预览 repo 内 skill

npx skills add grafana/skills --list

SKILL.md

Frontmatter
{
    "name": "skill-authoring",
    "license": "Apache-2.0",
    "description": "Author, audit, and improve Grafana SKILL.md files against Anthropic's published Agent Skills guidance and the four-dimension rubric the grafana\/skills CI gate uses (conciseness, actionability, workflow clarity, progressive disclosure). Applies the canonical SKILL.md structure (YAML frontmatter + body + references\/ + scripts\/ + assets\/), the \"pushy description\" trigger pattern, the three-level progressive-disclosure model, and the validate-fix-rerun feedback loop. Use when creating a new skill in this repo, when reviewing a skill PR, when a skill's Tessl review score is below 75 (the merge gate), when a skill's description isn't getting picked up by agents, when restructuring a long SKILL.md into a bundle, or when the user asks how to write, improve, optimize, audit, or fix a skill - even if they don't say \"skill\" explicitly (e.g. \"this isn't triggering\", \"Tessl scored this 72\", \"split this doc\")."
}

Authoring & Improving Grafana Skills

How to write, review, and improve SKILL.md files so they pass the repo's CI gate and score well against the Anthropic-aligned rubric Tessl uses.

Critical rules (always)

  1. Description is the primary trigger — third-person, ≤1024 chars, must include explicit "Use when..." phrasing AND list concrete trigger terms users naturally say. See references/descriptions.md for the pushy-description pattern that combats undertriggering.
  2. Body under 500 lines — split into references/*.md if approaching the limit. SKILL.md is the routing layer, not the entire knowledge base.
  3. One level of nesting for references — link from SKILL.md directly, never SKILL.md → a.md → b.md. Claude may use head -100 previews on nested chains and miss content.
  4. Imperative voice — "Run X" not "You should run X" not "It is important to run X". Explain why over heavy-handed MUST markers.
  5. Concrete examples beat prose — copy-paste-ready commands, real config snippets. Tessl's actionability dimension scores this directly.
  6. No reserved words in nameanthropic and claude are forbidden in skill names.
  7. No time-sensitive language in the body — "after August 2025…" rots. Use an <details> "Old patterns" section for legacy info instead.
  8. Validate before committing./scripts/lint-skills.sh skills/<plugin>/<your-skill> clean + Tessl score ≥75 (run tessl skill review --json <dir>).

The rubric

CI fails any PR where a touched SKILL.md scores below 75 on four 0-3 dimensions: conciseness, actionability, workflow clarity, progressive disclosure. Full per-dimension scoring + Anthropic-doc mapping in references/rubric.md.

Score variance

The judge is an LLM and swings 7-10 points run-to-run. Local 94 commonly lands at CI 85. Ship only on three consecutive local 100s.

Decision tree for a new skill

  1. What product / domain does this skill belong to? Pick the right plugin folder: grafana-core/, grafana-cloud/, grafana-lgtm/, grafana-app-sdk/, grafana-k6/, grafana-plugins/. If none fits cleanly, ask the user before creating a new plugin group (a new group requires updating three marketplace.json files).

  2. Estimate body length.

  3. Write a "pushy" description first. The description is the only thing always loaded into context. If agents don't trigger the skill, nothing else matters. See references/descriptions.md for the pattern.

  4. Draft body with the four-dimension rubric in mind.

    • Cut every sentence Claude already knows (Conciseness)
    • Replace prose explanations with code blocks (Actionability)
    • Number every multi-step procedure + add a validation step at the end (Workflow clarity)
    • If you reach for <details>, consider whether that content belongs in references/ instead (Progressive disclosure)
  5. Register in marketplace manifests. Add the skill path to the skills array in all three:

    • .claude-plugin/marketplace.json
    • .cursor-plugin/marketplace.json
    • .agents-plugin/marketplace.json
  6. Validate locally.

    # 1. Lint clean (0 errors)
    ./scripts/lint-skills.sh skills/<plugin>/<your-skill>
    
    # 2. Tessl reviewScore ≥75 (the CI gate)
    tessl skill review --json skills/<plugin>/<your-skill> | jq '.review.reviewScore'
    
    # 3. If below 75 or you want ≥85: run --optimize (requires auth)
    tessl skill review --optimize --yes --max-iterations 3 skills/<plugin>/<your-skill>
    

    If the run fails: read the lint error / Tessl suggestion, fix, re-run. Don't open the PR until both checks pass cleanly. The feedback-loop pattern beats one-shot writing.

Fixing a low-scoring existing skill

  1. Read the judge's verbatim Suggestions text (non-JSON output):

    tessl skill review skills/<plugin>/<name>
    

    The Suggestions: block under each dimension names the exact sentences/sections to cut. Copy the suggestion — don't guess. Then verify the lowest dimension matches your read.

  2. Apply the fix pattern from references/rubric.md:

    • Conciseness 1-2 → cut intros, definitions, multi-line tables that mostly point to refs
    • Actionability 1-2 → replace prose with code blocks and CLI commands
    • Workflow clarity 1-2 → add numbered steps + validation checkpoints
    • Progressive disclosure 1-2 → split into references/*.md
  3. If the skill is intentionally a routing document (like grafana-k6/k6-docs), don't let --optimize inline the bundle back into SKILL.md. Hand-craft a minimal copy-paste "validation loop" inline so SKILL.md is independently actionable, while preserving the bundle.

  4. Re-score five times locally. Don't stop until all five runs hit 100 — see "Score variance" above for why.

Anti-patterns

See references/anti-patterns.md.

References

Version History

  • b583762 Current 2026-07-06 00:36

Same Skill Collection

skills/grafana-app-sdk/admission-control/SKILL.md
skills/grafana-cloud/loki-label-analyzer/SKILL.md
skills/grafana-cloud/send-data/SKILL.md
skills/grafana-datasources/datasources-provisioning/SKILL.md
skills/grafana-lgtm/loki/SKILL.md
skills/grafana-lgtm/prometheus/SKILL.md
skills/grafana-plugins/audit-and-reduce-dependencies/SKILL.md
skills/grafana-plugins/check-npm/SKILL.md
template/SKILL.md
skills/grafana-app-sdk/app-sdk-concepts/SKILL.md
skills/grafana-app-sdk/cue-kind-definition/SKILL.md
skills/grafana-app-sdk/reconciler-logic/SKILL.md
skills/grafana-cloud/adaptive-metrics/SKILL.md
skills/grafana-cloud/admin/SKILL.md
skills/grafana-cloud/app-observability/SKILL.md
skills/grafana-cloud/assistant-mcp/SKILL.md
skills/grafana-cloud/cloud-integrations/SKILL.md
skills/grafana-cloud/cost-management/SKILL.md
skills/grafana-cloud/database-observability/SKILL.md
skills/grafana-cloud/dpm-finder/SKILL.md
skills/grafana-cloud/fleet-management/SKILL.md
skills/grafana-cloud/infrastructure/SKILL.md
skills/grafana-cloud/ml-ai/SKILL.md
skills/grafana-cloud/oncall-irm/SKILL.md
skills/grafana-cloud/private-connectivity/SKILL.md
skills/grafana-cloud/prometheus-cardinality-troubleshooter/SKILL.md
skills/grafana-cloud/prometheus-label-strategy/SKILL.md
skills/grafana-cloud/synthetic-monitoring-checks/SKILL.md
skills/grafana-cloud/testing/SKILL.md
skills/grafana-core/alerting-irm/SKILL.md
skills/grafana-core/alloy/SKILL.md
skills/grafana-core/beyla/SKILL.md
skills/grafana-core/dashboarding/SKILL.md
skills/grafana-core/grafana-oss/SKILL.md
skills/grafana-core/opentelemetry/SKILL.md
skills/grafana-core/promql/SKILL.md
skills/grafana-k6/k6-cloud-investigate-test/SKILL.md
skills/grafana-k6/k6-docs/SKILL.md
skills/grafana-k6/k6-manage/SKILL.md
skills/grafana-k6/k6-perf-test-website/SKILL.md
skills/grafana-k6/k6-test-maintenance/SKILL.md
skills/grafana-k6/k6-trend-analysis/SKILL.md
skills/grafana-k6/k6/SKILL.md
skills/grafana-lgtm/mimir/SKILL.md
skills/grafana-lgtm/pyroscope/SKILL.md
skills/grafana-lgtm/tempo/SKILL.md
skills/grafana-plugins/grafana-scenes/SKILL.md
skills/grafana-plugins/plugin-bundle-size/SKILL.md
skills/grafana-plugins/react-19-plugin-migration/SKILL.md

Metadata

Files
0
Version
80bb293
Hash
0a00e733
Indexed
2026-07-06 00:36

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-04 15:15
浙ICP备14020137号-1 $bản đồ khách truy cập$