Skip to content

fix(skills): load_skill points to a pinned skill instead of "not found" - #36

Merged
MatthewHsu1 merged 1 commit into
mainfrom
fix/load-skill-pinned
Oct 2, 2026
Merged

MatthewHsu1 merged 1 commit into
mainfrom
fix/load-skill-pinned

Conversation

@MatthewHsu1

Copy link
Copy Markdown
Owner

Problem

A model read "the service skill" in its instructions and called load_skill('service'), although service was pinned and its body was already in the prompt inside <skill name="service">. MAF answered Error: Skill 'service' not found., and the model went on to guess through 10 tool calls (SpiritAI production, 2026-10-02).

Change

  • PinnedSkillRedirect wraps MAF's load_skill. A pinned name gets: The 'service' skill is already in your instructions, inside <skill name="service">. Use it from there. Every other name goes to MAF unchanged.
  • ReadOnlySkillsProvider already rewrites the skill tools on each turn. It now applies the wrapper, but only when the agent has pinned skills.
  • Pinned skills are not added to <available_skills>, and their body is not returned a second time.

Tests

SkillsProviderFactoryTests covers three cases:

  • a pinned name, with the argument given both as a JsonElement and as a string;
  • a loadable name, which returns its body;
  • an unknown name, which still gets MAF's not-found answer.

@MatthewHsu1
MatthewHsu1 merged commit 5588826 into main Oct 2, 2026
1 check passed
@MatthewHsu1
MatthewHsu1 deleted the fix/load-skill-pinned branch October 2, 2026 19:00
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