Fix: Ensure commands and skills directories exist during install#17
Merged
brobertsaz merged 1 commit intobrobertsaz:mainfrom Dec 3, 2025
Merged
Conversation
Previously, if ~/.claude already existed from a prior Claude Code installation, the install script would skip creating the commands/ and skills/ subdirectories. This caused symlink creation to fail silently, leaving users without access to /claude-os-init and other commands. This fix ensures the subdirectories are always created, regardless of whether ~/.claude already exists. Fixes issue where /claude-os-init command was not available after running install.sh on systems with existing ~/.claude directory.
brobertsaz
approved these changes
Dec 3, 2025
Owner
|
Thank you @williamclavier :) |
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.
Problem
When users have an existing
~/.claude/directory from a prior Claude Code installation, theinstall.shscript skips creating thecommands/andskills/subdirectories. This causes the symlink creation to fail silently, leaving users without access to/claude-os-initand other commands.Root Cause
The installation script only creates the subdirectories if
~/.claude/doesn't exist:If the directory already exists, it skips creating the subdirectories, leading to:
Solution
This PR adds two lines after the conditional to ensure the subdirectories are always created:
Testing
Tested the fix by:
~/.claude/commandsand~/.claude/skillsinstall.shscript/claude-os-initis now available in Claude CodeImpact
This is a minimal, safe change that:
~/.claude/directoriesmkdir -pwhich is idempotent and safe to run multiple timesFixes issue reported by users where
/claude-os-initcommand was not available after installation.