using-backstage-identity
Installation
SKILL.md
Backstage Identity Patterns
When to use this skill
- Plugin needs the current user's entity ref (e.g.
user:default/jdoe) - Plugin needs the user's profile info (display name, email, picture)
- Plugin needs ownership entity refs to filter "things owned by me"
- Plugin needs a Backstage token to call backend APIs as the current user
Choose the right pattern
| Situation | Pattern | Reference |
|---|---|---|
| Get the current user (entity ref, ownership refs, profile) | useApi(identityApiRef).getBackstageIdentity() / getProfileInfo() |
references/current-user.md |
Two invocation modes
- Standalone (mid-development): user is editing an existing plugin. Read the reference and apply the pattern to whichever component needs it.
- Post-scaffold (called by
creating-backstage-plugin): apply the pattern to a freshly scaffolded plugin. The reference's "Post-scaffold usage" section names exactly which file to edit and what to insert.