$npx -y skills add redhat-developer/rhdh-skill --skill create-pluginFull lifecycle for RHDH dynamic plugins — scaffold, implement, export, package, and configure. Use when asked to "create RHDH plugin", "bootstrap dynamic plugin", "create backend plugin", "create frontend plugin", "export dynamic plugin", "package plugin as OCI", "generate fronte
| 1 | <essential_principles> |
| 2 | |
| 3 | ## Prerequisites |
| 4 | |
| 5 | - Node.js 22+ and Yarn |
| 6 | - Container runtime (`podman` or `docker`) for OCI packaging |
| 7 | - Access to a container registry (e.g., quay.io) for publishing |
| 8 | |
| 9 | </essential_principles> |
| 10 | |
| 11 | <intake> |
| 12 | |
| 13 | ## What would you like to do? |
| 14 | |
| 15 | | # | Category | Command | Description | |
| 16 | |---|----------|---------|-------------| |
| 17 | | 1 | Create | `backend` | Scaffold and implement a backend dynamic plugin | |
| 18 | | 2 | Create | `frontend` | Scaffold and implement a frontend dynamic plugin | |
| 19 | | 3 | Package | `export` | Export, package, and push a plugin for RHDH deployment | |
| 20 | | 4 | Configure | `wiring` | Analyze a frontend plugin and generate wiring config | |
| 21 | |
| 22 | Single source of truth for command descriptions: `scripts/command-metadata.json` |
| 23 | |
| 24 | **Wait for response before proceeding.** |
| 25 | |
| 26 | </intake> |
| 27 | |
| 28 | <routing> |
| 29 | |
| 30 | | Response | Reference | |
| 31 | |----------|----------| |
| 32 | | 1, "backend", "create backend", "API plugin", "scaffolder action" | [references/backend.md](references/backend.md) | |
| 33 | | 2, "frontend", "create frontend", "page", "card", "theme" | [references/frontend.md](references/frontend.md) | |
| 34 | | 3, "export", "package", "OCI", "tgz", "publish", "push" | [references/export.md](references/export.md) | |
| 35 | | 4, "wiring", "mount points", "routes", "entity tabs" | [references/wiring.md](references/wiring.md) | |
| 36 | | First word doesn't match | Infer intent from context. "Create a new API plugin" → `backend`. "Package my plugin as OCI" → `export`. "Generate mount points" → `wiring`. | |
| 37 | |
| 38 | </routing> |
| 39 | |
| 40 | ## Shared Knowledge |
| 41 | |
| 42 | > **Script paths:** All `scripts/` and `references/` paths below are relative to this SKILL.md file's directory. Resolve them against the skill directory before invoking. |
| 43 | |
| 44 | ### RHDH Version Resolution |
| 45 | |
| 46 | Before scaffolding, determine the target RHDH version. Consult `../rhdh/references/versions.md` for the compatibility matrix. If that file is not found (skill installed standalone), ask the user for the target RHDH version directly. |
| 47 | |
| 48 | ### Scaffold Script |
| 49 | |
| 50 | Both backend and frontend plugins use a unified scaffold script: |
| 51 | |
| 52 | ```bash |
| 53 | python scripts/scaffold.py \ |
| 54 | --type backend \ |
| 55 | --rhdh-version 1.9 \ |
| 56 | --plugin-id my-plugin |
| 57 | ``` |
| 58 | |
| 59 | Run `python scripts/scaffold.py --help` for all options (`--type`, `--path`, `--with-theme`, `--create-app-version`, `--json`). |
| 60 | |
| 61 | ### Export Script |
| 62 | |
| 63 | Automates the full export → package → push pipeline: |
| 64 | |
| 65 | ```bash |
| 66 | python scripts/export-plugin.py \ |
| 67 | --plugin-dir plugins/my-plugin \ |
| 68 | --tag quay.io/ns/my-plugin:v0.1.0 \ |
| 69 | --push --clean |
| 70 | ``` |
| 71 | |
| 72 | Run `python scripts/export-plugin.py --help` for all options (`--format`, `--shared-package`, `--embed-package`, `--json`). |
| 73 | |
| 74 | ### Plugin Lifecycle |
| 75 | |
| 76 | The typical workflow chains these commands: |
| 77 | |
| 78 | 1. **`backend`** or **`frontend`** — Scaffold and implement |
| 79 | 2. **`export`** — Build, export, package, push |
| 80 | 3. **`wiring`** (frontend only) — Generate `dynamic-plugins.yaml` config |
| 81 | |
| 82 | Each reference file is self-contained. Load only the one you need. |
| 83 | |
| 84 | <reference_index> |
| 85 | |
| 86 | ## Reference Index |
| 87 | |
| 88 | ### Command References |
| 89 | |
| 90 | | File | Load when... | |
| 91 | |------|-------------| |
| 92 | | `references/backend.md` | Creating a backend plugin (API, scaffolder action, processor) | |
| 93 | | `references/frontend.md` | Creating a frontend plugin (page, card, theme) | |
| 94 | | `references/export.md` | Exporting, packaging, or publishing a plugin | |
| 95 | | `references/wiring.md` | Generating frontend wiring configuration | |
| 96 | |
| 97 | ### Deep-Dive References |
| 98 | |
| 99 | | File | Load when... | |
| 100 | |------|-------------| |
| 101 | | `references/export-options.md` | Need details on `--shared-package`, `--embed-package`, dependency categories | |
| 102 | | `references/packaging-formats.md` | Comparing OCI vs tgz vs npm, multi-plugin bundles, private registries | |
| 103 | | `references/integrity-hashes.md` | Generating or verifying SHA-512/SHA-256 integrity hashes | |
| 104 | | `references/frontend-wiring.md` | Complete mount point, route, binding, entity tab reference | |
| 105 | | `references/entity-page.md` | Entity page customization — tabs, cards, conditions, gri |