Sync all Claude Code configuration files and skills to the GitHub repository.
Syncs Claude Code configuration files and skills to GitHub repository.
/plugin marketplace add rafaelkamimura/claude-tools/plugin install rafaelkamimura-claude-tools@rafaelkamimura/claude-toolsSync all Claude Code configuration files and skills to the GitHub repository.
Use Bash tool to verify repository exists:
ls -la ~/github/claude-configIf directory doesn't exist: Output: "Error: Repository not found at ~/github/claude-config. Please clone the repository first." Exit command.
Use Bash tool to copy global instructions:
cp ~/.claude/CLAUDE.md ~/github/claude-config/Use Bash tool to copy settings:
cp ~/.claude/settings.json ~/github/claude-config/Use Bash tool to copy editor configuration:
cp ~/.claude.json ~/github/claude-config/ 2>/dev/null || echo "No .claude.json found"Use Bash tool to copy all slash commands:
cp -r ~/.claude/commands ~/github/claude-config/Use Bash tool to copy all subagents:
cp -r ~/.claude/agents ~/github/claude-config/ 2>/dev/null || echo "No agents directory found"Use Bash tool to check if skills directory exists:
test -d ~/.claude/skills && echo "exists" || echo "not-found"If result is "exists":
Use Bash tool to copy all global skills:
cp -r ~/.claude/skills ~/github/claude-config/Output: "✓ Copied global skills from ~/.claude/skills/"
If result is "not-found": Output: "ℹ No global skills directory found, skipping skills sync"
Use Bash tool to check git status:
cd ~/github/claude-config && git status --porcelainStore output as GIT_STATUS.
If GIT_STATUS is empty:
Output: "No changes to commit. Configuration is already up to date."
Exit command.
Output the git status to show what changed: Use Bash tool:
cd ~/github/claude-config && git statusUse Bash tool to stage all changes:
cd ~/github/claude-config && git add .Analyze GIT_STATUS to determine what changed:
Check for patterns:
Construct commit message based on changes found.
Examples:
IMPORTANT: NEVER mention "Claude", "AI", "Generated", or "Co-Authored" in commit messages.
Use Bash tool to create commit:
cd ~/github/claude-config && git commit -m "[generated commit message]"Store commit hash from output.
Use Bash tool to push changes:
cd ~/github/claude-config && git pushUse Bash tool to verify last commit:
cd ~/github/claude-config && git log --oneline -1Count files changed: Use Bash tool:
cd ~/github/claude-config && git diff --stat HEAD~1 | tail -1Output summary:
## Sync Complete
**Files synced**:
- Global instructions (CLAUDE.md)
- Settings (settings.json)
- Slash commands (commands/)
[- Subagents (agents/) - if exists]
[- Global skills (skills/) - if exists]
[- Editor config (.claude.json) - if exists]
**Changes**:
[Show git diff statistics]
**Commit**: [commit hash]
**Pushed to**: github.com/nagawa/claude-config
✓ Configuration successfully synced to GitHub!