Generated banner for Skill Authoring
Generated logo for Skill Authoring

Skill Authoring

Grafana LabsOfficialPublished by Grafana Labs

  • Skill
  • Meta (authoring, orchestration, planning, memory)
  • Agent tooling
  • Apache-2.0
  • No issues found

From the author

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").
— the description by Grafana Labs

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured approach to creating and maintaining agent skills within the Grafana ecosystem. It defines a canonical structure for SKILL.md files, including YAML frontmatter, progressive disclosure patterns, and a validation feedback loop. It is designed to help developers align their skills with specific rubrics covering conciseness, actionability, workflow clarity, and progressive disclosure, ensuring they pass automated CI gates and trigger effectively for users.

What it does

  • Provides a rubric for auditing and scoring skill documentation.
  • Defines the canonical SKILL.md structure and bundle layout.
  • Implements a validate-fix-rerun feedback loop for skill optimization.
  • Offers guidance on progressive disclosure and splitting strategies for large documentation.
  • Details trigger patterns to ensure skills are correctly identified by agents.
  • Lists common anti-patterns to avoid during skill development.

When to use it

  • When creating a new skill within the repository.
  • When reviewing a skill pull request.
  • When a skill fails the CI merge gate or receives a low review score.
  • When a skill is not triggering as expected during agent interactions.
  • When restructuring long documentation into a bundle.
  • When seeking advice on optimizing or fixing existing skill files.

Advantages

  • Standardizes skill development across the repository.
  • Provides actionable feedback based on automated review scores.
  • Reduces token usage through progressive disclosure strategies.
  • Ensures consistent trigger behavior via pushy description patterns.
  • Facilitates easier maintenance through modular bundle layouts.

Usage examples

“How do I improve my skill's review score?”
The agent will guide you through the Tessl review process, identifying specific dimensions like conciseness or actionability that need improvement based on the rubric.
“My skill isn't triggering when I ask for help. What should I do?”
The agent will audit your skill's description against the pushy-description pattern and suggest updates to ensure it includes the necessary trigger terms.
“How should I split a long SKILL.md file?”
The agent will provide strategies for splitting content into references/ files based on domain, depth, or format to maintain the three-level loading model.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/grafana/skill-authoring/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip skill-authoring.zip -d .agents/skills

Documentation by Grafana Labs

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 name — anthropic 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

Files

references/anti-patterns.md

Anti-patterns: what NOT to do in a skill

Distilled from Anthropic's Agent Skills best practices, skill-creator SKILL.md, and the Tessl rubric this repo's CI gate uses.

Description anti-patterns

First-person / second-person voice
# Wrong
description: I can help you process Excel files and generate reports.
description: You can use this to process Excel files.

# Right (third-person)
description: Processes Excel files and generates reports. Use when analyzing spreadsheets, building pivot tables, or generating charts from .xlsx data.
Vague "what"
# Wrong
description: Helps with metrics queries.

# Right (specific actions + concrete outputs)
description: Write PromQL queries for Prometheus and Grafana Mimir. Calculates rates, builds histogram quantiles, debugs cardinality, and optimizes slow queries. Use when writing metric queries, building Grafana panels, working with recording rules, or troubleshooting Prometheus performance.
Missing "Use when" trigger
# Wrong (no triggers — agent can't tell when to load it)
description: PromQL query writing for Prometheus.

# Right (explicit triggers)
description: PromQL query writing for Prometheus and Grafana Mimir. Use when writing metric queries, building Grafana panels, calculating rates, working with histograms, or optimizing slow queries.
No trigger variations / no pushy clause
# Wrong (only the canonical term — agent skips this when user says synonyms)
description: Use when writing k6 documentation.

# Right (variations + pushy clause)
description: ... Use when working on k6 documentation, the k6 changelog, the k6 release notes, k6 API reference, k6 TypeScript types, load testing docs - even if the user doesn't explicitly say "documentation".
Reserved words in name
# Wrong
name: anthropic-helper
name: claude-tools

# Right
name: skill-authoring
name: prompt-helper

Body anti-patterns

Time-sensitive language
# Wrong (rots — "after August 2025" is meaningless in 2027)
If you're doing this before August 2025, use the old API.
After August 2025, use the new API.

# Right (`<details>` for legacy info, current path inline)
## Current method
Use the v2 API endpoint: `api.example.com/v2/messages`

<details>
<summary>Legacy v1 API (deprecated 2025-08)</summary>

The v1 API used: `api.example.com/v1/messages`. No longer supported.
</details>
Windows-style paths
# Wrong (breaks on Unix)
Run `scripts\helper.py` to process the input.

