agents-search
Discover, search, and manage Claude Code agents. Use when you want to find available agents, list installed agents, or refresh the agent catalog. Triggers on: "search agents", "list agents", "find agent", "what agents", "agent catalog".
- License 许可
- MIT
- 最近更新
- 2026-10-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- id
- agents-search
- name
- agents-search
- task
- [ "debugging" ]
- type
- skill
- model
- sonnet
- owner
- @kaiohenricunha
- tools
- Glob, Read, Grep, Write, Bash, WebFetch
- domain
- [ "devex" ]
- effort
- medium
- created
- 1735689600000
- updated
- 1776384000000
- version
- 1.0.0
- dotbabel
- { "compute": { "pin": { "config": { "model": "sonnet" }, "runtime": "claude" }, "mode": "pin", "binding": "consumer", "rationale": "Audit class A: keep the authored native pin for this read-only file-parsing skill (DOC-1).", "requirement": "mechanical" } }
- maturity
- validated
- platform
- [ "none" ]
- description
- Discover, search, and manage Claude Code agents. Use when you want to find available agents, list installed agents, or refresh the agent catalog. Triggers on: "search agents", "list agents", "find agent", "what agents", "agent catalog".
- argument-hint
- search <query> | list | fetch <name> | invalidate [--fetch]
03 SKILL.md 正文
Agents Search — Discovery and Management
Discover, search, and manage Claude Code sub-agents installed under ~/.claude/agents/.
Supports four sub-commands: search, list, fetch, and invalidate.
Arguments
$0— sub-command:search,list,fetch, orinvalidate. If not provided, default tolist.$1— query string (forsearch), agent name (forfetch), or--fetchflag (forinvalidate).
Sub-Commands
Read-only compute labels for search and list
Read agent definitions as data. These two sub-commands never install, fetch, synchronize, or change an agent, a catalog, or a runtime setting.
Use a valid, explicitly authored dotbabel.compute declaration when it is available.
An installed native projection can omit that private metadata. In that case, read the
matching canonical source only through an existing, verified Dotbabel projection manifest
and an explicitly known source root. Verify the source identity and hash before using it.
Never guess a source root or follow an unverified generated comment. If the canonical
declaration cannot be verified, report undeclared/legacy.
Keep the authored mode, requirement and binding separate from the installed native model
and effort fields. mode: inherit belongs to the inherit group. Otherwise, group only
by an explicitly declared valid requirement. A dynamic or pinned declaration without an
explicit class belongs to undeclared/legacy, with its mode shown in the demand cell.
An absent or invalid declaration also belongs there; identify invalid metadata instead of
silently treating it as inheritance. Do not infer a demand class from a model name, a tool
list, a missing native model, or a normalized default. These labels describe declared demand,
not measured model quality or native enforcement.
Show native selectors and effort exactly as written, or unset when absent. A native
model: inherit remains a native control; it does not establish canonical inheritance.
search <query>
Find installed agents whose name or description matches a query string.
Steps:
-
Use
Globto enumerate all files at~/.claude/agents/*.md. -
For each file, use
Readto load its content (frontmatter + body). Parse YAML frontmatter (the block between the first---and the second---) to extract:name(string)modelandeffort(native values, may be absent — displayunset)- Canonical compute mode, explicit requirement and binding, using the read-only rules above
tools(array or comma-separated string, may be absent — default to"")description(string — use only the first line if multi-line)
-
Perform a case-insensitive substring match of
<query>against bothnameand the first line ofdescription. Include a file if either field matches. -
If one or more agents match, render a markdown table:
| Name | Compute demand | Native model | Native effort | Tools | Description | | ---- | -------------- | ------------ | ------------- | ----- | ----------- | | ... | ... | ... | ... | ... | ... |Toolscolumn: join array entries with", "or display the raw string; truncate to 40 chars with…if longer.Descriptioncolumn: first line of thedescriptionfield only.
-
If no agents match, output exactly:
No agents found matching '<query>' -
If Glob returns no results (no agents installed), check
~/.claude/cache/agents-catalog.md— if it exists and is less than 12 hours old (useBash(stat -c %Y ~/.claude/cache/agents-catalog.md 2>/dev/null || stat -f %m ~/.claude/cache/agents-catalog.md 2>/dev/null || echo 0)to check mtime), display results from the catalog instead and note they are from the cached remote catalog.
list
List all installed agents grouped by explicitly declared canonical compute demand.
Steps:
-
Use
Globto enumerate all files at~/.claude/agents/*.md. -
For each file,
Readits frontmatter and extract the same fields assearch. Resolve canonical metadata only through the read-only rules above. -
Group agents in this fixed order:
- mechanical — explicit canonical requirement
mechanical - routine — explicit canonical requirement
routine - deep — explicit canonical requirement
deep - frontier — explicit canonical requirement
frontier - exceptional — explicit canonical requirement
exceptional - inherit — explicit canonical
mode: inherit - undeclared/legacy — no verified explicit class or inheritance declaration
- mechanical — explicit canonical requirement
-
For each non-empty group, render a section header and a table. Sort names within the group alphabetically. Show the canonical mode/class/binding in
Compute demand; keep native controls in their own columns:### Frontier | Name | Compute demand | Native model | Native effort | Tools | Description | | ---- | -------------- | ------------ | ------------- | ----- | ----------- | -
If
~/.claude/agents/does not exist or contains no.mdfiles, output:No agents installed. Run `/agents:search fetch <name>` to install one. -
If Glob returns no results (no agents installed), check
~/.claude/cache/agents-catalog.md— if it exists and is less than 12 hours old (useBash(stat -c %Y ~/.claude/cache/agents-catalog.md 2>/dev/null || stat -f %m ~/.claude/cache/agents-catalog.md 2>/dev/null || echo 0)to check mtime), display results from the catalog instead and note they are from the cached remote catalog.
fetch <name>
Read a specific agent's full definition and offer install / view options.
Steps:
- Construct the local path
~/.claude/agents/<name>.md. - Attempt
Readon that path.- If found locally: display the agent's frontmatter fields (one per line,
key: value) followed by the full body. Then present the user with options:- Already installed — offer to re-display or customize.
- Customize — open the file for editing via a follow-up Edit call.
- View only — no further action.
- If found locally: display the agent's frontmatter fields (one per line,
- If not found locally: check whether
~/.claude/cache/agents-catalog.mdexists viaRead.-
If the catalog exists, search it for a section or entry matching
<name>(case-insensitive). If a match is found, display the matching content and offer the user three options:- Install — write the agent definition to
~/.claude/agents/<name>.mdusingWrite. - Customize — show the content and ask the user to provide edits before writing.
- View only — no further action.
- Install — write the agent definition to
-
If the catalog does not exist or contains no match, output:
Agent '<name>' not found locally or in catalog. Run `/agents:search invalidate --fetch` to refresh the catalog, then try again.
-
invalidate [--fetch]
Clear the local agent catalog cache, optionally refreshing it from GitHub.
Steps:
-
If
--fetchflag is present: Read the mtime of~/.claude/cache/agents-catalog.mdnow (before deleting anything) usingBash(stat -c %Y ~/.claude/cache/agents-catalog.md 2>/dev/null || stat -f %m ~/.claude/cache/agents-catalog.md 2>/dev/null || echo 0). Store the result for informational use later. -
Check whether
~/.claude/cache/agents-catalog.mdexists viaRead.- If it exists, delete it using
Bash:rm ~/.claude/cache/agents-catalog.md. - If it does not exist, note "No cache file found."
- If it exists, delete it using
-
Without
--fetch(cache clear only): Output:Cache cleared. -
With
--fetch(clear and refresh — user explicitly requested a fresh fetch):- Fetch the catalog using
WebFetchfrom:https://raw.githubusercontent.com/VoltAgent/awesome-claude-code-subagents/main/README.md-
Use HTTPS only (SEC-3).
-
If the fetch succeeds, ensure
~/.claude/cache/exists (Bash: mkdir -p ~/.claude/cache) and save the content to~/.claude/cache/agents-catalog.mdusingWrite. Output:Catalog refreshed. <N> bytes written to ~/.claude/cache/agents-catalog.md -
If the fetch fails (network error, non-200, timeout), do not hard-fail (REL-1). Warn the user:
Warning: Could not fetch catalog (network error). Existing cache cleared. Run `/agents:search invalidate --fetch` again when connectivity is restored.Do not throw or abort; return gracefully.
-
- Fetch the catalog using
Cache TTL
Whenever search or list falls back to ~/.claude/cache/agents-catalog.md for data,
check whether the cache is stale before using it:
-
Run
Bash(stat -c %Y ~/.claude/cache/agents-catalog.md 2>/dev/null || stat -f %m ~/.claude/cache/agents-catalog.md 2>/dev/null || echo 0)to get mtime. -
If
(now - mtime) > 43200seconds (12 hours), display an inline notice:(Cache is stale — last updated more than 12 h ago. Run `/agents:search invalidate --fetch` to refresh.)Then continue with the stale data rather than blocking the user.
Tool Usage
All file I/O uses Claude Code built-in tools — this is a skill, not a shell script:
| Operation | Tool |
|---|---|
| Enumerate agents | Glob |
| Read file content / frontmatter | Read |
| Search catalog content | Grep |
| Write / install agent | Write |
| Delete cache file | Bash(rm <path>) |
| Create cache directory | Bash(mkdir -p <path>) |
| Check file mtime | Bash(stat -c %Y <path>) (GNU) / Bash(stat -f %m <path>) (BSD/macOS) |
| Fetch remote catalog | WebFetch |
Key Principles
- Case-insensitive everywhere. All name and description matching is case-insensitive.
- Graceful degradation. Network failures in
invalidate --fetchwarn and continue; they never abort the session or raise an unhandled error (REL-1). - HTTPS only. The catalog URL must always use
https://(SEC-3). - Read before write. Use
Readto check existing files beforeWriteto avoid blind overwrites without user confirmation. - User drives installs. Never silently write to
~/.claude/agents/without presenting options and getting implicit or explicit user consent. - Canonical group order is fixed.
listuses mechanical → routine → deep → frontier → exceptional → inherit → undeclared/legacy. Native selectors remain separate metadata; never turn their spelling into a demand class, quality ranking, or enforcement claim.
04 同仓库更多 Skills
yolo
Start temporary autonomy for the current task or an explicit scope with a required --for expiry. Codex permits scoped pushes, merges, deploys, and releases after strict testing and validation; Full access is a separate runtime setting. Claude Code uses a session permission hook with a protected-action denylist.
veracity-audit
Audit a data pipeline for Veracity and Value. Dispatches data-scientist, compliance-auditor, and data-engineer agents with project context injected at dispatch time. All source paths are supplied via flags — no defaults, no project assumptions. Subcommands: audit (full pipeline walk), score-check (scoring math only), gate-check (gate coverage only), source-trace <label> (single source end-to-end). Invoke when: "audit pipeline", "veracity check", "scoring math correct?", "check gates", "trace source", "verify quality gates", "formula correct?".
validate-spec
Audit an already-implemented spec against the codebase. Walks each constraint (ARCH-N, PERF-N, KD-N, etc.) and acceptance criterion, grounds findings in file:line evidence, runs the spec.json acceptance_commands, and writes a single audit doc to docs/audits/. Use whenever the user asks to "validate a spec", "audit a spec", "check if spec is implemented", "verify the spec is done", "is this spec really done", or otherwise wants closure on spec-driven work. Read-only against the spec — produces an audit, never modifies the spec itself.
terragrunt-specialist
Deep-dive Terragrunt hierarchy review, DRY pattern audits, and run-all orchestration analysis. Use for structured investigations of multi-environment Terragrunt layouts, dependency graphs, remote state config, and hook correctness. Triggers on: "Terragrunt audit", "run-all review", "dependency block", "DRY pattern review", "env hierarchy audit", "mock_outputs", "terragrunt hooks".
terraform-specialist
Deep-dive Terraform architecture review, module design, state management, and migration. Use for structured investigations of Terraform workspaces, provider configuration, module coupling, import workflows, and test coverage. Triggers on: "Terraform audit", "module review", "state management", "Terraform import", "workspace design", "provider config review", "Terraform testing".
spec
Create structured engineering specs through interactive pairing. Use when the user wants to create a spec, design doc, technical specification, architecture document, RFC, or engineering plan. Triggers on "let's spec this out", "create a spec", "design doc", "write a technical plan", "plan the architecture". Works for greenfield and brownfield projects. Outputs to docs/specs/.