Skip to content

[Demo] SEP-2640 Skills over MCP: bundled + per-repo + discovery#2360

Closed
olaservo wants to merge 5 commits intogithub:mainfrom
olaservo:add-agent-skills
Closed

[Demo] SEP-2640 Skills over MCP: bundled + per-repo + discovery#2360
olaservo wants to merge 5 commits intogithub:mainfrom
olaservo:add-agent-skills

Conversation

@olaservo
Copy link
Copy Markdown
Contributor

@olaservo olaservo commented Apr 20, 2026

Summary

Server-side demo of SEP-2640 (Skills extension to MCP). Implements the SEP's full discovery surface and verifies the autonomous-agent discovery loop end-to-end against anthropics/skills.

Builds on top of #2374 (catalogue + Instructions cleanup) and #2129 (per-repo resource template). WIP demo fork, not intended for upstream merge as-is.

What's in this branch

  • 28 bundled SKILL.md skills at skill://github/<name>/SKILL.md via //go:embed (25 from feat: replace server instructions with skill resources #2374, 2 deepened — review-pr and handle-notifications — and 1 meta-skill discover-mcp-skills).
  • skill://index.json advertising both type: "skill-md" and type: "mcp-resource-template" entries (agentskills.io v0.2.0 schema). Two of the SEP's three index entry types in one server.
  • Per-repo template skill://{owner}/{repo}/{skill_name}/{+file_path} reading any file inside any discovered skill in any GitHub repo. _manifest from feat: add skill:// resource templates for Agent Skills discovery #2129 dropped as non-SEP.
  • list_repo_skills tool wrapping tree discovery so autonomous agents can enumerate (workaround for the SEP's UI-only completion/complete gap; documented as such).
  • Cleanup: removes the legacy InstructionsFunc / WithServerInstructions machinery (~308 lines). Skills are the only guidance surface.
  • New non-default skills toolset gates the per-repo bits.

Verified end-to-end

Live stdio JSON-RPC test:

  • initialize declares io.modelcontextprotocol/skills extension at protocol 2025-11-25.
  • resources/list → 29 skill:// entries; skill://index.json validates against v0.2.0 schema with 28 skill-md + 1 mcp-resource-template.
  • tools/call list_repo_skills(owner=anthropics, repo=skills) → 18 skills with valid skill:// URLs.
  • resources/read round-trips both SKILL.md (8 KB) and a relative file forms.md (12 KB) for anthropics/skills/pdf through the per-file template handler.

Test plan

  • go build ./... and go test ./... clean
  • --toolsets=default excludes per-repo template + list_repo_skills
  • --toolsets=default,skills (or =all) exposes them
  • Live discovery loop verified against anthropics/skills

Branch shape

11 commits on top of main: 4 historical (Registry + 2 original skills + content polish) + 7 focused new commits. The new ones are split by concern: cleanup, URI prefix, rename + drop gating, import 25, per-repo template + skills toolset, list_repo_skills tool, discover-mcp-skills meta-skill.

🤖 Generated with Claude Code

olaservo and others added 4 commits April 19, 2026 19:58
Introduce a reusable `skills` package that lets an MCP server publish
server-bundled Agent Skills (SKILL.md files shipped in the binary) per
the skills-over-MCP SEP (SEP-2133):

  - skills.Bundled describes one skill (name, description, embedded
    content, optional icons, optional enabled predicate for runtime
    gating on toolsets/feature-flags/headers)
  - skills.Registry collects entries, declares the
    `io.modelcontextprotocol/skills` extension capability on the server,
    and installs each SKILL.md as an MCP resource plus a
    skill://index.json discovery document conforming to the
    agentskills.io/discovery/0.2.0 schema

The package has no GitHub-specific state — any MCP server author can
drop it in to publish bundled skills with a small amount of wiring.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Ship a SKILL.md at skills/pull-requests/SKILL.md that documents the
pending-review workflow for submitting a multi-comment GitHub pull
request review (pull_request_review_write → add_comment_to_pending_review
→ submit_pending). The skill file lives at the repo root so it is also
usable as a plain agent skill by any consumer that scans the repo
(Claude Code, the agent-skills CLI), independent of this server.

Register the skill via skills.Registry in NewMCPServer, gated on the
pull_requests toolset being enabled. Both stdio and HTTP transports
pick it up since both routes through NewMCPServer. The pull_requests
toolset's inline server instructions are unchanged — skill-aware hosts
discover the skill through the extension capability, skill://index.json,
and resources/list; older hosts continue to receive the same inline
instructions they always have.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The bundled skill now reads differently from the inline server
instructions rather than mirroring them, showing the point of
progressive disclosure: a skill-aware host spends no extra context on
every request but can pull the deeper version on demand.

Restructure into "When to use", "Workflow" (numbered steps), and
"Caveats" sections per the agentskills.io spec's recommended body
shape. Add content that is *not* in the inline instructions:
- when to skip this flow (single top-level comment / approve without
  inline feedback)
- the pending-ness hinges on omitting `event` in step 1
- specific line-ref parameter names (path, line, side, startLine,
  startSide)
- the concrete `APPROVE | REQUEST_CHANGES | COMMENT` event values
- pending reviews are invisible to the PR author and can be deleted
  via `method: "delete_pending"`

Update the embedded-content test to check for the new `## Workflow`
section header and a second tool-name presence assertion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Ship a second bundled skill that walks the agent through systematic
GitHub notifications triage: enumerate with list_notifications,
partition by reason (review_requested / mention / assign /
security_alert — high; author / comment / state_change — medium;
ci_activity / subscribed — low), act on high-priority items, then
dismiss with state "done" or "read" per the skill's rule.

Demonstrates:
- Multiple bundled skills in one server (registry now has two entries).
- Per-skill toolset gating — pull-requests gates on pull_requests,
  inbox-triage gates on the non-default notifications toolset, so
  enabling one does not force the other.
- Cross-skill reference (the inbox-triage workflow points at the
  pull-requests skill when handling review_requested items).
- Skills teaching workflow judgment (priority buckets) that tool
  descriptions alone cannot encode.

Tests cover the symmetric structural checks, per-toolset registration
paths, the multi-skill index.json shape, and the capability declaration
firing on either toolset.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stasyu2009-ux
Copy link
Copy Markdown

Я зробив тестування та там ще треба щоб було виправити проблему треба трохи додати деяких функціоналів я все зробив дякую за увагу.

Expands the Agent Skills surface from 2 to 28 bundled skills, adds a
per-repo resource template covering arbitrary GitHub repositories, and
introduces a model-facing discovery tool to bridge the gap left by the
SEP's UI-only completion mechanism.

- Import 25 workflow-oriented skills from github#2374
  as standalone SKILL.md files (skip review-pr and handle-notifications
  due to overlap with our pull-requests / inbox-triage). Migrate URI
  shape to skill://github/<name>/SKILL.md to match github#2374's prefix style.

- Remove the legacy Instructions / InstructionsFunc / WithServerInstructions
  machinery (~300 lines). Skills are now the only guidance surface.

- Add a SEP-aligned per-repo resource template
  skill://{owner}/{repo}/{skill_name}/{+file_path} (from PR github#2129, with
  the non-SEP _manifest endpoint dropped). Gated on a new non-default
  `skills` toolset. Index now advertises both SEP entry types
  (skill-md and mcp-resource-template).

- Add list_repo_skills tool that wraps the existing discoverSkills() and
  returns each discovered skill plus a skill:// URL ready for
  resources/read. Workaround for autonomous-agent discovery on unbounded
  template namespaces — documented as such.

- Add discover-mcp-skills meta-skill (always-on) that teaches the model
  the discover-then-read workflow for both bundled and repo-hosted
  surfaces.

Verified end-to-end against anthropics/skills via stdio JSON-RPC: full
loop from index read through SKILL.md to relative-file resolution works.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@olaservo
Copy link
Copy Markdown
Contributor Author

Closing this PR for now

@olaservo olaservo closed this Apr 28, 2026
@olaservo olaservo changed the title [WIP] Demo for Skills Over MCP [Demo] SEP-2640 Skills over MCP: bundled + per-repo + discovery May 3, 2026
@johnsoniphone77-png johnsoniphone77-png mentioned this pull request May 3, 2026
13 tasks
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