Agent skill
user-management
How to manage the user registry — creating users for new Slack/GitHub/GitLab identities, managing aliases, resolving users across platforms. Use when a new human interacts with the swarm or when user identity needs updating.
Install this agent skill to your Project
npx add-skill https://github.com/desplega-ai/agent-swarm/tree/main/plugin/pi-skills/user-management
SKILL.md
User Management
Manage the swarm's user registry — creating, updating, resolving, and listing users. Users link human identities across platforms (Slack, GitHub, GitLab, Linear, email) so the swarm can track who requested work.
When to Create Users
Create a new user when:
- An unknown Slack user sends a message to the swarm (no
resolveUsermatch for theirslackUserId) - An unknown GitHub user opens an issue or PR that triggers a task
- An unknown GitLab user creates an issue or MR
- An unknown Linear user is assigned to or creates a synced issue
- A human explicitly asks to be registered
Do NOT create duplicate users. Always call resolve-user first to check if the person already exists under a different platform identity.
Tools
Two MCP tools handle user management:
resolve-user — Find an existing user
Looks up a user by any platform identity. Use this BEFORE creating a new user.
resolve-user with:
slackUserId: "U12345" # Slack member ID
# OR
githubUsername: "octocat" # GitHub username
# OR
gitlabUsername: "octocat" # GitLab username
# OR
linearUserId: "uuid" # Linear user UUID
# OR
email: "user@example.com" # Primary email or alias
# OR
name: "Jane Doe" # Fuzzy name search (least specific)
Priority order: platform IDs > email > name. Platform IDs are exact matches; email checks aliases (case-insensitive); name is substring match.
manage-user — CRUD operations
# Create a new user
manage-user with:
action: "create"
name: "Jane Doe" # Required
email: "jane@company.com" # Optional
role: "engineering lead" # Optional, free-form
slackUserId: "U12345" # Optional
githubUsername: "janedoe" # Optional
gitlabUsername: "janedoe" # Optional
linearUserId: "uuid-from-linear" # Optional
emailAliases: ["jane.doe@company.com"] # Optional
timezone: "America/New_York" # Optional
notes: "Prefers async communication" # Optional
# List all users
manage-user with:
action: "list"
# Get a specific user
manage-user with:
action: "get"
userId: "<uuid>"
# Update a user (only send fields to change)
manage-user with:
action: "update"
userId: "<uuid>"
githubUsername: "new-username"
# Delete a user
manage-user with:
action: "delete"
userId: "<uuid>"
Workflow: New Slack User
- Receive a message from an unknown Slack user (e.g.,
slackUserId: "U_NEW123") - Call
resolve-userwithslackUserId: "U_NEW123"— returns null - Get the user's Slack profile (name, email) via
slack-reador from the message metadata - Call
resolve-userwithemail: "<their-email>"— check if they exist under a different platform - If found: call
manage-userwithaction: "update"to add theirslackUserId - If not found: call
manage-userwithaction: "create"including name, email, and slackUserId
Workflow: New GitHub User
- Receive a webhook from an unknown GitHub user (e.g.,
githubUsername: "octocat") - Call
resolve-userwithgithubUsername: "octocat"— returns null - Call
manage-userwithaction: "create"including at minimumnameandgithubUsername - If you know their email (from the webhook payload), include it
Workflow: Linking Identities
When you discover a known user is also active on another platform:
- Call
resolve-userto find them by their known identity - Call
manage-userwithaction: "update"to add the new platform identity
Example: You know "Jane" by Slack ID, and discover her GitHub username:
resolve-user slackUserId: "U_JANE" → returns user with id "abc-123"
manage-user action: "update" userId: "abc-123" githubUsername: "janedoe"
Important Notes
manage-useris lead-only — workers cannot use it for any action (the lead check happens before action dispatch). Workers must useresolve-userfor lookups.slackUserId,githubUsername,gitlabUsername, andlinearUserIdhave unique constraints — duplicates will error.- Deleting a user clears
requestedByUserIdon all their associated tasks (sets to null). - Email aliases are case-insensitive for resolution.
- The
preferredChannelfield defaults to"slack"and can be"slack","email","github", or"gitlab".
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
implement-issue
Implement a GitHub issue or GitLab issue and create a PR/MR
start-leader
Start the Agent Swarm Leader
investigate-sentry-issue
Investigate and triage a Sentry error issue
close-issue
Close a GitHub or GitLab issue with a summary comment
swarm-chat
Effective communication within the agent swarm using internal Slack
work-on-task
Work on a specific task assigned to you in the agent swarm
Didn't find tool you were looking for?