Skip to main content

Skill Exchange Actions

@spotify/backstage-plugin-skill-exchange-backend-module-actions

The Skill Exchange Actions module integrates with Backstage's Actions Registry, enabling programmatic discovery of skills and experts within your organization. These actions are ideal for integration with AI assistants, automation workflows, and custom backend plugins.

Installation

To use these actions, install the actions module as described in Setup & Installation.

packages/backend/src/index.ts
backend.add(
import('@spotify/backstage-plugin-skill-exchange-backend-module-actions'),
);

Available Actions

Each action declares attributes that indicate its behavior:

  • readOnly: The action only reads data and does not make modifications
  • idempotent: Repeated calls with the same input produce the same result
  • destructive: The action can delete or permanently modify data
ActionAttributesDescription
search-skillsreadOnly: true, idempotent: true, destructive: falseDiscover skills by name, category, or relationships
search-expertsreadOnly: true, idempotent: true, destructive: falseFind experts based on skills or team membership
tip

Always check an action's attributes before using it in automated workflows to understand its potential side effects.


search-skills Action

Discover skills in your organization by name, category, or relationships.

Use Cases

  • Skill discovery: Find skills that match specific criteria for team planning
  • Related technologies: Discover skills related to ones your team already uses
  • Onboarding: Help new team members explore available learning paths
  • Automation: Power AI assistants and chatbots with skill discovery

Parameters

ParameterTypeRequiredDescription
querystringNoSearch term for skill name (partial matching)
categorystringNoFilter by category: DISCIPLINE, FRAMEWORKS, INFRASTRUCTURE, LANGUAGES, TECHNIQUES
limitnumberNoMaximum results to return (1-100, default: 50)
relatedToSkillIdsnumber[]NoFind skills related to these skill IDs

Output

KeyTypeDescription
skillsArray<{ id: number; name: string; category: string }>List of matching skills
totalnumberTotal count of matching results

search-experts Action

Find experts in your organization based on skills or team membership.

Use Cases

  • Expert discovery: Find subject matter experts for specific technologies
  • Team formation: Identify potential team members with required skills
  • Code review: Find qualified reviewers for specific technology areas
  • Mentorship: Connect mentees with mentors who have relevant expertise
  • Knowledge sharing: Identify experts who can lead workshops or training

Parameters

ParameterTypeRequiredDescription
querystringNoSearch term for expert name or description
teamsstring[]NoFilter by team membership
skillNamesstring[]NoFilter by specific skill names
limitnumberNoMaximum results to return (1-100, default: 20)

Output

KeyTypeDescription
expertsArray<{ displayName: string; name: string; skills: string[]; teams: string[] }>List of matching experts
totalnumberTotal count of matching results

Programmatic Usage in Backend Plugins

You can use these actions programmatically in your own backend plugins by accessing the Actions Registry Service:

import {
createBackendPlugin,
coreServices,
} from '@backstage/backend-plugin-api';
import { actionsRegistryServiceRef } from '@backstage/backend-plugin-api/alpha';

export const myPlugin = createBackendPlugin({
pluginId: 'my-plugin',
register(env) {
env.registerInit({
deps: {
actionsRegistry: actionsRegistryServiceRef,
logger: coreServices.logger,
},
async init({ actionsRegistry, logger }) {
// Get reference to skill exchange actions
const searchSkillsAction = actionsRegistry.get('search-skills');
const searchExpertsAction = actionsRegistry.get('search-experts');

// Use the actions in your logic
const skillsResult = await searchSkillsAction?.action({
input: {
query: 'React',
category: 'FRAMEWORKS',
limit: 20,
},
logger,
credentials: {
/* your credentials */
},
});

logger.info(`Found ${skillsResult?.output.total} skills`);
},
});
},
});

Integration with AI Assistants

These actions work seamlessly with AI assistants and automation tools. When integrating actions into AI-powered workflows, check each action's attributes to understand its behavior:

  • Actions with readOnly: true can be called safely without modifying data
  • Actions with idempotent: true can be retried safely on failure
  • Actions with destructive: true should require explicit user confirmation before execution