From 3c687b427ec24c83138ae1c9de88f75f30491005 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Sun, 1 Feb 2026 18:06:13 +0100 Subject: [PATCH] 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 --- packages/coding-agent/CHANGELOG.md | 1 + packages/coding-agent/src/core/skills.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 00fc9894d..28939a916 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -14,6 +14,7 @@ - Fixed `pi update` not updating npm/git packages when called without arguments ([#1151](https://github.com/badlogic/pi-mono/issues/1151)) - Fixed `models.json` validation requiring fields documented as optional. Model definitions now only require `id`; all other fields (`name`, `reasoning`, `input`, `cost`, `contextWindow`, `maxTokens`) have sensible defaults. ([#1146](https://github.com/badlogic/pi-mono/issues/1146)) +- Fixed models resolving relative paths in skill files from cwd instead of skill directory by adding explicit guidance to skills preamble ([#1136](https://github.com/badlogic/pi-mono/issues/1136)) ## [0.50.9] - 2026-02-01 diff --git a/packages/coding-agent/src/core/skills.ts b/packages/coding-agent/src/core/skills.ts index f0dc8d451..1e9747a0e 100644 --- a/packages/coding-agent/src/core/skills.ts +++ b/packages/coding-agent/src/core/skills.ts @@ -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).", "", "", ];