Skip to content

feat(common): surface skill file path in useSkill tool result - #1776

Open
wsxiaoys wants to merge 1 commit into
mainfrom
feat/surface-skill-path-in-use-skill
Open

feat(common): surface skill file path in useSkill tool result#1776
wsxiaoys wants to merge 1 commit into
mainfrom
feat/surface-skill-path-in-use-skill

Conversation

@wsxiaoys

@wsxiaoys wsxiaoys commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Surfaces the skill's file path in the useSkill tool result prompt text.
  • Encourages the agent/model to resolve relative resource paths (such as scripts/, references/, assets/) relative to the skill's directory.
  • Adds comprehensive test coverage for createUseSkillResult to verify path inclusion and correct fallback behavior.

Test plan

  • Run unit tests: bun run test -- src/base/prompts/__tests__/skill.test.ts (verified passing).
  • Run typechecking and lint checks.

Context / Background

Here is the error/issue showing why this is needed (before this change, the agent tried to read pochi://skills/developer-updates/references/FORMAT.md but didn't have the resolved path context):

Pasted screenshot of the error

🤖 Generated with Pochi | Task

Allows the agent to resolve sibling resource files relative to the skill directory.

🤖 Generated with [Pochi](https://getpochi.com) | [Task](https://app.getpochi.com/share/p-a54b33c248d440c6bb95d72fc689a7ac)

Co-Authored-By: Pochi <noreply@getpochi.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27.94%. Comparing base (056f686) to head (53a3b7d).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1776   +/-   ##
=======================================
  Coverage   27.93%   27.94%           
=======================================
  Files         753      753           
  Lines       76588    76598   +10     
  Branches     3076     3080    +4     
=======================================
+ Hits        21393    21402    +9     
- Misses      54923    54924    +1     
  Partials      272      272           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants