Skip to content

fix: use portable skill directory path in SKILL.md#165

Open
guazi04 wants to merge 1 commit intonextlevelbuilder:mainfrom
guazi04:fix/skill-path-portability
Open

fix: use portable skill directory path in SKILL.md#165
guazi04 wants to merge 1 commit intonextlevelbuilder:mainfrom
guazi04:fix/skill-path-portability

Conversation

@guazi04
Copy link

@guazi04 guazi04 commented Feb 27, 2026

Summary

Replace hardcoded skills/ui-ux-pro-max/scripts/search.py paths with a portable <skill_dir>/scripts/search.py placeholder across SKILL.md and its template sources.

Problem

All python3 commands in SKILL.md use a hardcoded relative path:

python3 skills/ui-ux-pro-max/scripts/search.py "query" --design-system

This 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:

Installation location Works?
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.py uses Path(__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

  1. Added a "Skill Location" section before Prerequisites that:

    • Lists common installation paths across AI tools
    • Provides a find command to auto-detect the skill directory
    • Explains that <skill_dir> is used as a placeholder throughout
  2. Replaced all 12 hardcoded paths with <skill_dir>/scripts/search.py

  3. Updated 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

  • Only documentation/template files modified
  • No Python code changes (scripts already handle paths correctly)
  • No CLI code changes

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>
Copy link
Contributor

@nuts-has-been-taken nuts-has-been-taken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

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