# Right (forward slashes everywhere)
Run `scripts/helper.py` to process the input.
Inconsistent terminology

Pick one term per concept and stick with it. Mixing breaks Claude's pattern-matching:

# Wrong (same concept, three names)
The API endpoint is /messages. Send a POST to the URL. The API route accepts JSON.

# Right (one term)
The API endpoint is /messages. Send a POST to the endpoint. The endpoint accepts JSON.
Heavy-handed MUST markers without justification
# Wrong (no explanation, feels like noise)
You MUST validate the input. You MUST handle errors. You MUST log the result.

# Right (explain why, reserve MUST for genuine hard constraints)
Validate the input before submitting — the API returns a 422 for malformed payloads
without telling you which field failed, which is hard to debug after the fact.

Always handle the 429 response with exponential backoff; the rate limiter resets
on a sliding window, not a fixed window.
"There are many ways to do this" hedging
# Wrong (forces Claude to pick — wastes time on irrelevant alternatives)
You can use pypdf, or pdfplumber, or PyMuPDF, or pdf2image. Each has trade-offs...

# Right (pick a default, mention the escape hatch)
Use pdfplumber for text extraction. For scanned PDFs requiring OCR, use pdf2image
with pytesseract instead.
Dangling references
# Wrong (file doesn't exist)
For full setup, see [references/setup-guide.md](references/setup-guide.md)

The linter doesn't catch this. Reviewers should. Either create the file or remove the link.

Too-deep reference chains
# Wrong: SKILL.md → advanced.md → details.md
# (Claude may preview with `head -100` and miss content past level 2)

# Right: keep all references one level deep from SKILL.md
SKILL.md
├── references/advanced.md
└── references/details.md

Workflow anti-patterns

Implicit ordering
# Wrong (ordering is in the prose; easy to miss)
Configure X. Make sure to do Y before X actually. Don't forget Z either.

# Right (explicit numbered steps)
1. Do Y first
2. Then configure X
3. Then run Z to verify
No validation checkpoints
# Wrong (no way to know if step 1 worked before doing step 2)
1. Create the contact point
2. Add the notification policy
3. Write the alert rule

# Right (validate after each step)
1. Create the contact point
   - **Verify**: `curl .../api/v1/provisioning/contact-points` returns it
2. Add the notification policy
   - **Verify**: send a test alert; output should show the contact point name
3. Write the alert rule
   - **Verify**: alert fires correctly under simulated conditions
"Punting to Claude" in scripts
# Wrong (script lets Claude figure out failure)
def process_file(path):
    return open(path).read()   # fails on FileNotFoundError, no fallback

# Right (handle the error explicitly)
def process_file(path):
    try:
        with open(path) as f:
            return f.read()
    except FileNotFoundError:
        print(f"File {path} not found, creating default")
        with open(path, "w") as f:
            f.write("")
        return ""
Voodoo constants
# Wrong (no justification for the values)
TIMEOUT = 47
RETRIES = 5

# Right (self-documenting)
# HTTP requests typically complete within 30 seconds; longer timeout for slow networks
REQUEST_TIMEOUT = 30
# Three retries balances reliability vs speed; most flakes resolve by the second retry
MAX_RETRIES = 3

Structural anti-patterns

Skill body acts as a reference dump

If the skill has no workflow guidance and is just a list of API endpoints / config snippets / capabilities, the user has to do all the orchestration themselves. Tessl scores this 1-2/3 on workflow_clarity.

Fix: pick the 2-3 most common user tasks, write numbered workflows for them at the top, and move the reference-dump material to references/<topic>.md.

One mega-SKILL.md when domains are clearly separable

If the skill covers AWS + GCP + Azure in one file, Claude loads all three even when the user only needs one. Split per domain:

cloud-deploy/
├── SKILL.md (overview + selection)
└── references/
    ├── aws.md
    ├── gcp.md
    └── azure.md
Skipping marketplace registration

The skill is functionally created on disk but not installable from any marketplace. CI's validate job catches inter-manifest divergence but doesn't flag a skill that's missing from all three.

After creating the skill directory:

  1. Add the path to .claude-plugin/marketplace.json → relevant plugin's skills array

  2. Same for .cursor-plugin/marketplace.json

  3. Same for .agents-plugin/marketplace.json

All three must list the same skill path. Keep them in sync.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Grafana Labs
Publisher
Grafana Labs (Official)
Source
grafana/skills · skills/grafana-core/skill-authoring · commit 8fb72a5
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Grafana Labs or Grafana Labs.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download skill-authoring.zip