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
{{ message }}
Repository navigation
Commit b2e92aa
Browse filesBrowse the repository at this point in the historyBrowse files
Requiring authors to restate a SKILL.md's frontmatter as a JsonObject was
awkward and error-prone. SkillFrontmatter.Parse now reads it from the file
without a YAML dependency, accepting the subset Agent Skills frontmatter
uses (nested block mappings, block and flow sequences, plain, quoted, and
block scalars, comments) and resolving unquoted scalars per the YAML 1.2
core schema, which matches the YAML libraries other SDKs and hosts use.
Anchors, aliases, tags, multi-document streams, complex keys, and tab
indentation are rejected with a FormatException naming the construct,
since a guessed rendering would fail host-side verification.
McpServerSkill gains Create(files), Create(uri, files),
CreateFromDirectory(path), and CreateFromDirectory(uri, path), which read
the frontmatter from SKILL.md and, where no URI is given, derive it from
the frontmatter name as skill://{name}/SKILL.md. The overloads that take an
explicit JsonObject remain for frontmatter the reader cannot handle; when
the reader can parse the file, a supplied object that differs from it is
rejected at construction, since hosts compare the two field by field.
WithSkillsFromDirectory(path, uriPrefix) serves every immediate
subdirectory containing a SKILL.md in one call.
The server sample shrinks to a single WithSkillsFromDirectory call, the
conformance fixture reads its frontmatter from the files, and the docs
describe the reader, its limits, and the escape hatch. ClientServerTestBase
gains a virtual DisposeAsync so fixtures can clean up temporary directories.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P6omaTvQiryHtzFHRqUE3b
`McpServerSkill.CreateFromDirectory` reads each directory, computes the SHA-256 digest and size of every file, and
14
-
produces both the skill's entry and the resources that serve its files. `WithSkills` registers the `skills/list`
15
-
and `skills/get` methods and the resources in one call.
16
-
17
-
The frontmatter is passed in code and must mirror the YAML at the top of each `SKILL.md` exactly. Hosts verify
18
-
this and refuse a skill whose entry disagrees with its file. The extension does not parse YAML.
13
+
`WithSkillsFromDirectory` reads every skill directory, parses the YAML frontmatter of each `SKILL.md`, computes the
14
+
SHA-256 digest and size of every file, and registers the `skills/list` and `skills/get` methods together with the
15
+
resources that serve the files, in one call. Each skill's URI is `skill://{name}/SKILL.md`, where `name` comes from
16
+
its frontmatter; pass a `uriPrefix` to place skills under an organizational path such as `skill://acme/billing/`.
19
17
20
18
## Run
21
19
@@ -35,8 +33,8 @@ Any MCP host that supports Streamable HTTP can also be pointed at `http://localh
35
33
36
34
## Notes
37
35
38
-
- Skill URIs are scoped to the server that serves them. The nested path `acme/billing/refunds` shows an
39
-
organizational prefix; only the final segment must equal the skill's `name`.
36
+
- Skill URIs are scoped to the server that serves them. A URI may carry an organizational prefix, as in
37
+
`skill://acme/billing/refunds/SKILL.md`; only the final segment must equal the skill's `name`.
40
38
- The server's instructions point the agent at `skill://git-workflow/SKILL.md` directly. A host can confirm a
41
39
URI with `skills/get` and read it with `resources/read` without ever listing the catalog.
42
40
- The listing is identical for every caller, so it advertises `cacheScope: public` with a five-minute `ttlMs`.
0 commit comments