Scaffold and automate Grafana plugin projects using @grafana/create-plugin. Use when creating panel plugins, data source plugins, app plugins, or backend plugins. Handles project scaffolding, Docker dev environment setup, and plugin configuration.
From cce-grafananpx claudepluginhub nodnarbnitram/claude-code-extensions --plugin cce-grafanaThis skill is limited to using the following tools:
README.mdreferences/e2e-testing.mdreferences/plugin-types.mdreferences/sdk-patterns.mdreferences/signing-publishing.mdreferences/troubleshooting.mdscripts/create_plugin.shscripts/dev_server.shtemplates/app-plugin.jsontemplates/backend-plugin.jsontemplates/datasource-plugin.jsontemplates/docker-compose.yamltemplates/panel-plugin.jsonSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides slash command development for Claude Code: structure, YAML frontmatter, dynamic arguments, bash execution, user interactions, organization, and best practices.
Automate Grafana plugin project creation using the official @grafana/create-plugin scaffolder. This skill handles project scaffolding, development environment setup, and initial configuration for all plugin types.
Supported Grafana Version: v12.x+ only
Before scaffolding, verify these tools are installed:
# Check Node.js (v18+ required)
node --version
# Check npm
npm --version
# Check Docker (optional, for local development)
docker --version
If prerequisites are missing, guide the user to install them:
Use the official @grafana/create-plugin tool:
# Interactive scaffolding (recommended)
npx @grafana/create-plugin@latest
# The tool will prompt for:
# - Plugin type (panel, datasource, app, scenesapp)
# - Organization name (e.g., "myorg")
# - Plugin name (e.g., "my-panel")
# - Include backend? (y/n)
# Navigate to the new plugin directory
cd <orgName>-<pluginName>-<pluginType>
# Install frontend dependencies
npm install
# Install backend dependencies (if backend plugin)
go mod tidy
Option A: Docker with Hot-Reload (Recommended)
The scaffolder generates a docker-compose.yaml. For enhanced development with file watching, use the template from templates/docker-compose.yaml which includes Docker Compose develop features.
# Start Grafana with file watching (Docker Compose v2.22.0+)
docker compose watch
# Or standard start without watching
docker compose up -d
# Access Grafana at http://localhost:3000
# Login: admin / admin
With docker compose watch:
dist/ sync automatically (no restart)gpx_*) trigger container restartOption B: Manual
# Build and watch frontend
npm run dev
# Build backend (if applicable)
mage -v
# Configure Grafana to load unsigned plugins
# Add to grafana.ini: plugins.allow_loading_unsigned_plugins = <plugin-id>
npx @grafana/create-plugin@latest
# Select: panel
# Enter: organization name
# Enter: plugin name
# Backend: No (panels don't need backend)
Post-scaffolding:
src/components/SimplePanel.tsx for visualization logicsrc/types.ts for panel options interfacesrc/module.ts for option configurationnpx @grafana/create-plugin@latest
# Select: datasource
# Enter: organization name
# Enter: plugin name
# Backend: No
Post-scaffolding:
src/datasource.ts for query logicsrc/ConfigEditor.tsx for connection settingssrc/QueryEditor.tsx for query builder UInpx @grafana/create-plugin@latest
# Select: datasource
# Enter: organization name
# Enter: plugin name
# Backend: Yes
Post-scaffolding:
pkg/plugin/datasource.go for Go query logicQueryData and CheckHealth methodsmage -vnpx @grafana/create-plugin@latest
# Select: app
# Enter: organization name
# Enter: plugin name
# Backend: Optional
Post-scaffolding:
src/pages/ for app pagesplugin.json includes for navigation# Frontend development (watch mode)
npm run dev
# Frontend production build
npm run build
# Backend build (Go plugins)
mage -v
# Run unit tests
npm test
# Run E2E tests (requires Grafana running)
npx playwright test
# Lint code
npm run lint
# Type check
npm run typecheck
The @grafana/create-plugin scaffolder includes E2E testing setup with @grafana/plugin-e2e and Playwright.
# Install Playwright browsers
npx playwright install --with-deps chromium
# Start Grafana
docker compose up -d
# Run E2E tests
npx playwright test
# Run with UI mode (debugging)
npx playwright test --ui
See references/e2e-testing.md for comprehensive testing patterns, fixtures, and CI/CD setup.
@grafana/data, @grafana/ui, @grafana/runtime versions alignedplugin.json has correct id fieldnpm run dev completed without errorsmage -v to rebuild Go codeplugin_start_linux_* or gpx_* binaries exist in dist/plugin.json has "backend": truedocker compose down && docker compose up -ddocker compose logs grafanaFor complex architectural decisions, plugin design patterns, or troubleshooting, delegate to the grafana-plugin-expert agent which has access to current SDK documentation via Context7.