user-management

user-management is a command for Claude Code from desplega-ai/agent-swarm. It costs 46 tokens per session (1,766 once invoked), scanned A, original, MIT.

A guide and command set for managing a registry of people who interact with the agent swarm through services such as Slack, GitHub, GitLab, Linear, or email. The registry links a person’s identities across those services.

In plain words
What is it for?
Use it to find an existing user, create a record for a new person, update linked identities, or resolve someone across platforms. It is intended for new interactions, identity changes, and swarm administration.
Why use it?
It prevents duplicate user records and helps the swarm recognise the same person on different platforms. It also documents the current identity format after a registry change.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to find an existing user, create a record for a new person, update linked identities, or resolve someone across platforms. It is intended for new interactions, identity changes, and swarm administration.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/desplega-ai/agent-swarm/user-management
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/desplega-ai/agent-swarm

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for user-management

README.md
[![agentmods](https://agentmods.dev/badge/commands/desplega-ai/agent-swarm/user-management/github.svg)](https://agentmods.dev/commands/desplega-ai/agent-swarm/user-management)
Your own site
<a href="https://agentmods.dev/commands/desplega-ai/agent-swarm/user-management"><img src="https://agentmods.dev/badge/commands/desplega-ai/agent-swarm/user-management/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for user-management

Your own site · 80×15
<a href="https://agentmods.dev/commands/desplega-ai/agent-swarm/user-management"><img src="https://agentmods.dev/badge/commands/desplega-ai/agent-swarm/user-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,766 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.01766
Opus 5 $0.00023 $0.00883
Sonnet 5 $0.00009 $0.00353
Haiku 4.5 $0.00005 $0.00177

Measured 9d ago against content hash 278be4e40661, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

user-management scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/commands/user-management.md · 159 lines

How it starts

The opening of the file, as written. The whole thing — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Migration note (2026-05): the old top-level identity fields (slackUserId, linearUserId, githubUsername, gitlabUsername) and the fuzzy name lookup were removed in lockstep with the user-identity refactor. Use the new {kind, externalId} shape instead. Old payloads now fail Zod validation at runtime — there is no compatibility shim.

When to Create Users

Create a new user when:

  • An unknown Slack user sends a message to the swarm (resolve-user with {kind: "slack", externalId: "<U_X>"} returns no match)
  • 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 — by {kind, externalId} AND, when you have it, by email — 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 an (kind, externalId) pair OR by email (primary or alias). Use this BEFORE creating a new user. Caller MUST supply either (kind + externalId) OR email — empty input is rejected.

# Lookup by platform identity
resolve-user with:
  kind: "slack"
  externalId: "U12345"

# OR
resolve-user with:
  kind: "github"
  externalId: "octocat"

# OR
resolve-user with:
  kind: "gitlab"
  externalId: "octocat"

# OR
resolve-user with:
  kind: "linear"
  externalId: "uuid-from-linear"

# OR lookup by email (primary or alias)
resolve-user with:
  email: "[email protected]"

Email lookup is case-insensitive and checks the primary email column AND every entry in emailAliases.

Read the full file on GitHub · 159 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 159 lines · 46 tokens per session scan A 278be4e40661

Subscribe to this mod's changes

user-management is a command published in the GitHub repository desplega-ai/agent-swarm (754 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 1,766 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.