You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds the SEP-2640-aligned per-repo Agent Skills surface: a single
parameterized MCP resource template that lets any GitHub repo expose
its skills/ directory through the same skill:// URI scheme used for
bundled skills.
Template:
skill://{owner}/{repo}/{skill_name}/{+file_path}
`{+file_path}` is RFC 6570 reserved expansion, so a multi-segment
relative path inside the skill directory (e.g. references/GUIDE.md)
round-trips through the template as a single value. SKILL.md and any
relative references mentioned inside it both resolve via this one
template handler.
Discovery on the server:
- Recognizes the four agentskills.io directory conventions:
skills/<name>/SKILL.md, skills/<namespace>/<name>/SKILL.md,
plugins/<plugin>/skills/<name>/SKILL.md, and root-level
<name>/SKILL.md (excluding hidden + convention-prefix dirs).
- Skill discovery happens at request time via the Git Trees API.
- skill:// completion is wired through CompletionsHandler so MCP
hosts can offer interactive autocomplete on owner/repo/skill_name.
Index integration:
- skills.Registry extended with BundledTemplate + AddTemplate +
EnabledTemplates so skill://index.json now publishes both
type:"skill-md" entries (the 27 bundled skills) and a single
type:"mcp-resource-template" entry (the per-repo template).
- IndexEntry.Name is now omitempty since the SEP example shows
template entries without a name.
- DeclareCapability fires for either type of entry being enabled.
Toolset gating:
- New non-default `skills` toolset gates the per-repo template's
index entry. With --toolsets=default the per-repo surface is hidden;
with --toolsets=default,skills (or --toolsets=all) it's published.
- The per-repo template is defined in pkg/github/skills_resource.go;
registered via AllResources so the inventory wires it up alongside
repo:// templates.
Adapted from the resource-template work in
#2129. The non-SEP _manifest endpoint from
that PR is intentionally NOT ported — multi-file skill discovery is
handled by the SEP's per-file URI resolution, not a manifest JSON.
Tests cover: template definition, file handler with SKILL.md, file
handler with multi-segment relative path, missing-arg errors, path
traversal rejection, agentskills.io convention discovery,
URI parsing, completion handler, and the index-entry presence/absence
based on toolset gating.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description: "Create and manage code snippets via GitHub Gists. Use when sharing a code snippet, creating a quick paste, saving notes as a gist, or managing your existing gists.",
// Gated on the `skills` toolset since the matching MCP resource
162
+
// template is registered there too.
163
+
AddTemplate(skills.BundledTemplate{
164
+
Description: "Agent Skills hosted in any GitHub repository — fill in {owner}/{repo}/{skill_name} to read SKILL.md, then extend the URI to read referenced files (e.g. references/GUIDE.md).",
0 commit comments