feat: add rhdh-coding skill for Backstage/RHDH plugin development - #51
Conversation
d1c0072 to
dc7d874
Compare
6b9bc67 to
8bcf227
Compare
8bcf227 to
4e71e88
Compare
durandom
left a comment
There was a problem hiding this comment.
Review
Comprehensive skill capturing Backstage/RHDH plugin development tribal knowledge. This is the kind of content that saves developers hours of debugging.
What's good
- BUI reference (`bui.md`) — the component mapping table (BUI ↔ MUI) with key API differences is exactly what's needed for migration. Calling out `Card`'s discriminated union, `Select`'s onChange signature, and `Table`'s `isRowHeader` requirement prevents real bugs.
- NFS patterns (`nfs.md`) — alpha file structure, PageBlueprint/EntityContentBlueprint patterns, and the package exports section (NFS-at-root vs legacy-at-root vs alpha pattern) addresses a genuine source of confusion.
- Testing reference (`testing.md`) — TestApiProvider patterns, entity context mocking approaches (EntityProvider vs jest.mock), MSW setup, and the SWR cache reset trick are all verified patterns from real plugins.
- Detection script — stdlib-only Python, clean structure, covers all the right signals (backstage role, frontend system, MUI version, extensions, blueprints, route refs, API refs, dynamic plugin status).
- "Before You Commit" checklist — the ordered sequence (`prettier:fix` → `tsc:full` → `build:all` → `test` → `build:api-reports:only`) with "stop on first failure" is practical.
Issues
-
Merge conflicts — this PR has conflicts with main and no CI runs. Needs a rebase before it can be reviewed for merge readiness.
-
Version bump assumes #49 merged. The diff shows 0.6.0 → 0.7.0, meaning this is based on PR #49's branch. If #49 hasn't merged, this can't either. Clarify the dependency chain.
-
`references/bui.md` caveat. The skill says "Always check `node_modules/@backstage/ui/dist/index.d.ts` for actual prop types" — good. But the BUI component list will go stale as BUI evolves. Consider adding a date or BUI version at the top so readers know when it was last verified.
-
`references/nfs.md` — NavItemBlueprint removal note. "NavItemBlueprint was removed" — this is correct for latest Backstage but worth noting which version this changed in, since plugins targeting older RHDH versions may still need it.
-
Ecosystem skills section. Recommending `npx skills add` for third-party skills is useful, but these URLs/repos could go stale. Consider moving this to a separate reference file that's easier to update.
Recommendation
Excellent content. Blocked on rebase (conflicts) and the #49 dependency. Once those are resolved, this is merge-ready.
4e71e88 to
0038554
Compare
durandom
left a comment
There was a problem hiding this comment.
Review
Solid skill — the BUI component mapping, NFS-at-root documentation, and RHDH gotchas (default export, scalprum naming, class name generator) are exactly the kind of tribal knowledge that saves agent hours. A few issues to address:
Detection script contradicts NFS-at-root docs
detect_frontend_system() and detect_nfs_blueprints() only look for alpha.tsx/alpha.ts to detect NFS. But the PR's own nfs.md update documents the new migration pattern as NFS at root (src/index.ts), with legacy moved to ./legacy.
A plugin using this new pattern (NFS in index.ts, legacy in legacy.ts, no alpha.* file) would be classified as "legacy" by the detection script, and its blueprints would be invisible.
Suggestion: Check package.json exports for ./legacy or scan src/index.ts for createFrontendPlugin to detect the NFS-at-root pattern. detect_nfs_blueprints() should also scan index.ts/plugin.ts when NFS-at-root is detected.
Extension detection regex may miss unnamed extensions
detect_extensions() matches createRoutableExtension(\s*\{[^}]*name:\s*['"](\w+)['"] — requires a name field immediately inside the config object. Extensions without an explicit name property, or with the name set on the wrapping variable rather than in the options, would be silently skipped. Not a blocker but worth noting.
nfs.md: cross-reference migration path
The section now says the ./alpha pattern is "being phased out" but doesn't point to the nfs-migration sibling skill for how to do it. A one-liner like "For migration steps, use the nfs-migration skill" would close the loop.
Positives
- Version bump (0.6.1 → 0.7.0) is correct per AGENTS.md — new skill = minor
- Detection script is stdlib-only Python ✓
- BUI reference table with API gotchas (Card discriminated union, TextField onChange string, Table isRowHeader) — excellent
- NavItemBlueprint version qualification and translation module auto-discovery gap are good additions to nfs.md
- SKILL.md information architecture is well-structured for agent consumption
🤖 Generated with Claude Code
Adds a coding skill that teaches agents non-obvious Backstage and RHDH patterns — the knowledge you'd gain after six months of getting burned by conventions that aren't in the docs or training data. Covers: BUI-first styling, NFS Blueprints, RHDH dynamic plugin gotchas, plugin type decisions, Backstage-specific testing, dev app setup (both plugin dev mode and full Backstage app), and frontend spec guidance for PRDs/OpenSpec workflows. References are verified against real plugin code in rhdh-plugins and community-plugins. Designed to be the daily-driver skill for agents working on existing plugins — complementary to create-plugin (new plugins), nfs-migration (migration), and official backstage.io skills. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Rohit Rai <rohitkrai03@gmail.com>
f328d60 to
126d26a
Compare
- Detect NFS-at-root pattern by checking package.json exports for ./legacy and scanning src/index.ts for createFrontendPlugin - Scan index.ts/plugin.ts for NFS blueprints, not just alpha.ts - Improve extension detection to capture unnamed extensions instead of silently skipping them - Add cross-reference to nfs-migration skill in nfs.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Rohit Rai <rohitkrai03@gmail.com>
126d26a to
e868a3c
Compare
Why
RHDH is moving toward an agentic SDLC with fullsend — agents triage issues, implement features, and review code autonomously. The coding agent needs Backstage/RHDH patterns that aren't in training data (BUI is new, NFS is evolving, dynamic plugin conventions are tribal knowledge). No Backstage coding skills exist in the open-source ecosystem — the official backstage.io skills cover migrations and instrumentation, not day-to-day feature development.
This skill fills that gap. It's the daily-driver skill for agents working on RHDH plugins — installed into
.fullsend/customized/skills/alongsiderhdh-workspaceand available to the code agent during implementation. It also helps human developers using Claude Code, Cursor, or any skills-compatible agent.What it covers
How it fits into fullsend
Complements ecosystem skills (ui-ux-pro-max, frontend-design, webapp-testing) for generic UI quality, and official backstage.io skills for migration workflows.
Summary
Files
SKILL.mdreferences/bui.mdreferences/dev-app.mdreferences/nfs.mdreferences/frontend-specs.mdreferences/plugin-types.mdreferences/rhdh.mdreferences/testing.mdscripts/detect-rhdh-context.pyTest plan
npx skills addand verify skill triggers correctly🤖 Generated with Claude Code