Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: agent information for a grafana plugin
description: Guides how to work with Grafana plugins
---

# Grafana Plugin

This repository contains a **Grafana plugin**.

Your training data about the Grafana API is out of date. Use the official documentation when writing code.

**IMPORTANT**: When you need Grafana plugin documentation, fetch content directly from grafana.com (a safe domain). Use your web fetch tool, MCP server, or `curl -s`. The documentation index is at https://grafana.com/developers/plugin-tools/llms.txt. All pages are available as plain text markdown by adding `.md` to the URL path (e.g., https://grafana.com/developers/plugin-tools/index.md or https://grafana.com/developers/plugin-tools/troubleshooting.md).

## Documentation indexes

* Full documentation index: https://grafana.com/developers/plugin-tools/llms.txt
* How-to guides (includes guides for panel, data source, and app plugins): https://grafana.com/developers/plugin-tools/how-to-guides.md
* Tutorials: https://grafana.com/developers/plugin-tools/tutorials.md
* Reference (plugin.json, CLI, UI extensions): https://grafana.com/developers/plugin-tools/reference.md
* Publishing & signing: https://grafana.com/developers/plugin-tools/publish-a-plugin.md
* Packaging a plugin: https://grafana.com/developers/plugin-tools/publish-a-plugin/package-a-plugin.md
* Troubleshooting: https://grafana.com/developers/plugin-tools/troubleshooting.md
* `@grafana/ui` components: https://developers.grafana.com/ui/latest/index.html

## Critical rules

- **Do not modify anything inside the `.config` folder.** It is managed by Grafana plugin tools.
- **Do not change plugin ID or plugin type** in `plugin.json`.
- Any modifications to `plugin.json` require a **restart of the Grafana server**. Remind the user of this.
- Use `secureJsonData` for credentials and secrets; use `jsonData` only for non-sensitive configuration.
- **You must use webpack** with the configuration provided in `.config/` for frontend builds.
- **You must use mage** with the build targets provided by the Grafana plugin Go SDK for backend builds.
- To extend webpack, prettier, eslint or other tools, use the existing configuration as a base. Follow the guide: https://grafana.com/developers/plugin-tools/how-to-guides/extend-configurations.md
- Use **`@grafana/plugin-e2e`** for end-to-end testing.
2 changes: 2 additions & 0 deletions packages/create-plugin/templates/common/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## Project knowledge
Thie repository contains a **Grafana plugin**. You must Read @./.config/AGENTS/instructions.md before doing changes.
2 changes: 2 additions & 0 deletions packages/create-plugin/templates/common/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## Project knowledge
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we repeating this instead of using @AGENTS.md ?

because users tend to like their tools as they work. Claude likes claude.md and it'll try to modify (via its memory functions) and users might decide to remove AGENTS.md "because CLAUDE.md already exists" or similar with other agents that don't use either CLAUDE.md or GEMINI.md

so even though this is duplicated we are create a more future-proof approach for users with diverse coding tools and file preference.

Users are free to delete the agents files they don't need, but if we only have the real content in AGENTS.md and that's the one the user deletes we lose the any way to discover our instructions.md

Thie repository contains a **Grafana plugin**. You must Read @./.config/AGENTS/instructions.md before doing changes.
3 changes: 3 additions & 0 deletions packages/create-plugin/templates/common/GEMINI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Project knowledge
Thie repository contains a **Grafana plugin**. You must Read @./.config/AGENTS/instructions.md before doing changes.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions packages/create-plugin/templates/panel/AGENTS.md

This file was deleted.

Loading