Repository navigation
Description
Problem
ADR-0074 installs a pool's skill sets into the agents' user skill folders (~/.claude/skills, ~/.agents/skills, ...). That is right for generic skills. A set that also carries project skills (ADR-0074, Context: "generic ones for every repository, and ones for a project") puts those into every session on the machine, in every repository.
Project skills tend to have generic triggers ("new page", "new grid", "add a button") and very specific content (one codebase's libraries, paths, conventions). An agent working in another repository sees the description, picks the skill and scaffolds code against libraries that do not exist there. The descriptions also cost context in every session of every project.
What we do today as a stopgap, in the source of the set:
- the description starts with "Only in the repository
<owner>/<name>" and ends with "do not use in other repositories"; - the skill's first step checks
git remote get-url originand stops elsewhere.
That works, but it relies on the model reading the description, and the descriptions still load everywhere.
Proposal
Let a skill (or a set) say which repositories it belongs to, and let devstack keep it out of the others.
- Contract:
metadata.reposin the frontmatter, next togroup/tags(ADR-0077), e.g.repos: [acme/shop], matched against theoriginof the working tree. Optionally the same as a field of the set (devstack pool skills add ... --repos acme/shop). Additive: an older hub ignores it and installs as today. - Delivery: the open question, because ADR-0071 keeps devstack out of repository files. Options:
- a) The hub keeps scoped skills out of the user folders.
devstack mcp, which already runs per stack, offers them in a stack whoseoriginmatches, e.g. as MCP prompts/resources. ADR-0074 rejected MCP as the general channel, but for scoped skills it is the one place that knows the repository. - b) The hub installs them, but into a per-project location of the agent outside the repository, where the agent has one. Claude Code could get a plugin from a hub-managed local marketplace, enabled per project. That needs an
enabledPluginsentry in the project's local settings, which is a file in the repository, though an untracked one. - c) The hub keeps installing into the user folders but rewrites the description from
metadata.repos("Only inacme/shop...") and adds the origin check. That is cheap and harness-independent, but the context cost stays.
- a) The hub keeps scoped skills out of the user folders.
- Several folders per set, each with its own members. Today a set has one
pathand oneto. A team that keeps its generic skills and its project skills in one source (e.g.skills/andprojects/acme-shop/skills/) has to register a set per folder to give the project folder only to the people working on that project. Instead a set could list several folders, each with its ownto(*, member ids, tags):Who gets which skill is then still the pool's allocation (ADR-0074, trust), just per folder instead of per set;devstack pool skills add team --github org/team-skills \ --path skills --to '*' \ --path projects/acme-shop/skills --to tag:acmemetadata.group(ADR-0077) stays display and switching only. Together withmetadata.repos(point 1) this scopes a project skill twice: to the people who work on the project, and on their machines to the repository. - Dashboard: the Skills page shows the repositories a skill is bound to and where it is active.
My preference is a) where the agent speaks MCP, with c) as the fallback. A review card should come first (ADR-0070).
Acceptance
- A skill with
metadata.reposis not offered to an agent working in a repository that does not match. - In a matching repository and its worktrees/lanes it is available as before.
- Skills without
metadata.reposbehave exactly as today. - A set with several folders hands each folder only to the members given for it; a set with one
path/tobehaves exactly as today.
Activity