Repository navigation
feat(skills): serve cloudflare/skills through the MCP Skills extension, synced every six hours - #272
Merged
Merged
Conversation
mattzcarey
force-pushed
the
feat/skills-extension
branch
from
October 9, 2026 00:41
1dcd077 to
e706ac4
Compare
Sync cloudflare/skills to R2 daily and serve it with skills/list, skills/get and resources/read (io.modelcontextprotocol/skills, SEP-2640) in both tool modes.
mattzcarey
force-pushed
the
feat/skills-extension
branch
from
October 9, 2026 00:43
e706ac4 to
51d02a8
Compare
Run the spec and skills syncs together on one 0 */6 * * * cron. Store skill files content-addressed under skills/files/<sha256> with a manifest at skills/manifest.json. A sync writes only new bytes, skips the manifest when no skill changed, and deletes files neither the new nor previous manifest names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The server now serves
cloudflare/skillsthrough the MCP Skills extension (io.modelcontextprotocol/skills, SEP-2640), in Code Mode and with?codemode=false. Clients that support the extension discover skills withskills/listand read each file atskill://<name>/<path>. The scheduled sync now runs every six hours instead of daily: it picks up skill changes and writes only the files that changed, and the OpenAPI spec sync runs on the same cron.Skills are where Cloudflare keeps its long-form guidance for agents, and they change often. Most of it is far too long for server instructions, and right now agents have to install it separately from this server. SEP-2640 is final, written against
2026-07-28(which we already serve), and SDK 2.3.1 supports custom methods andcapabilities.extensions, so it needs no SDK change.src/skills/sync.ts,tar.ts,bundle.ts): one tarball request, read by a small tar parser that keeps only regular files (no symlinks, no..paths). Eachskills/<name>/becomes one skill. A skill is skipped, with the reason logged, if its name is invalid or doesn't match its directory, it lacksname/descriptionfrontmatter, or it's over 512 files / 16 MiB. Frontmatter is parsed withyaml(new dependency, no transitive deps) and passed through verbatim.skills/files/<sha256>, so a sync uploads only bytes R2 doesn't already holdskills/manifest.jsonis written after those files, and only when a skill entry changed, so a commit outsideskills/writes nothingsrc/skills/handlers.ts): every entry carries asha256digest and size for each of its files, andresources/readreads each file by its digest, so the served bytes always match. Results are identical for every user, so they're cachedpublicfor one hour.resources/listlists only theSKILL.mdfiles.directoryReadisn't declared because every manifest is already complete.0 */6 * * *cron (was0 0 * * *) runs the spec and skills syncs underPromise.allSettled, so one failing doesn't hold back the other.Tests ran, including incremental-sync tests against real R2. On a throwaway Worker, I ran the scheduled handler on Cloudflare with
wrangler dev --remote --test-scheduled:Skills unchangedmcp-inspector --cli <url> --method skills/list --verify(Inspector 2.10.1) against the deployed Worker reported "Verified 16 skills and 298 files: no conformance errors"After deploy,
npm run seed:staginguploads the skill files (withwrangler r2 bulk put) and the manifest, so skills are live before the first cron run.