Skip to content

Add namespaced skill discovery - #67

Open
jonathanhefner wants to merge 2 commits into
agentplugins:mainfrom
jonathanhefner:agent/namespaced-skills
Open

Add namespaced skill discovery#67
jonathanhefner wants to merge 2 commits into
agentplugins:mainfrom
jonathanhefner:agent/namespaced-skills

Conversation

@jonathanhefner

Copy link
Copy Markdown
Member

Motivation

Agent Plugins 1.0 discovers skills only as immediate children of skills/. This forces every plugin into a flat skill layout, even when skills come from different sources or belong to distinct namespaces.

Proposal

This PR allows skills beneath namespace directories in plugins that target Agent Plugins 1.1.0.

skills/
├── aws/
│   └── deploy/
│       └── SKILL.md          # name: deploy
├── gcp/
│   └── deploy/
│       └── SKILL.md          # name: deploy
└── skill-creator/
    ├── SKILL.md
    └── templates/
        └── example/
            └── SKILL.md

Here, aws/deploy and gcp/deploy are distinct skills even though both declare name: deploy. Discovery stops at skill-creator/SKILL.md, so the example beneath templates/ is not discovered as another skill.

Clients are free to choose how skill paths map to client-facing identifiers or invocation syntax. Because namespace directories follow the Agent Skills naming grammar, clients with flat identifier schemes can join the path segments. However, joining path segments can produce collisions, so clients must not silently merge distinct skills.

Plugins targeting Agent Plugins 1.0.0 retain the existing immediate-child discovery behavior.

Rationale

Treating the first SKILL.md on each branch as a terminal boundary prevents files bundled within an existing skill from being reinterpreted as nested skills.

Discovery does not follow directory links, keeping traversal finite and avoiding cycles or multiple namespace paths to the same directory.

Allow `skills/` to organize skills beneath validated namespace
directories while treating the first `SKILL.md` on each branch as a
terminal discovery boundary.

Distinguish skills by relative path, isolate client-specific mapping
collisions, and exclude directory links so recursive discovery remains
deterministic without a depth limit. Keep `1.0.0` discovery selected by
its manifest schema.
@Patrick-Erichsen

Patrick-Erichsen commented Aug 20, 2026

Copy link
Copy Markdown

This all makes sense 👍

Some notes from my agent on how this will affect OpenClaw/ClawHub:

  • OpenClaw currently treats a skill’s name as its unique identity for loading, configuration, filtering, and invocation. Allowing duplicate names means we’ll need path-based identities and a clear UX for ambiguous config entries like skills.entries.deploy.
  • ClawHub currently finds every nested SKILL.md; it must stop below the first one.
  • Symlink loops are covered, but the spec should explicitly allow reasonable depth/work limits for maliciously large directory trees.

The first two I'm sharing just for context on our current implementation and the changes we'll need to make to adhere. The third one I think could be an improvement to the spec, maybe a max depth of 4?

Permit clients to stop namespaced skill discovery when an
implementation-appropriate resource limit is exceeded and recommend
reporting incomplete discovery.

Record why the specification avoids fixed depth and breadth limits that
constrain one tree shape without bounding traversal work.
@jonathanhefner

Copy link
Copy Markdown
Member Author

@Patrick-Erichsen Thank you for taking a look! ❤️

  • OpenClaw currently treats a skill’s name as its unique identity for loading, configuration, filtering, and invocation. Allowing duplicate names means we’ll need path-based identities and a clear UX for ambiguous config entries like skills.entries.deploy.

Would a naming scheme like aws/deploy => aws--deploy work for OpenClaw? (It wouldn't be part of the spec, but it should prevent collisions because actual skill names should not have consecutive hyphens.)

  • Symlink loops are covered, but the spec should explicitly allow reasonable depth/work limits for maliciously large directory trees.

I've added a commit saying "Clients MAY stop skill discovery when a client-defined resource limit is exceeded, such as a limit on directory entries inspected." That covers both depth and breadth of potentially-malicious directory trees.

I would prefer to avoid explicitly specified limits because limits might be client specific, and can easily become outdated as technology progresses or as new threats emerge.

Please let me know what you think!

@Patrick-Erichsen

Copy link
Copy Markdown

Would a naming scheme like aws/deploy => aws--deploy work for OpenClaw?

I think we could still run into a scenario where multiple plugins both contain a aws/deploy skill? So I think regardless we'll need something like ${pluginId}-${name}. But not a blocker for us, just flagging for visibility.

I've added a commit saying "Clients MAY stop skill discovery when a client-defined resource limit is exceeded, such as a limit on directory entries inspected." That covers both depth and breadth of potentially-malicious directory trees.

Makes sense to me! Agreed that better to preserve flexibility rather than preempt security concerns here.

@sliekens

sliekens commented Aug 22, 2026

Copy link
Copy Markdown

For user-invocable skills, I'd prefer a format that puts the outcome (deploy) first and the qualifier (aws) second,
e.g.: /deploy--aws instead of /aws--deploy. Even more subjective: I'd prefer to use dot separators like DNS → /deploy.aws.

For naming conflicts, I'm not sure how relevant Claude Code is to this discussion but I noticed they fully qualify skills like this:

/pluginId:skill

e.g.:

/devops-workflows:deploy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants