Skip to content

Commit 21ae94d

Browse files
feat: add skill:// resource templates for Agent Skills discovery
Add MCP resource templates that expose Agent Skills (per agentskills.io spec) from GitHub repositories via the skill:// URI scheme. Resource templates: - skill://{owner}/{repo}/{skill_name}/SKILL.md — fetch skill content - skill://{owner}/{repo}/{skill_name}/_manifest — JSON manifest with repo:// URIs for each file, composing with existing repo:// resources Discovery uses the Git Trees API to find SKILL.md files under known paths (.github/skills/, skills/, .copilot/skills/). Completions support for owner, repo (reusing existing resolvers), and skill_name (discovers skills via tree search). Registered under a new non-default 'skills' toolset. Enable with --toolsets=skills or --toolsets=default,skills. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c38802a commit 21ae94d

File tree

5 files changed

+978
-0
lines changed

5 files changed

+978
-0
lines changed

pkg/github/resources.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,9 @@ func AllResources(t translations.TranslationHelperFunc) []inventory.ServerResour
1515
GetRepositoryResourceCommitContent(t),
1616
GetRepositoryResourceTagContent(t),
1717
GetRepositoryResourcePrContent(t),
18+
19+
// Skill resources
20+
GetSkillResourceContent(t),
21+
GetSkillResourceManifest(t),
1822
}
1923
}

pkg/github/server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ func CompletionsHandler(getClient GetClientFn) func(ctx context.Context, req *mc
200200
if strings.HasPrefix(req.Params.Ref.URI, "repo://") {
201201
return RepositoryResourceCompletionHandler(getClient)(ctx, req)
202202
}
203+
if strings.HasPrefix(req.Params.Ref.URI, "skill://") {
204+
return SkillResourceCompletionHandler(getClient)(ctx, req)
205+
}
203206
return nil, fmt.Errorf("unsupported resource URI: %s", req.Params.Ref.URI)
204207
case "ref/prompt":
205208
return nil, nil

0 commit comments

Comments
 (0)