backstage-backend-plugin
БесплатноЗапускает вложенные скриптыНе проверенBuild Backstage backend plugins and modules with createBackendPlugin: DI, httpRouter, secure-by-default auth, Knex DB, scheduler, testing, extension points…
Об этом скилле
Backstage Backend Plugin (New Backend System)
About This Skill
This skill provides specialized knowledge and workflows for building Backstage backend plugins and modules using the New Backend System. It guides the development of server-side functionality including REST/HTTP APIs, background jobs, data processing, and integrations, plus the module/extension-point pattern used to extend other plugins.
What This Skill Provides
- Specialized workflows - Step-by-step procedures for creating and configuring backend plugins and modules
- Best practices - Production-ready patterns for auth, validation, error handling, and database usage
- Golden path templates - Copy/paste code snippets for common backend patterns
- Domain expertise - Backstage-specific knowledge about DI, core services, and secure-by-default architecture
When to Use This Skill
Use this skill when creating server-side functionality for Backstage: REST/HTTP APIs, background jobs, data processing, integrations, or modules that extend an existing plugin's extension points.
Development Workflow
Phase 1: Planning and Research
1.1 Understand the Requirements
Before building a backend plugin, clearly understand:
- What endpoints or APIs are needed (REST, GraphQL, webhooks)
- What data storage requirements exist (database, cache)
- Whether background jobs or scheduled tasks are needed
- Authentication and authorization requirements
- Whether you're writing a plugin (new surface area) or a module (extending another plugin's extension points)
- Integration points with other services or plugins
1.2 Load Reference Documentation
Load reference files as needed based on the plugin requirements:
For Core Services:
- ⚙️ Core Services Reference - Comprehensive guide to all core backend services including:
- httpRouter, logger, database, httpAuth, userInfo, auth
- cache, scheduler, urlReader, discovery, permissions, permissionsRegistry
- auditor, lifecycle, rootHealth, rootConfig, rootInstanceMetadata
- Usage patterns and best practices for each service
For Testing:
- ✅ Testing Reference - Comprehensive testing guide for backend plugins
Phase 2: Implementation
Follow the Golden Path workflow below for implementation, referring to reference files as needed.
Important Decisions:
- Determine which core services are needed (load ⚙️ Core Services Reference)
- Plan database schema and migrations if using database
- Design authentication policies (which endpoints, if any, should be unauthenticated?)
- Plan error handling and validation strategies
- Decide whether extension points are needed so other teams can extend this plugin
Phase 3: Testing
After implementing the plugin:
- Load the ✅ Testing Reference
- Write comprehensive tests for:
- Plugin/module integration via
startTestBackend - Router endpoints using
supertestagainst the test server - Database operations with
TestDatabases - External service calls with MSW (v2 API)
- Authentication flows using
mockCredentialsandmockServices.httpAuth.mock
- Plugin/module integration via
- Run tests and achieve good coverage:
yarn backstage-cli package test --coverage --watchAll=false
Phase 4: Review and Polish
Before publishing:
- Run linting and structure checks
- Ensure proper error handling throughout — let errors bubble up so the root HTTP router's error middleware formats them
- Verify authentication policies are correct (backends are secure by default)
- Check database migrations are production-ready and written in JavaScript
- Review the Common Pitfalls section below
- Test horizontal scalability (no in-memory state; use the
cacheordatabaseservices)
Quick Facts
- Scaffold with
yarn new→ selectbackend-plugin; the package lives inplugins/<id>-backend/. - Define the plugin with
createBackendPlugin, declare dependencies viadeps, and initialize inregister(env).registerInit. - Attach routes through
coreServices.httpRouter. Backstage prefixes plugin routers with/api/<pluginId>. - Backends are secure by default; use
httpRouter.addAuthPolicy({ path, allow })to allow unauthenticated endpoints. allowonaddAuthPolicyonly accepts'unauthenticated'or'user-cookie'.- Core services (
logger,database,httpRouter,httpAuth,auth,userInfo,urlReader,scheduler,cache,permissions, etc.) are available viacoreServices. - Validate inputs with
zodand throwInputErrorfrom@backstage/errors. Let the root HTTP router handle error responses — you usually don't need per-router error middleware. - A module (
createBackendModule) extends another plugin via its extension points. A plugin exposes extension points withenv.registerExtensionPoint(...).
Production Best Practices
Request Va
Установить backstage-backend-plugin в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл backstage-backend-plugin?
Build Backstage backend plugins and modules with createBackendPlugin: DI, httpRouter, secure-by-default auth, Knex DB, scheduler, testing, extension points. Use for APIs, modules, and background jobs.
Как установить скилл backstage-backend-plugin?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл backstage-backend-plugin запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic