[DOCS] plugins-reference still shows a flat `agents/` tree and omits recursive scanning and path-scoped identifiers

Open Beginner friendly
#94,857 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
90/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Domain
documentation

Research direction

Open the plugins-reference page and compare its “Standard plugin layout” and “Agents” sections with the referenced sub-agents guidance. Update the tree and Agents section to document recursive scanning and path-scoped identifiers, then verify the page includes the nested example and links to the sub-agents rules.

Written by the indexing model from the issue text.

Description

area:agents area:docs area:plugins documentation enhancement
Documentation Type

Incorrect/outdated documentation

Documentation Location

https://code.claude.com/docs/en/plugins-reference

Section/Topic

"Standard plugin layout" tree and the "Agents" component section

Current Documentation

The layout tree shows agents/ as flat top-level files only (verified 2026-09-16):

├── agents/                   # Subagent definitions
│   ├── security-reviewer.md
│   ├── performance-tester.md
│   └── compliance-checker.md

The "Agents" section says only:

Location: agents/ directory in plugin root

The page contains no occurrence of "recursive", "subfolder", or "subdirectory" in the context of agents/.

What's Wrong or Missing?

/en/sub-agents documents two behaviors that /en/plugins-reference does not mention:

Claude Code scans .claude/agents/ and ~/.claude/agents/ recursively, so you can organize definitions into subfolders such as agents/review/ or agents/research/.

Plugin agents/ directories are also scanned recursively. Unlike project and user scopes, a subfolder inside a plugin's agents/ directory becomes part of the scoped identifier: a file at agents/review/security.md in plugin my-plugin registers as my-plugin:review:security.

The reference page is the page a plugin author reads to learn the layout. That page shows agents/ flat, while it shows skills/ nested. A reader concludes that subfolders under agents/ are unsupported. The path-scoped identifier rule also changes how a user invokes the agent, and the reference page never states it.

Suggested Improvement

Two small edits:

  1. Add one nested example to the layout tree:
├── agents/                   # Subagent definitions (scanned recursively)
│   ├── security-reviewer.md
│   ├── performance-tester.md
│   └── review/
│       └── compliance-checker.md   # registers as my-plugin:review:compliance-checker
  1. Add one paragraph to the "Agents" component section, after the Location line:

Claude Code scans the agents/ directory recursively. A subfolder becomes part of the scoped identifier: agents/review/security.md in plugin my-plugin registers as my-plugin:review:security. See Organize subagents in subdirectories for the project and user scope rules.

Impact

Medium - Makes feature difficult to understand

Additional Context

Lineage: #58950 first asked for this clarification and the stale bot closed it. #68046 refiled the remaining plugins-reference gap on 2026-06-12, and the stale bot closed it on 2026-09-14 with no maintainer reply. The bot's closing note asks for a new issue when the topic is still relevant, so this is that issue.

The gap is unchanged since #68046. One maintainer reply that confirms the sub-agents wording is the intended contract resolves this issue.

Dominant language
TypeScript
Stars
147k
Forks
24k
Avg merge
8h 14m
Merged PRs (30d)
18

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anthropics/claude-code

All issues in anthropics/claude-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.