You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/create-backend-plugin/SKILL.md
+19-35Lines changed: 19 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
---
2
-
name: RHDH Backend Dynamic Plugin Bootstrap
3
-
description: This skill should be used when the user asks to "create RHDH backend plugin", "bootstrap backend dynamic plugin", "create backstage backend plugin for RHDH", "new backend plugin for Red Hat Developer Hub", "create dynamic backend plugin", "scaffold RHDH backend plugin", "new scaffolder action", "create catalog processor", or mentions creating a new backend plugin, backend module, or server-side functionality for Red Hat Developer Hub or RHDH. This skill is specifically for backend plugins - for frontend plugins, use the separate frontend plugin skill.
2
+
name: create-backend-plugin
3
+
description: Bootstraps a new backend dynamic plugin for Red Hat Developer Hub (RHDH). Use when the user asks to "create RHDH backend plugin", "bootstrap backend dynamic plugin", "create backstage backend plugin for RHDH", "new backend plugin for Red Hat Developer Hub", "create dynamic backend plugin", "scaffold RHDH backend plugin", "new scaffolder action", "create catalog processor", or mentions creating a new backend plugin, backend module, or server-side functionality for Red Hat Developer Hub or RHDH. This skill is specifically for backend plugins - for frontend plugins, use the separate frontend plugin skill.
4
4
---
5
5
6
6
## Purpose
7
7
8
-
Bootstrap a new **backend** dynamic plugin for Red Hat Developer Hub (RHDH). RHDH is the enterprise-ready Backstage applicationthat supports dynamic plugins - plugins that can be installed or uninstalled without rebuilding the application.
8
+
Bootstrap a new **backend** dynamic plugin for Red Hat Developer Hub (RHDH). RHDH is the enterprise-ready Backstage application that supports dynamic plugins - plugins that can be installed or uninstalled without rebuilding the application.
9
9
10
10
> **Note:** This skill covers **backend plugins only**. Frontend dynamic plugins have different requirements (Scalprum configuration, mount points, dynamic routes) and are covered in a separate skill.
11
11
@@ -37,48 +37,30 @@ Before starting, ensure the following are available:
37
37
## Workflow Overview
38
38
39
39
1.**Determine RHDH Version** - Identify target RHDH version for compatibility
40
-
2.**Create Backstage App** - Scaffold Backstage app with matching version
41
-
3.**Create Backend Plugin** - Generate new backend plugin using Backstage CLI
42
-
4.**Implement Plugin Logic** - Write the plugin code using new backend system
43
-
5.**Export and Package** - Build, export, and package using RHDH CLI (see export-and-package skill)
44
-
6.**Configure for RHDH** - Create dynamic-plugins.yaml configuration
40
+
2.**Scaffold App and Plugin** - Create Backstage app and generate backend plugin
41
+
3.**Implement Plugin Logic** - Write the plugin code using new backend system
42
+
4.**Export and Package** - Build, export, and package using RHDH CLI (see export-and-package skill)
43
+
5.**Configure for RHDH** - Create dynamic-plugins.yaml configuration
45
44
46
45
## Step 1: Determine RHDH Version
47
46
48
47
Check the target RHDH version and find the compatible Backstage version. Consult `../rhdh/references/versions.md` file for the version compatibility matrix and available RHDH versions.
49
48
50
49
Ask the user which RHDH version they are targeting if not specified.
51
50
52
-
## Step 2: Create Backstage Application
51
+
## Step 2: Scaffold App and Plugin
53
52
54
-
Create a new Backstage application in the current directory using the version-appropriate create-app:
53
+
Run the scaffold script from the directory where the app should be created:
Run `python scripts/scaffold.py --help` for all options (e.g., `--path`, `--create-app-version`, `--json`).
62
62
63
-
```bash
64
-
yarn install
65
-
```
66
-
67
-
The only purpose this serves is to ensure you can later create the plugin using the correct version of the Backstage CLI. All development and testing will be done in the plugin directory.
68
-
69
-
## Step 3: Create Backend Plugin
70
-
71
-
Generate a new backend plugin using the Backstage CLI:
72
-
73
-
```bash
74
-
yarn new
75
-
```
76
-
77
-
When prompted:
78
-
79
-
1. Select **"backend-plugin"** as the plugin type
80
-
2. Enter a plugin ID (e.g., `my-plugin`)
81
-
3. The plugin will be created at `plugins/<plugin-id>-backend/`
63
+
The Backstage app exists only to provide the correct CLI version for plugin generation. All development and testing happens in the plugin directory.
82
64
83
65
The generated plugin structure:
84
66
@@ -93,7 +75,7 @@ plugins/<plugin-id>-backend/
93
75
└── README.md
94
76
```
95
77
96
-
## Step 4: Implement Plugin Logic
78
+
## Step 3: Implement Plugin Logic
97
79
98
80
Backend plugins must use the **new backend system** for dynamic plugin compatibility. The plugin entry point should export a default using `createBackendPlugin()` or `createBackendModule()`.
99
81
@@ -147,7 +129,7 @@ cd plugins/<plugin-id>-backend
147
129
yarn build
148
130
```
149
131
150
-
## Step 5: Export and Package
132
+
## Step 4: Export and Package
151
133
152
134
Export the plugin as a dynamic plugin and package it for deployment. For detailed export and packaging options, see the **export-and-package** skill.
0 commit comments