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 fe89998
Browse filesBrowse the repository at this point in the historyBrowse files
Make CacheScopeConverter public in Core instead of compiling its source into
the Skills package, which was the only package doing so. Adding a public
type passes package validation against the 2.0.0 baseline.
Validate only what the Agent Skills specification states as requirements
beyond name and description: compatibility is 1 to 500 characters if
provided, and metadata is a mapping. license, allowed-tools, and the values
inside metadata pass through verbatim. Hosts compare frontmatter against
the file and ignore allowed-tools for MCP-origin skills, so rejecting a
whole skill over the shape of such a field would help nobody.
Repeat the authorization caveat on WithSkills(IEnumerable<McpServerSkill>)
and WithSkillsFromDirectory, whose in-memory catalog serves every caller,
and explain why a directory without SKILL.md is skipped while an invalid
skill is an error.
Guard the public verifier and client read path against a Skill whose
required Resources property was assigned null, and document
SkillVerificationException on the remaining GetSkillAsync overload.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P6omaTvQiryHtzFHRqUE3b
All of these validate the skill against the specification and throw <xref:System.ArgumentException> with a
78
78
specific message when, for example, the frontmatter `name` does not match the URI, `description` exceeds the
79
-
Agent Skills limit of 1024 characters, `metadata` is not a map of strings, a resource URI escapes the skill's
80
-
directory, `SKILL.md` is missing, or the skill exceeds the per-skill limits of 512 files or 16 MiB. File contents are copied when the skill is created, so
79
+
Agent Skills limit of 1024 characters, a resource URI escapes the skill's directory, `SKILL.md` is missing, or
80
+
the skill exceeds the per-skill limits of 512 files or 16 MiB. Frontmatter fields beyond `name`, `description`,
81
+
`compatibility`, and the shape of `metadata` pass through verbatim, as the specification requires; hosts compare
82
+
them against the file and ignore fields such as `allowed-tools` for MCP-origin skills. File contents are copied when the skill is created, so
81
83
later changes to a caller's buffer or to files on disk do not affect what is served. `CreateFromDirectory` does not
82
84
follow symbolic links, since a link can point outside the skill directory; it throws if it encounters one. File
83
85
names containing characters with URI syntax (such as `{`, `?`, or a space) are percent-encoded in the resource URIs.
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
157
-
/// <returns>The result, as returned by the server.</returns>
157
+
/// <returns>The result, as returned by the server, with the entry validated against the specification.</returns>
158
158
/// <exception cref="ArgumentNullException"><paramref name="client"/> or <paramref name="requestParams"/> is <see langword="null"/>.</exception>
159
159
/// <exception cref="InvalidOperationException">The server did not declare the MCP Skills extension.</exception>
160
+
/// <exception cref="SkillVerificationException">
161
+
/// The server returned an entry that violates the specification, or an entry for a different URI than the one requested.
162
+
/// </exception>
160
163
/// <exception cref="McpException">The request failed or the server returned an error response.</exception>
if(skill.Frontmatter.TryGetPropertyValue("metadata",outvarmetadataNode)&&metadataNodeis not JsonObject)
215
218
{
216
-
if(metadataNodeis not JsonObjectmetadata)
217
-
{
218
-
thrownewArgumentException($"Skill '{skill.Uri}' has a 'metadata' frontmatter field that is not a mapping; the Agent Skills specification requires a map from string keys to string values.",paramName);
219
-
}
220
-
221
-
foreach(varentryinmetadata)
222
-
{
223
-
if(entry.Valueis not JsonValuevalue||!value.TryGetValue(outstring?_))
224
-
{
225
-
thrownewArgumentException(
226
-
$"Skill '{skill.Uri}' has a 'metadata.{entry.Key}' frontmatter value that is not a string; the Agent Skills specification requires string values. Quote it in SKILL.md if it is meant literally.",
227
-
paramName);
228
-
}
229
-
}
219
+
thrownewArgumentException(
220
+
$"Skill '{skill.Uri}' has a 'metadata' frontmatter field that is not a mapping. Give it key-value entries, or remove the key if it is not needed.",
0 commit comments