| name | agent-registry |
| version | 2.0.1 |
| description | MANDATORY agent discovery system for token-efficient agent loading. Claude MUST use this skill
instead of loading agents directly from ~/.claude/agents/ or .claude/agents/. Provides lazy
loading via search and get tools. Use when: (1) user task may benefit from
specialized agent expertise, (2) user asks about available agents, (3) starting complex
workflows that historically used agents. This skill reduces context window usage by ~95%
compared to loading all agents upfront.
|
| hooks | {"UserPromptSubmit":[{"hooks":[{"type":"command","command":"bun ${CLAUDE_PLUGIN_ROOT}/hooks/user_prompt_search.js","timeout":5}]}]} |
Agent Registry
Lazy-loading system for Claude Code agents. Eliminates the "~16k tokens" warning by loading agents on-demand.
CRITICAL RULE
NEVER assume agents are pre-loaded. Always use this registry to discover and load agents.
Workflow
User Request โ search_agents(intent) โ select best match โ get_agent(name) โ execute with agent
Available Commands
| Command | When to Use | Example |
|---|
list.js | User asks "what agents do I have" or needs overview | bun bin/list.js |
search.js | Find agents matching user intent (ALWAYS do this first) | bun bin/search.js "code review security" |
search-paged.js | Paged search for large registries (300+ agents) | bun bin/search-paged.js "query" --page 1 --page-size 10 |
get.js | Load a specific agent's full instructions | bun bin/get.js code-reviewer |
Search First Pattern
- Extract intent keywords from user request
- Run search:
bun bin/search.js "<keywords>"
- Review results: Check relevance scores (0.0-1.0)
- Load if needed:
bun bin/get.js <agent-name>
- Execute: Follow the loaded agent's instructions
Example
User: "Can you review my authentication code for security issues?"
bun bin/search.js "code review security authentication"
bun bin/get.js security-auditor
Installation
Step 1: Install the Skill
Quick Install (Recommended):
npx skills add MaTriXy/Agent-Registry@agent-registry
npx skills find
npx skills update
Traditional Install:
./install.sh
./install.sh --project
./install.sh --install-deps
What install.sh does:
- Copies skill files to
~/.claude/skills/agent-registry/
- Creates empty registry structure
- Optionally installs dependencies via
--install-deps (@clack/prompts for enhanced UI)
Step 2: Migrate Your Agents
Run the interactive migration script:
cd ~/.claude/skills/agent-registry
bun bin/init.js
bun bin/init.js --move
Interactive selection modes:
-
With @clack/prompts (default): Beautiful checkbox UI with category grouping, token indicators, and paging
- Arrow keys navigate, Space toggle, Enter confirm
- Visual indicators: [green] <1k tokens, [yellow] 1-3k, [red] >3k
- Grouped by subdirectory
-
Fallback: Text-based number input
- Enter comma-separated numbers (e.g.,
1,3,5)
- Type
all to migrate everything
What init.js does:
- Scans
~/.claude/agents/ and .claude/agents/ for agent files
- Displays available agents with metadata
- Lets you interactively select which to migrate
- Copies selected agents to the registry by default (
--move is explicit opt-in)
- Builds search index (
registry.json)
Dependencies
- Bun (ships with Claude Code) โ zero additional dependencies for core functionality
- @clack/prompts: Optional enhanced interactive selection UI (install via
./install.sh --install-deps)
Registry Location
- Global:
~/.claude/skills/agent-registry/
- Project:
.claude/skills/agent-registry/ (optional override)
Agents not migrated remain in their original locations and load normally (contributing to token overhead).