Skip to content

feat(skills): bring skill implementation to agentskills.io conformance - #91

Merged
fuseraft merged 2 commits into
mainfrom
feature/skills
Aug 29, 2026
Merged

feat(skills): bring skill implementation to agentskills.io conformance#91
fuseraft merged 2 commits into
mainfrom
feature/skills

Conversation

@fuseraft

Copy link
Copy Markdown
Owner

No description provided.

Scott Stauffer 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.
@fuseraft
fuseraft merged commit aae35b8 into main Aug 29, 2026
5 checks passed
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.

1 participant