list-agents

A command that lists custom coding agents installed globally and in the current project. It can also show one agent’s scope, settings, tools, and prompt excerpt.

In plain words
What is it for?
Use it to view the agent roster or inspect a particular agent definition and its configured tools.
Why use it?
It makes available agent roles easier to discover and shows when a project-specific agent overrides a global one.

Command for Claude Code

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.

agentmods
npx agentmods add commands/gosha70/code-copilot-team/list-agents
Clone the repo
git clone --depth 1 https://github.com/gosha70/code-copilot-team

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 410 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00410
Opus 5 $0.00000 $0.00205
Sonnet 5 $0.00000 $0.00082
Haiku 4.5 $0.00000 $0.00041

Measured 2d ago against content hash f77010fb60be, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

list-agents 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 2d 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.

adapters/claude-code/.claude/commands/list-agents.md · 36 lines

What it actually says

List the custom subagents installed on this machine and in this project — the replacement for the built-in /agents command removed from recent Claude Code versions.

Note: built-in agent types (e.g. general-purpose, Explore) and plugin-supplied agents have no file in these directories and are not covered by this roster.

Usage: /list-agents [name]

Steps

1. Collect agent definitions

Scan both scopes:

  • Global: ~/.claude/agents/*.md
  • Project: .claude/agents/*.md (relative to the project root)

Read each file's YAML frontmatter: name, description, tools, model. If name is missing, use the filename without .md.

2. Detail view (with argument)

If [name] is given, show only that agent in full: scope, file path, description, model, tools, and a short excerpt (first ~20 lines) of its system prompt body. If nothing matches, say so and list the available names.

3. Roster view (no argument)

Print one table per scope, project scope first:

Agent Model Tools Description
  • A project-level agent overrides a global agent with the same name — mark the shadowed global entry as (shadowed).
  • If a scope's directory is missing or empty, say so on one line; do not treat it as an error.
  • If no agents are found in either scope, explain that this machine has no agent setup installed and point to adapters/claude-code/setup.sh (fresh install) or setup.sh --sync (update) in the code-copilot-team repo, which installs the standard team (research, plan, build, review, and the utility agents).

4. Read-only

Do not create, edit, or delete any agent files. This command only reports.

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. 2d ago First seen · 36 lines · 0 tokens per session scan A f77010fb60be

Subscribe to this mod's changes

list-agents is a command published in the GitHub repository gosha70/code-copilot-team (6 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 410 tokens. 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-31.