fix: rewrite skill paths on install so /pixelslop works in any project#19
Merged
Conversation
The installer rewrote bin/ paths in agent specs but copied the skill tree verbatim, so SKILL.md and checkpoint-protocol.md kept relative `bin/pixelslop-tools.cjs` references. Those only resolve from the repo checkout, so /pixelslop reported "tools.cjs not installed" in every other project — which is exactly what a global install is for. rewriteSkillTreePaths walks the installed skill and rewrites every .md the same way agents are rewritten, so SKILL.md and the fix guides get absolute paths and the skill runs from anywhere. Includes a regression test plus a guard that the shipped SKILL.md really does ship relative paths, so the test can't pass vacuously. Also filters macOS ._ junk out of the codex-toml spec listing.
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.
The bug (real, user-hit)
Running
/pixelslopin any project that isn't the pixelslop repo reported "tools.cjs not installed" and fell back to docs-only.Root cause: the installer rewrites
bin/pixelslop-tools.cjspaths in the agent specs (absolute, install-root paths) but copies the skill tree verbatim. So the installedSKILL.md(39 refs) andcheckpoint-protocol.mdkept relativebin/pixelslop-tools.cjspaths. Relative paths only resolve when cwd is the repo checkout — so/pixelslopbroke everywhere else, which defeats a global install.The fix
rewriteSkillTreePathswalks the installed skill tree and rewrites every.mdthe same way agent specs are rewritten. SKILL.md and the fix guides now use absolute paths, so the skill runs from any project. One call wired in right after the skill copy.Tests
1051 passing. New
skill-path-rewrite.test.jscovers the rewrite (SKILL.md + nested resources → absolute, non-md files untouched) and asserts the shipped SKILL.md genuinely ships relative paths so the test can't pass vacuously. Verified the rewrite logic directly; the installer wiring is a single call after the existing copy.Ships as a
0.3.4patch sonpx pixelslop@latest updatefixes existing installs (replacing the manual hotfix applied to the reporter's install).