From skillry-skill-library-and-installation
Use when you need to detect misplaced AI agent system files, repair canonical placement, and leave thin pointers.
How this skill is triggered — by the user, by Claude, or both
Slash command
/skillry-skill-library-and-installation:75-path-hygiene-repairThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Detect files belonging to the Claude AI agent system that are in the wrong location, fix their placement to the canonical path, and optionally leave a thin pointer (symlink or redirect note) at the old location. Specifically handles username path mismatches (e.g., `/Users/` vs `$HOME`), SSD vs. local drive placement confusion, project-scoped vs. global-scoped placement errors, and accidental ne...
Detect files belonging to the Claude AI agent system that are in the wrong location, fix their placement to the canonical path, and optionally leave a thin pointer (symlink or redirect note) at the old location. Specifically handles username path mismatches (e.g., /Users/ vs $HOME), SSD vs. local drive placement confusion, project-scoped vs. global-scoped placement errors, and accidental nesting.
~/.claude/claude-system.toml contains paths referencing an old username or home directory./Volumes/...) but the system expects them under $HOME/.SKILL.md was placed at ~/.claude/SKILL.md (root level) instead of ~/.claude/skills/skill-name/SKILL.md.~/project/.claude/skills/) and should be at ~/.claude/skills/.global-installation-audit to diagnose.~/.claude/ installation) — fix it directly in the project.~/.claude/ files, not bulk data migrations.The canonical installation for user -m1 on macOS:
Home: $HOME/
Claude: $HOME/.claude/
Skills: $HOME/.claude/skills/<skill-name>/SKILL.md
Agents: $HOME/.claude/agents/<agent-name>/AGENT.md
Config: $HOME/.claude/claude-system.toml
System: $HOME/.claude/CLAUDE.md
Tools: $HOME/.claude/tools/
Backups: $HOME/.claude/backups/
Non-canonical paths to detect:
/Users// (missing -m1 suffix)/Volumes/*$HOME/ (SSD path, not local)~/Documents/.claude/ or any non-home location.claude/ at project root intended as global# 1. Find any .claude directories not under ~/.claude
find $HOME -name ".claude" -type d \
! -path "$HOME/.claude" \
! -path "*/node_modules/*" 2>/dev/null
# 2. Find SKILL.md files not under ~/.claude/skills/
find $HOME -name "SKILL.md" \
! -path "$HOME/.claude/skills/*" 2>/dev/null
# 3. Find AGENT.md files not under ~/.claude/agents/
find $HOME -name "AGENT.md" \
! -path "$HOME/.claude/agents/*" 2>/dev/null
# 4. Check for SSD-based files
find /Volumes -name "SKILL.md" -o -name "AGENT.md" -o -name "CLAUDE.md" \
2>/dev/null | head -20
# 5. Check for old username in config files
grep -rn "[^-]" ~/.claude/ 2>/dev/null | grep -v ".bak"
grep -rn "/Volumes/" ~/.claude/ 2>/dev/null
ls -la $HOME/.claude/
touch $HOME/.claude/.write-test && \
rm $HOME/.claude/.write-test && \
echo "Writable" || echo "NOT WRITABLE"
BACKUP_TS=$(date +%Y%m%d-%H%M%S)
BACKUP_DIR="$HOME/.claude/backups/pre-repair-$BACKUP_TS"
mkdir -p "$BACKUP_DIR"
# Only back up files being moved, not the entire ~/.claude
cp -r [affected-file-or-dir] "$BACKUP_DIR/"
echo "Backed up to $BACKUP_DIR"
Pattern A — Move misplaced skill to canonical location:
# Create canonical slot
mkdir -p ~/.claude/skills/<skill-name>
# Move
mv /path/to/wrong/location/SKILL.md ~/.claude/skills/<skill-name>/SKILL.md
# Verify
ls -la ~/.claude/skills/<skill-name>/SKILL.md
Pattern B — Fix username in config file:
# Preview what will change
grep -n "[^-]" ~/.claude/claude-system.toml
# Apply with sed (macOS syntax)
sed -i '' 's|/Users//|$HOME/|g' ~/.claude/claude-system.toml
# Verify
grep "Users/" ~/.claude/claude-system.toml
Pattern C — Fix SSD path to local path:
# Identify SSD path prefix
VOLUME_PATH=$(ls /Volumes/ | grep -i macintosh 2>/dev/null || echo "IDENTIFY MANUALLY")
# Replace in config
sed -i '' "s|/Volumes/$VOLUME_PATH$HOME|$HOME|g" \
~/.claude/claude-system.toml
Pattern D — Leave a thin pointer at old location:
# Symlink (preferred — transparent to file reads)
ln -s $HOME/.claude/skills/<skill-name>/SKILL.md \
/path/to/old/location/SKILL.md
# OR: Leave a redirect note (if symlink is not appropriate)
echo "This file has moved to: ~/.claude/skills/<skill-name>/SKILL.md" > \
/path/to/old/location/SKILL.md.moved
# Re-run the audit commands from global-installation-audit Phase 1–3
ls ~/.claude/skills/ | wc -l
ls ~/.claude/agents/ | wc -l
cat ~/.claude/claude-system.toml
# Confirm no remaining stale paths
grep -rn "[^-]" ~/.claude/ 2>/dev/null | grep -v ".bak" | grep -v backups/
grep -rn "/Volumes/" ~/.claude/ 2>/dev/null | grep -v backups/
-m1)find (not assumed)claude-system.toml or other config files-m1: These are different home directories. /Users/ may not exist or may belong to a different account. Never assume they are equivalent..claude/ confused for global ~/.claude/: A project-scoped .claude/skills/ is intentional and correct for that project. Do not move project skills to global unless the user confirms intent.sed -i across all of ~/.claude/ can corrupt files that were correct.## Path Hygiene Repair Report
Date: [date]
User home: $HOME/
Canonical Claude root: $HOME/.claude/
### Detection findings
#### Misplaced SKILL.md files
| Found path | Canonical path | Action |
|---|---|---|
| [path] | [canonical] | [move / already correct] |
#### Misplaced AGENT.md files
[same format]
#### Stale username references in config
| File | Line | Stale value | Correct value |
|---|---|---|---|
| [file] | [N] | /Users// | $HOME/ |
#### SSD / volume path references
| File | Line | Value | Action |
|---|---|---|---|
### Backup created
[backup path and contents]
### Repairs applied
1. [Action] [from-path] → [to-path] — [DONE / SKIPPED (reason)]
### Pointers left
| Old path | Points to |
|---|---|
| [old] | [canonical] |
### Post-repair verification
- Skills found at canonical path: [N]
- Agents found at canonical path: [N]
- Stale paths remaining: [none / list]
### Status
[CLEAN / ISSUES REMAIN] — [summary]
~/.claude/ and its subdirectories.sed -i to config files that affect all agents and skills.npx claudepluginhub fluxonlab/skillry --plugin skillry-skill-library-and-installationCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.