fix(installer): install Claude skills as <name>/SKILL.md so /god-* appear in the picker - #90
Open
ikkeflikkeri wants to merge 1 commit into
Open
fix(installer): install Claude skills as <name>/SKILL.md so /god-* appear in the picker#90ikkeflikkeri wants to merge 1 commit into
ikkeflikkeri wants to merge 1 commit into
Conversation
…pear in the picker After `npx godpowers --claude --global` the installer wrote each skill as a flat `~/.claude/skills/<name>.md` file, but Claude Code expects Agent Skills to live as directories at `~/.claude/skills/<name>/SKILL.md` (Anthropic Agent Skills spec). The picker never saw them. Extend `installSkillFile` to use the directory layout for Claude Code alongside the existing Codex branch, and update the install success label so it reports `Claude Code skill directories` instead of the misleading `skills/`. Update `scripts/test-install-smoke.js` Claude assertions that were encoding the broken flat-file layout as the expected behavior. Pruned on upgrade: `pruneGodpowersSkills` already removes stale `god-*.md` flat files, so users re-running the installer get the corrected layout automatically.
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.
Bug
After
npx godpowers --claude --globalthe installer reportsInstalled 15 slash commands to skills/but none of the/god-*slash commands appear in Claude Code's picker. The skill files are on disk but Claude doesn't see them.Root cause
Claude Code expects Agent Skills at
~/.claude/skills/<name>/SKILL.md— a directory per skill with aSKILL.mdat its root (the Anthropic Agent Skills spec). The installer was writing each skill as a flat~/.claude/skills/<name>.mdfile, which the picker never picked up.The Codex branch already used the directory layout, which is why Codex continued to work.
Fix
Extend the existing
installSkillFileCodex branch to also includeclaudein the directory-layout case. Mirrors the working Codex behavior and uses the same prune/uninstall logic that already understands both flat and directory forms.Also update the success label so Claude reports
Claude Code skill directoriesinstead of the misleadingskills/.scripts/test-install-smoke.jshad five Claude assertions that were encoding the broken flat-file layout as the expected behavior — those are updated to match the corrected directory layout.Upgrade path
pruneGodpowersSkillsalready removes stalegod-*.mdflat files, so users re-running the installer against a fresh install get the corrected layout automatically. Verified end-to-end with a fake stale file in a throwaway HOME.Diff
Two files, +18 / -12. No refactors, no new config fields, no new test files.
Verification
npm run validate-skills→ 496/496 passnpm run test:prepublication→ 12/12 passnode bin/install.js --claude --globalagainst a freshUSERPROFILE→ 15 skill directories withSKILL.mdinside each, label correctly readsClaude Code skill directoriesgod-stale-flat.mdremoves it and writes the new directory layout; unrelated files in~/.claude/skills/are preserved/god,/god-init,/god-plan,/god-build,/god-mode,/god-fix,/god-ship,/god-sync,/god-undo,/god-first-run,/god-demo,/god-help,/god-surface,/god-status, and/god-versionall become visible in Claude Code's pickerReferences