Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

backstage-frontend-plugin

БесплатноЗапускает вложенные скриптыНе проверен

Build Backstage frontend plugins with the New Frontend System: createFrontendPlugin, blueprints, routes, Utility APIs, testing. Use for pages, nav, entity…

rothenbergtот rothenbergt★ 23 звезды на GitHub16 установок в других каталогах

Об этом скилле

Backstage Frontend Plugin (New Frontend System)

About This Skill

This skill provides specialized knowledge and workflows for building Backstage frontend plugins using the New Frontend System (NFS). It guides the development of UI features including pages, navigation items, entity cards/content, and shared Utility APIs.

What This Skill Provides

  1. Specialized workflows - Step-by-step procedures for creating and configuring frontend plugins
  2. Best practices - Production-ready patterns for lazy loading, error handling, permissions, and testing
  3. Golden path templates - Copy/paste code snippets for common plugin patterns
  4. Domain expertise - Backstage-specific knowledge about blueprints, routes, and the plugin system

When to Use This Skill

Use this skill when creating UI features for Backstage: pages, navigation items, entity cards/content, or shared Utility APIs.


Development Workflow

Phase 1: Planning and Research

1.1 Understand the Requirements

Before building a frontend plugin, clearly understand:

  • What UI features are needed (pages, navigation, entity content, cards)
  • What data the plugin will display or interact with
  • Whether Utility APIs are needed for shared logic
  • Integration points with other plugins (catalog, permissions, etc.)

1.2 Load Reference Documentation

Load reference files as needed based on the plugin requirements:

For Extension Development:

For Utility API Development:

For Testing:


Phase 2: Implementation

Follow the Golden Path workflow below for implementation, referring to reference files as needed.


Phase 3: Testing

After implementing the plugin:

  1. Load the ✅ Testing Reference
  2. Write comprehensive tests for:
    • React components using renderInTestApp with the apis option
    • Extensions using createExtensionTester(...).reactElement()
    • Utility APIs with mocked dependencies
  3. Run tests and achieve good coverage:
    yarn backstage-cli package test --coverage --watchAll=false
    

Phase 4: Review and Polish

Before publishing:

  1. Run linting and structure checks
  2. Ensure all extensions are listed in the plugin's extensions array
  3. Verify lazy loading via dynamic imports in every loader
  4. Check permission-based visibility where appropriate
  5. Review the Common Pitfalls section below

Quick Facts

  • Create a plugin with yarn new → select frontend-plugin; it generates plugins/<pluginId>/ already wired for the New Frontend System.
  • The plugin instance is built with createFrontendPlugin from @backstage/frontend-plugin-api. Export it as the default from src/index.ts.
  • Functionality is provided via extensions (PageBlueprint, SubPageBlueprint, ApiBlueprint, EntityContentBlueprint, etc.). Page content is always lazy-loaded using dynamic imports.
  • Define route references with createRouteRef (usually in src/routes.ts) and use them in blueprints.
  • Use Utility APIs for shared logic (createApiRef + ApiBlueprint), consumed via useApi.
  • Hooks (useApi, useRouteRef) and built-in API refs (discoveryApiRef, fetchApiRef, identityApiRef, alertApiRef, errorApiRef, storageApiRef) should be imported from @backstage/frontend-plugin-api in NFS code — they are still re-exported from @backstage/core-plugin-api but that is the legacy import path.
  • The dev/index.tsx entrypoint uses createDevApp from @backstage/frontend-dev-utils and is started via yarn start inside the plugin directory.

App integration patterns

  • New Frontend System (preferred):
    • Apps using @backstage/frontend-defaults auto-discover a plugin's extensions when the package is installed and listed as a feature.
    • Just install the plugin; routes declared by PageBlueprint mount automatically and their title/icon drive the sidebar.
  • Legacy apps (compat path):
    • Only relevant if your target app is still using @backstage/app-defaults and manual FlatRoutes. Most new work should target NFS.

Production Best Practices

Extensions and Routes

  • Keep all routeRefs in src/routes.ts
  • Use createSubRouteRef for nested paths
  • Export only the plugin (default from src/index.ts)
  • Never export extensions/components from the package root

Lazy Loading and UX

PageBlueprint automatically wraps the loader with React Suspense and an error boundary — no need to add them yourself at the extension level. Just keep your loader as a dynamic import:

loader: () => impo
Полный SKILL.md на GitHub

Установить backstage-frontend-plugin в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

LICENSE.txtreference/blueprints.mdreference/testing.mdreference/utility_apis.mdscripts/cleanup-scaffolding.js

FAQ

Что делает скилл backstage-frontend-plugin?

Build Backstage frontend plugins with the New Frontend System: createFrontendPlugin, blueprints, routes, Utility APIs, testing. Use for pages, nav, entity content, or cards.

Как установить скилл backstage-frontend-plugin?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл backstage-frontend-plugin запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить backstage-frontend-plugin с