CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

plugin-bundle-size

Optimise Grafana app plugin bundle size using React.lazy, Suspense, and webpack code splitting. Use when the user asks to reduce plugin bundle size, optimise module.js, add code splitting, improve initial plugin load performance, split plugin chunks, lazy load plugin pages, or help implement lazy loading in a Grafana app plugin. Triggers on phrases like "optimise plugin bundle size", "module.js is too large", "plugin is slow to load", "code split the plugin", "reduce initial JS payload", or "help me with Suspense in my plugin".

Quality

93%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

88%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A well-engineered procedural skill: an 8-step workflow with baseline/verify loops, fully executable code, and genuine one-level-deep reference files for the datasource-plugin variant and troubleshooting. The main improvement is moving the ~65-line CI bundle-size YAML (Step 1) into a reference file to tighten the main body and sharpen the overview role.

Suggestions

Move the two full GitHub Actions workflow YAML blocks (Step 1) into a references/bundle-size-ci.md file, keeping a two-line pointer plus the key symlink caveat in the body — this would raise both conciseness and progressive_disclosure.

Trim the reference list to the Grafana-specific links (collector-app, plugin-actions); the generic web.dev/surviveJS/webpack links cover concepts Claude already knows.

In the Step 4 analysis block, add a one-line expected-output hint (e.g. what a pre-split module.ts import list typically looks like) so readers can self-check their grep results.

DimensionReasoningScore

Conciseness

Quotes: "If a file is imported by module.ts directly (even transitively), it ends up in module.js" and the symlink workaround ("ln -s plugin/yarn.lock yarn.lock") — dense, non-obvious, Grafana-specific guidance with no tutorial padding about React.lazy or webpack basics. Minor over-length comes from ~65 lines of inline CI workflow YAML ("# .github/workflows/bundle-size.yml") that is tangential to the core splitting skill — efficient overall with trimmable sections, matching the 4 anchor rather than the 5 anchor's 'every token earns its place'.

4 / 5

Actionability

Quotes: complete module.tsx example ("const LazyApp = lazy(async () => { await initFaro(); return import('./features/app/App').then(m => ({ default: m.App })); })"), executable bash ("jq -r '"\(.id) — \(.type)"' src/plugin.json"), and copy-paste webpackChunkName snippets. The code covers the common cases (named vs default exports, barrels, singletons) and is directly executable — matches the 5 anchor.

5 / 5

Workflow Clarity

Quotes: "Measure the current PRODUCTION bundle size BEFORE making any changes" (baseline checkpoint in Step 2), Step 7's target table ("module.js size < 200 KB | Total JS chunk count 15–25"), and Step 8's manual verification checklist ("Navigate to every route — each triggers a new chunk download", "Check Console for errors"). Steps 1–8 are clearly sequenced with explicit validation and recovery paths (Step 6 over-splitting remediation, troubleshooting reference) — matches the 5 anchor's explicit validation steps and feedback loops.

5 / 5

Progressive Disclosure

Quotes: "see [references/datasource-plugins.md](references/datasource-plugins.md)" and "see [references/troubleshooting.md](references/troubleshooting.md)" — both files exist in the bundle, are one level deep, and are signalled at the point of need; the datasource reference correctly parks a sub-case out of the main flow. Slightly below the 5 anchor because the body still inlines large self-contained content (two full CI workflow YAML blocks) that fits the bundle's reference pattern, leaving the overview role less clean than 'appropriately split'.

4 / 5

Total

18

/

20

Passed

Description

95%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description: concrete domain and techniques in the 'what' clause, an explicit 'Use when' clause, and a rich set of natural trigger phrases including file names and user-voiced complaints. The only minor gap is that the capability list stays within one technique family rather than enumerating the full scope (measurement, CI, datasource plugins) the skill actually covers.

DimensionReasoningScore

Specificity

Quotes: "Optimise Grafana app plugin bundle size using React.lazy, Suspense, and webpack code splitting" plus enumerated actions ("reduce plugin bundle size, optimise module.js, add code splitting, ... lazy load plugin pages"). Several concrete actions with named tools, but they are all facets of one optimisation technique — not the comprehensive multi-action coverage of the 5 anchor (no measuring, CI, or datasource-plugin coverage). Clearly above the 3 anchor's '1-2 concrete actions'.

4 / 5

Completeness

Explicitly answers both: what ("Optimise Grafana app plugin bundle size using React.lazy, Suspense, and webpack code splitting") and when ("Use when the user asks to... Triggers on phrases like..."), with concrete trigger phrases — a direct match to the 5 anchor exemplar. Neither the what nor the when is vague, so 4 ('when could be more explicit') does not fit.

5 / 5

Trigger Term Quality

Quotes: "optimise plugin bundle size", "module.js is too large", "plugin is slow to load", "code split the plugin", "reduce initial JS payload", "help me with Suspense in my plugin" — comprehensive natural phrasings including file names and synonyms users would actually say. Matches the 5 anchor's 'natural terms including synonyms and file extensions' better than the 4 anchor's 'a few natural terms missing'.

5 / 5

Distinctiveness Conflict Risk

Quotes: "Grafana app plugin", "module.js", "Grafana app plugin" trigger scoping — a clear niche (Grafana app-plugin bundle optimisation) with distinct triggers. Only marginal overlap with generic web-performance skills; matches the 5 anchor's 'clear niche with distinct triggers; minimal conflict risk'.

5 / 5

Total

19

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

grafana/skills

Path

skills/grafana-plugins/plugin-bundle-size/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.