Skip to content

fix: rewrite skill paths on install so /pixelslop works in any project#19

Merged
gabelul merged 1 commit into
mainfrom
fix/skill-path-rewrite
Jun 10, 2026
Merged

fix: rewrite skill paths on install so /pixelslop works in any project#19
gabelul merged 1 commit into
mainfrom
fix/skill-path-rewrite

Conversation

@gabelul

@gabelul gabelul commented Jun 10, 2026

Copy link
Copy Markdown
Owner

The bug (real, user-hit)

Running /pixelslop in 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.cjs paths in the agent specs (absolute, install-root paths) but copies the skill tree verbatim. So the installed SKILL.md (39 refs) and checkpoint-protocol.md kept relative bin/pixelslop-tools.cjs paths. Relative paths only resolve when cwd is the repo checkout — so /pixelslop broke everywhere else, which defeats a global install.

The fix

rewriteSkillTreePaths walks the installed skill tree and rewrites every .md the 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.js covers 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.4 patch so npx pixelslop@latest update fixes existing installs (replacing the manual hotfix applied to the reporter's install).

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.
@gabelul gabelul merged commit 59394da into main Jun 10, 2026
3 checks passed
@gabelul gabelul deleted the fix/skill-path-rewrite branch June 10, 2026 13:44
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