feat(skills): bring skill implementation to agentskills.io conformance - #91
Merged
Conversation
added 2 commits
August 28, 2026 21:49
The REPL loader never read or validated the `name:` frontmatter field (it used the directory name unconditionally) and ignored license/compatibility/ metadata/allowed-tools entirely, while orchestration's Microsoft.Agents.AI loader already enforced the full spec — so a skill could work in one surface and silently vanish from the other with no diagnostic. Two related bugs compounded this: `skills add` and skill curation could install a SKILL.md whose `name:` field didn't match the directory it was written under, and read_skill_resource/run_skill_script only did a lexical path-containment check, so a symlink planted inside a skill directory could escape it. Introduces src/Core/Skills/SkillFrontmatter.cs (parsing + validation mirroring Microsoft's AgentSkillFrontmatter rules exactly) and SkillPathGuard.cs (symlink-safe path resolution) as the single source of truth all three skill-authoring surfaces now share, instead of three separate ad hoc regexes. The REPL loader keeps its lenient fallback for skills with no frontmatter, but now validates any name/description/ compatibility field that is declared and skips (with a warning) one that violates the spec; its discovery walk is now bounded and symlink-safe to match orchestration. `skills add` and curation canonicalize the `name:` field to the installed slug before writing. Adds `fuseraft skills validate` (fuseraft's equivalent of the spec's own skills-ref validate tool) and Requires/Spec columns on `skills list`.
Replaces the hand-rolled SkillFrontmatterSpec/SkillPathGuard/SkillsPlugin (added earlier the same day) with direct use of Microsoft.Agents.AI's AgentFileSkillsSource/AgentSkillsProvider for both the REPL and orchestration — one implementation instead of two that happened to agree, per user direction to use out-of-the-box tools rather than reimplementing spec parsing/validation. ReplSkillsLoader is now a thin wrapper that wraps the REPL's IChatClient in a throwaway ChatClientAgent to satisfy the framework's AIAgent context requirement; SkillsPlugin.cs is gone entirely, replaced by AgentSkillsProvider's own load_skill/read_skill_resource/ run_skill_script tools. While wiring this up, found and fixed a real, pre-existing bug: AgentSkillsProvider wraps its tools in ApprovalRequiredAIFunction by default, which only resolves through Microsoft's ToolApprovalAgentOptions pipeline — fuseraft has no wiring for that anywhere, so orchestration's skill tools were silently non-functional (confirmed live: a real `fuseraft run` session asking the model to call load_skill returned empty text and 0 tool calls). Fixed by disabling approval for all three tools, since an unresolved gate is strictly worse than none until real approval wiring exists. `skills add` keeps its lenient auto-canonicalization by explicit user decision (it derives an install slug from a raw title and rewrites the installed name: field to match); `skills validate`, `skills list`, and SkillCurator are now strict, deferring entirely to AgentSkillFrontmatter's own constructor/static validators. The only hand-written parsing left is FrontmatterFieldReader, a ~50-line read-only "grab one YAML field's raw value" utility needed only to bootstrap where to place a file before Microsoft's API — which requires a correctly-named directory — can validate it at all.
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.
No description provided.