Skip to content

Conversation

@chmod777john
Copy link

Summary

  • Inject the absolute path of the skill root directory into the prompt when loading a skill
  • Allows AI to always know the base location of skill files
  • Helps debug path issues even when skill authors mix absolute/relative paths
  • Enables use of find/glob tools to locate files dynamically

Background

The previous approach of only converting specific directory patterns (scripts/, references/, etc.) was too limited:

  • It didn't account for the variety of ways skill authors might structure their content
  • Skill authors may use non-standard directory names
  • Absolute/relative path confusion could still break skill loading

By injecting the skill root directory path directly into the prompt, AI agents can:

  1. Always know where the skill files are located
  2. Debug path issues independently
  3. Use tools like find or glob to locate files dynamically

Test plan

  • All existing tests pass
  • Added new test test_skill_to_prompt_includes_root_directory

Inject the absolute path of the skill root directory into the prompt
when loading a skill. This allows AI to:

1. Always know the base location of skill files
2. Debug path issues even when skill authors mix absolute/relative paths
3. Use find/glob tools to locate files dynamically

The previous approach of only converting specific directory patterns
(scripts/, references/, etc.) was too limited and didn't account for
the variety of ways skill authors might structure their content.

Related: Improve skill path resolution
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