<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Build your plugin on Grafana Labs</title><link>https://grafana.com/docs/learning-hub/plugin-development/02-build-your-plugin/</link><description>Recent content in Build your plugin on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/learning-hub/plugin-development/02-build-your-plugin/index.xml" rel="self" type="application/rss+xml"/><item><title>Two ways to build your plugin</title><link>https://grafana.com/docs/learning-hub/plugin-development/02-build-your-plugin/01-two-ways-to-build/</link><pubDate>Wed, 11 Nov 2026 06:29:02 +0100</pubDate><guid>https://grafana.com/docs/learning-hub/plugin-development/02-build-your-plugin/01-two-ways-to-build/</guid><content><![CDATA[&lt;h1 id=&#34;two-ways-to-build-your-plugin&#34;&gt;Two ways to build your plugin&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;create-plugin&lt;/code&gt; tool writes the official starter project, called the &lt;strong&gt;scaffold&lt;/strong&gt;. It holds the plugin&amp;rsquo;s metadata, the entry point for its browser code, and a Docker setup that runs a local Grafana for you to test against.&lt;/p&gt;
&lt;h2 id=&#34;code-your-plugin-or-get-ai-to-code-for-you&#34;&gt;Code your plugin, or get AI to code for you&lt;/h2&gt;
&lt;p&gt;From the scaffold, you write the code yourself, or you prompt an AI coding assistant to write it inside the scaffold. Either way, you check it in your local Grafana as the plugin grows. During development, that local Grafana loads your plugin without a signature, so you don&amp;rsquo;t sign anything yet.&lt;/p&gt;

