fix: use portable skill directory path in SKILL.md#165
Open
guazi04 wants to merge 1 commit intonextlevelbuilder:mainfrom
Open
fix: use portable skill directory path in SKILL.md#165guazi04 wants to merge 1 commit intonextlevelbuilder:mainfrom
guazi04 wants to merge 1 commit intonextlevelbuilder:mainfrom
Conversation
Replace hardcoded 'skills/ui-ux-pro-max/scripts/search.py' paths with '<skill_dir>/scripts/search.py' placeholder in SKILL.md and its template sources. Add a 'Skill Location' section that instructs the AI agent to detect the skill's installation directory before running scripts. This fixes script-not-found errors when the skill is installed in user-level directories (e.g. ~/.claude/skills/ or ~/.agents/skills/) rather than the project's skills/ subdirectory. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace hardcoded
skills/ui-ux-pro-max/scripts/search.pypaths with a portable<skill_dir>/scripts/search.pyplaceholder across SKILL.md and its template sources.Problem
All
python3commands in SKILL.md use a hardcoded relative path:python3 skills/ui-ux-pro-max/scripts/search.py "query" --design-systemThis assumes the skill is installed in the project's
skills/subdirectory. When installed elsewhere (common with user-level installations), the AI agent gets "file not found" errors:skills/ui-ux-pro-max/(project).claude/skills/ui-ux-pro-max/(Claude Code project)~/.claude/skills/ui-ux-pro-max/(Claude Code user)~/.agents/skills/ui-ux-pro-max/(OpenCode).shared/ui-ux-pro-max/(Cursor/Windsurf)Note: The Python scripts themselves are fine —
core.pyusesPath(__file__).parent.parent / "data"for data resolution. The problem is only in the SKILL.md instructions that tell the AI how to invoke the scripts.Fix
Added a "Skill Location" section before Prerequisites that:
findcommand to auto-detect the skill directory<skill_dir>is used as a placeholder throughoutReplaced all 12 hardcoded paths with
<skill_dir>/scripts/search.pyUpdated all three copies of the content:
.claude/skills/ui-ux-pro-max/SKILL.md(generated file)src/ui-ux-pro-max/templates/base/skill-content.md(source of truth)cli/assets/templates/base/skill-content.md(CLI bundled copy)Scope