Cc-skills hooks

Install/uninstall chezmoi hooks to ~/.claude/settings.json. TRIGGERS - dotfiles hooks, chezmoi hooks, install chezmoi hook, dotfiles sync hook.

install
source · Clone the upstream repo
git clone https://github.com/terrylica/cc-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/terrylica/cc-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/dotfiles-tools/skills/hooks" ~/.claude/skills/terrylica-cc-skills-hooks-756825 && rm -rf "$T"
manifest: plugins/dotfiles-tools/skills/hooks/SKILL.md
source content

Dotfiles Hooks Manager

Manage chezmoi-sync-reminder hook installation in

~/.claude/settings.json
.

Claude Code only loads hooks from settings.json, not from plugin.json files. This command installs/uninstalls the chezmoi PostToolUse hook that reminds you to sync dotfile changes.

Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

Actions

ActionDescription
status
Show current installation state
install
Add chezmoi hook to settings.json
uninstall
Remove chezmoi hook from settings.json
restore
List available backups with numbers
restore latest
Restore most recent backup
restore <n>
Restore backup by number

Execution

Parse

$ARGUMENTS
and run the management script:

/usr/bin/env bash << 'HOOKS_SCRIPT_EOF'
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/cc-skills/plugins/dotfiles-tools}"
ACTION="${ARGUMENTS:-status}"
bash "$PLUGIN_DIR/scripts/manage-hooks.sh" $ACTION
HOOKS_SCRIPT_EOF

Post-Action Reminder

After install/uninstall/restore operations:

IMPORTANT: Restart Claude Code session for changes to take effect.

The hooks are loaded at session start. Modifications to settings.json require a restart.

Examples

# Check current installation status
/dotfiles-tools:hooks status

# Install the chezmoi sync reminder hook
/dotfiles-tools:hooks install

# Uninstall hooks
/dotfiles-tools:hooks uninstall

# List available backups
/dotfiles-tools:hooks restore

# Restore most recent backup
/dotfiles-tools:hooks restore latest

Troubleshooting

IssueCauseSolution
jq not foundjq not installed
brew install jq
Already installedHook already in settingsRun
uninstall
first to reinstall
Hooks not workingSession not restartedRestart Claude Code session
Settings file not found~/.claude/ doesn't existCreate with
mkdir -p ~/.claude
Invalid JSONCorrupted settings.jsonUse
restore latest
to recover from backup

Post-Execution Reflection

After this skill completes, check before closing:

  1. Did the command succeed? — If not, fix the instruction or error table that caused the failure.
  2. Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
  3. Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.

Only update if the issue is real and reproducible — not speculative.