fix(skills): add path resolution guidance to skills preamble

Models were resolving relative paths in skill files from cwd instead of
the skill directory. Added explicit instruction that relative paths are
resolved from the skill directory (parent of the location path).

Fixes #1136
This commit is contained in:
Mario Zechner 2026-02-01 18:06:13 +01:00
parent 67dbe7c6b7
commit 3c687b427e
2 changed files with 2 additions and 0 deletions

View file

@ -263,6 +263,7 @@ export function formatSkillsForPrompt(skills: Skill[]): string {
const lines = [
"\n\nThe following skills provide specialized instructions for specific tasks.",
"Use the read tool to load a skill's file when the task matches its description.",
"Relative paths inside skill files are resolved from the skill directory (parent of the location path).",
"",
"<available_skills>",
];