&lt;div class=&#34;learning-hub-image&#34;&gt;
  &lt;a href=&#34;two-ways-to-build.svg&#34; title=&#34;Generate the scaffold, then write the code yourself or prompt an AI coding assistant, then check it in your local Grafana&#34;&gt;
    &lt;img
      
      
      class=&#34;d-inline-block&#34;
      src=&#34;two-ways-to-build.svg&#34;
      
      alt=&#34;Generate the scaffold, then write the code yourself or prompt an AI coding assistant, then check it in your local Grafana&#34; width=&#34;800&#34; height=&#34;340&#34;/&gt;
    &lt;div class=&#34;learning-hub-image__zoom&#34;&gt;
      &lt;svg width=&#34;24&#34; height=&#34;24&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
        &lt;path d=&#34;M21 21L15 15M17 10C17 13.866 13.866 17 10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10Z&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
        &lt;path d=&#34;M10 7V13M7 10H13&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34;/&gt;
      &lt;/svg&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;

]]></content><description>&lt;h1 id="two-ways-to-build-your-plugin">Two ways to build your plugin&lt;/h1>
&lt;p>The &lt;code>create-plugin&lt;/code> tool writes the official starter project, called the &lt;strong>scaffold&lt;/strong>. It holds the plugin&amp;rsquo;s metadata, the entry point for its browser code, and a Docker setup that runs a local Grafana for you to test against.&lt;/p></description></item><item><title>What the scaffolding tool creates</title><link>https://grafana.com/docs/learning-hub/plugin-development/02-build-your-plugin/02-what-is-built/</link><pubDate>Wed, 11 Nov 2026 06:29:02 +0100</pubDate><guid>https://grafana.com/docs/learning-hub/plugin-development/02-build-your-plugin/02-what-is-built/</guid><content><![CDATA[&lt;h1 id=&#34;what-the-scaffolding-tool-creates&#34;&gt;What the scaffolding tool creates&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;create-plugin&lt;/code&gt; tool generates a project folder named after your answers, for example &lt;code&gt;myorg-myplugin-datasource&lt;/code&gt;. Its main parts are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;src/&lt;/code&gt;&lt;/strong&gt;: The frontend code, with starter code for your plugin type. &lt;code&gt;plugin.json&lt;/code&gt; holds the plugin&amp;rsquo;s metadata, and &lt;code&gt;module.ts&lt;/code&gt; (or &lt;code&gt;module.tsx&lt;/code&gt; for app plugins) is its entry point.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;pkg/&lt;/code&gt;&lt;/strong&gt;: The Go backend code, only if you chose a backend component.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;docker-compose.yaml&lt;/code&gt;&lt;/strong&gt;: A local Grafana to test your plugin in.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;README.md&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;CHANGELOG.md&lt;/code&gt;&lt;/strong&gt;: Documentation you need when you publish.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;whats-left-for-you&#34;&gt;What&amp;rsquo;s left for you&lt;/h2&gt;
&lt;p&gt;The scaffold doesn&amp;rsquo;t contain your plugin&amp;rsquo;s logic. That&amp;rsquo;s what you add next, yourself or with an AI coding assistant.&lt;/p&gt;
]]></content><description>&lt;h1 id="what-the-scaffolding-tool-creates">What the scaffolding tool creates&lt;/h1>
&lt;p>The &lt;code>create-plugin&lt;/code> tool generates a project folder named after your answers, for example &lt;code>myorg-myplugin-datasource&lt;/code>. Its main parts are:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>&lt;code>src/&lt;/code>&lt;/strong>: The frontend code, with starter code for your plugin type. &lt;code>plugin.json&lt;/code> holds the plugin&amp;rsquo;s metadata, and &lt;code>module.ts&lt;/code> (or &lt;code>module.tsx&lt;/code> for app plugins) is its entry point.&lt;/li>
&lt;li>&lt;strong>&lt;code>pkg/&lt;/code>&lt;/strong>: The Go backend code, only if you chose a backend component.&lt;/li>
&lt;li>&lt;strong>&lt;code>docker-compose.yaml&lt;/code>&lt;/strong>: A local Grafana to test your plugin in.&lt;/li>
&lt;li>&lt;strong>&lt;code>README.md&lt;/code>&lt;/strong> and &lt;strong>&lt;code>CHANGELOG.md&lt;/code>&lt;/strong>: Documentation you need when you publish.&lt;/li>
&lt;/ul>
&lt;h2 id="whats-left-for-you">What&amp;rsquo;s left for you&lt;/h2>
&lt;p>The scaffold doesn&amp;rsquo;t contain your plugin&amp;rsquo;s logic. That&amp;rsquo;s what you add next, yourself or with an AI coding assistant.&lt;/p></description></item><item><title>Build with an AI assistant</title><link>https://grafana.com/docs/learning-hub/plugin-development/02-build-your-plugin/03-build-with-an-ai-assistant/</link><pubDate>Wed, 11 Nov 2026 06:29:02 +0100</pubDate><guid>https://grafana.com/docs/learning-hub/plugin-development/02-build-your-plugin/03-build-with-an-ai-assistant/</guid><content><![CDATA[&lt;h1 id=&#34;build-a-plugin-with-an-ai-assistant&#34;&gt;Build a plugin with an AI assistant&lt;/h1&gt;
&lt;p&gt;You can build your own plugin using the &lt;code&gt;create-plugin&lt;/code&gt; tool and an AI coding assistant that writes the plugin code from your prompts.&lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t let the AI assistant create the plugin project itself. Always generate the scaffold with &lt;code&gt;create-plugin&lt;/code&gt; first, then prompt the assistant to work inside it.&lt;/p&gt;
&lt;p&gt;The scaffold also sets up your assistant. It includes &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;CLAUDE.md&lt;/code&gt;, and &lt;code&gt;GEMINI.md&lt;/code&gt; files that point the assistant to Grafana plugin instructions, including where to find the official documentation. This works out of the box with Claude Code, Gemini CLI, and assistants that read &lt;code&gt;AGENTS.md&lt;/code&gt;, such as Codex.&lt;/p&gt;
&lt;h2 id=&#34;you-steer-so-dont-let-the-assistant-guess&#34;&gt;You steer, so don&amp;rsquo;t let the assistant guess&lt;/h2&gt;
&lt;p&gt;Give the assistant clear prompts with guidelines and constraints, and keep it inside Grafana plugin patterns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Start with facts:&lt;/strong&gt; Give it the API details, the plugin type, and hard constraints first.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ask it to confirm before it acts:&lt;/strong&gt; This catches drift before it edits files.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tell it what not to do:&lt;/strong&gt; For example, no invented API fields.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ask it to name files before editing:&lt;/strong&gt; This makes its changes easier to review.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keep prompts milestone-sized:&lt;/strong&gt; Check each milestone in your local Grafana before you start the next.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;example-build-a-plugin-with-ai-tutorial&#34;&gt;Example: Build a plugin with AI tutorial&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&#34;/developers/plugin-tools/tutorials/build-ai-plugin&#34;&gt;Build a plugin with AI&lt;/a&gt; tutorial shows this approach end to end. You prompt an AI coding assistant to build a data source plugin that reads from a public bike service system, and then an app plugin whose pages show the stations in a list and on a map.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re building a different type of plugin, the hands-on steps won&amp;rsquo;t match yours, but the prompting patterns still apply.&lt;/p&gt;
]]></content><description>&lt;h1 id="build-a-plugin-with-an-ai-assistant">Build a plugin with an AI assistant&lt;/h1>
&lt;p>You can build your own plugin using the &lt;code>create-plugin&lt;/code> tool and an AI coding assistant that writes the plugin code from your prompts.&lt;/p></description></item><item><title>Build it yourself</title><link>https://grafana.com/docs/learning-hub/plugin-development/02-build-your-plugin/04-build-it-yourself/</link><pubDate>Wed, 11 Nov 2026 06:29:02 +0100</pubDate><guid>https://grafana.com/docs/learning-hub/plugin-development/02-build-your-plugin/04-build-it-yourself/</guid><content><![CDATA[&lt;h1 id=&#34;build-a-plugin-yourself&#34;&gt;Build a plugin yourself&lt;/h1&gt;
&lt;p&gt;To write the code yourself, follow the Plugin Tools tutorial for your plugin type. Each tutorial starts from the scaffold that &lt;code&gt;create-plugin&lt;/code&gt; generates and ends with a working plugin in your local Grafana.&lt;/p&gt;
&lt;h2 id=&#34;data-source-plugins&#34;&gt;Data source plugins&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/developers/plugin-tools/tutorials/build-a-data-source-plugin&#34;&gt;Build a data source plugin&lt;/a&gt;: Query a new source of data from the browser.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/developers/plugin-tools/tutorials/build-a-data-source-backend-plugin&#34;&gt;Build a data source plugin backend component&lt;/a&gt;: Add a backend component to your data source.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/developers/plugin-tools/tutorials/build-a-streaming-data-source-plugin&#34;&gt;Build a streaming data source plugin&lt;/a&gt;: Stream data to Grafana as it arrives.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/developers/plugin-tools/tutorials/build-a-logs-data-source-plugin&#34;&gt;Build a logs data source plugin&lt;/a&gt;: Return log data that Grafana can explore.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;app-and-panel-plugins&#34;&gt;App and panel plugins&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/developers/plugin-tools/tutorials/build-an-app-plugin&#34;&gt;Build an app plugin&lt;/a&gt;: Add custom pages to Grafana.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/developers/plugin-tools/tutorials/build-a-panel-plugin&#34;&gt;Build a panel plugin&lt;/a&gt;: Add a new visualization for your dashboards.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="build-a-plugin-yourself">Build a plugin yourself&lt;/h1>
&lt;p>To write the code yourself, follow the Plugin Tools tutorial for your plugin type. Each tutorial starts from the scaffold that &lt;code>create-plugin&lt;/code> generates and ends with a working plugin in your local Grafana.&lt;/p></description></item><item><title>Resources</title><link>https://grafana.com/docs/learning-hub/plugin-development/02-build-your-plugin/05-resources/</link><pubDate>Wed, 11 Nov 2026 06:29:02 +0100</pubDate><guid>https://grafana.com/docs/learning-hub/plugin-development/02-build-your-plugin/05-resources/</guid><content><![CDATA[&lt;h1 id=&#34;resources&#34;&gt;Resources&lt;/h1&gt;
&lt;p&gt;The documentation links below are in the Plugin Tools documentation portal.&lt;/p&gt;
&lt;h2 id=&#34;documentation&#34;&gt;Documentation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/developers/plugin-tools/&#34;&gt;Get started&lt;/a&gt;: Generate the scaffold with &lt;code&gt;create-plugin&lt;/code&gt; and run it in Docker.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/developers/plugin-tools/tutorials/&#34;&gt;Tutorials&lt;/a&gt;: End-to-end tutorials for each plugin type, including the Build a plugin with AI tutorial.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/developers/plugin-tools/tutorials/build-ai-plugin&#34;&gt;Build a plugin with AI&lt;/a&gt;: How to build a data source and an app plugin that read from a public bike service system.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/developers/plugin-tools/key-concepts/anatomy-of-a-plugin&#34;&gt;Anatomy of a plugin&lt;/a&gt;: The parts of each plugin type and the files the scaffold generates.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;community&#34;&gt;Community&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://community.grafana.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Community Forums&lt;/a&gt;: Share ideas, ask questions.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://slack.grafana.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Slack&lt;/a&gt;: Join the conversation.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="resources">Resources&lt;/h1>
&lt;p>The documentation links below are in the Plugin Tools documentation portal.&lt;/p>
&lt;h2 id="documentation">Documentation&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="/developers/plugin-tools/">Get started&lt;/a>: Generate the scaffold with &lt;code>create-plugin&lt;/code> and run it in Docker.&lt;/li>
&lt;li>&lt;a href="/developers/plugin-tools/tutorials/">Tutorials&lt;/a>: End-to-end tutorials for each plugin type, including the Build a plugin with AI tutorial.&lt;/li>
&lt;li>&lt;a href="/developers/plugin-tools/tutorials/build-ai-plugin">Build a plugin with AI&lt;/a>: How to build a data source and an app plugin that read from a public bike service system.&lt;/li>
&lt;li>&lt;a href="/developers/plugin-tools/key-concepts/anatomy-of-a-plugin">Anatomy of a plugin&lt;/a>: The parts of each plugin type and the files the scaffold generates.&lt;/li>
&lt;/ul>
&lt;h2 id="community">Community&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://community.grafana.com/" target="_blank" rel="noopener noreferrer">Grafana Community Forums&lt;/a>: Share ideas, ask questions.&lt;/li>
&lt;li>&lt;a href="https://slack.grafana.com/" target="_blank" rel="noopener noreferrer">Grafana Slack&lt;/a>: Join the conversation.&lt;/li>
&lt;/ul></description></item></channel></rss>