Skip to content

fix(skills): resolve {baseDir} placeholder in DB-backed skill content#1145

Open
codebit0 wants to merge 1 commit into
nextlevelbuilder:devfrom
codebit0:fix/skills-basedir-placeholder
Open

fix(skills): resolve {baseDir} placeholder in DB-backed skill content#1145
codebit0 wants to merge 1 commit into
nextlevelbuilder:devfrom
codebit0:fix/skills-basedir-placeholder

Conversation

@codebit0
Copy link
Copy Markdown
Contributor

Summary

Both PG and SQLite skill stores returned SKILL.md content without the {baseDir} substitution that skills.Loader.LoadSkill performs for file-based access. Agents reading SKILL.md via this RPC saw the literal placeholder, breaking script-invocation lines that expect absolute paths.

Mirror the loader's substitution in both store implementations so behavior is consistent regardless of access path.

Test plan

  • Read a SKILL.md with {baseDir} placeholder via the DB store (skills.GetContent or RPC) and verify the placeholder is resolved to the absolute path
  • Verify the same content read via file-based loader (existing path) is unchanged
  • Sanity: agent uses a skill with script-invocation lines and the script runs from the correct directory

Both PG and SQLite skill stores returned SKILL.md content without the
{baseDir} substitution that skills.Loader.LoadSkill performs for
file-based access. Agents reading SKILL.md via this RPC saw the literal
placeholder, breaking script-invocation lines that expect absolute paths.

Mirror the loader's substitution in both store implementations so
behavior is consistent regardless of access path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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