You are setting up Claude Code globally on this machine. This captures best practices from agentic coding workflows.
First, check what's already configured:
ls ~/.claude/commands/ 2>/dev/null
ls ~/.claude/agents/ 2>/dev/null
cat ~/.claude/settings.json 2>/dev/nullIf things are already set up, ask the user:
- "I see you already have [X] configured. Would you like me to add missing pieces, replace everything, or skip setup?"
Ask the user:
Option A: Instant Setup (Recommended)
- Installs everything with best-practice defaults
- Skips multi-model features that require external CLI auth (Gemini, Codex)
- Gets you productive immediately
Option B: Custom Setup
- Interview for each feature
- Configure multi-model ensembling if you have Gemini/Codex CLIs
- More control over what gets installed
Skip this step for Instant Setup.
- Atomic commits (
/commit-smart) - For multi-agent workflows where you only commit your changes. Want this? - Context transfer (
/transfer-context) - Prepare context for new chat when degraded. Want this? - Debugging (
/debug) - Systematic debugging when stuck. Want this?
- Do you want multi-model ensembling capabilities? (get opinions from Claude, Gemini, Codex)
- If yes: Do you have Gemini CLI installed? (
which gemini) - If yes: Do you have Codex CLI installed? (
which codex) - Commands created based on what's available
- If yes: Do you have Gemini CLI installed? (
- code-simplifier - Simplifies complex code at end of sessions. Want this?
- frontend-design - Helps with design decisions and component structure. Want this?
Update ~/.claude/settings.json with safe defaults. These apply globally to all projects.
{
"permissions": {
"ask": [
"Bash(rm -rf:*)",
"Bash(rm -fr:*)",
"Bash(sudo:*)",
"Bash(chmod 777:*)",
"Bash(git push --force:*)",
"Bash(git push -f:*)",
"Bash(git reset --hard:*)",
"Bash(git clean -fd:*)",
"Bash(npm publish:*)",
"Bash(eval:*)",
"Read(.env)",
"Read(.env.*)",
"Read(**/.env)",
"Read(**/.env.*)",
"Read(~/.ssh/**)",
"Read(~/.aws/**)",
"Read(**/*credential*)",
"Read(**/*secret*)",
"Read(**/*.pem)",
"Read(**/*.key)"
]
}
}This makes Claude ask before:
- Destructive operations (rm -rf, git reset --hard, git push --force)
- Publishing packages
- Reading sensitive files (.env, credentials, keys)
Merge with existing settings—don't overwrite other config.
Instant path: Install both Custom path: Only install what user confirmed
# Code simplifier - cleans up complex code
claude plugins install code-simplifier
# Frontend design - helps with design decisions
claude plugins install frontend-designCreate files in ~/.claude/commands/. Fetch content from gists:
| Command | Gist |
|---|---|
commit-smart.md |
https://gist.github.com/SilenNaihin/d4b3870178667475b08e1f48d6cdbc30 |
transfer-context.md |
https://gist.github.com/SilenNaihin/e4be0e8750343d9cbafdaab88366115c |
debug.md |
https://gist.github.com/SilenNaihin/6833c01f597c82912af5aca4e3467a35 |
refactor.md |
https://gist.github.com/SilenNaihin/cd321a0ada16963867ad8984f44922cf |
update-claudemd.md |
https://gist.github.com/SilenNaihin/916e4f2cbcd96f487b2845edaed469a3 |
setup-repo.md |
https://gist.github.com/SilenNaihin/e402188c89aab94de61df3da1c10d6ca |
| Command | Gist | Requires |
|---|---|---|
ensemble-opinion.md |
https://gist.github.com/SilenNaihin/3e9b43522b61e155bd256fe7193493cd | Gemini or Codex |
codex-delegate.md |
https://gist.github.com/SilenNaihin/ff19b2d65d17137b0ee1f609f25205c5 | Codex CLI |
gemini-delegate.md |
https://gist.github.com/SilenNaihin/0c27ee7816da489c4ce110bf115f5ab6 | Gemini CLI |
Fetch each gist and write to ~/.claude/commands/[name].md.
If multi-model ensembling requested (Custom path only), create ~/.claude/agents/claude_critic.md:
---
name: claude_critic
description: "Provides critical analysis - identifies risks, blind spots, and alternative approaches without bias"
---
You are Claude Critic, one voice in an ensemble of AI models analyzing a problem.
Your role is to provide independent critical analysis. Be objective and evidence-based.
## Guidelines
- Present facts and observations, not opinions dressed as facts
- Identify what you know vs what you're assuming
- Be contrarian when useful - challenge assumptions
- Focus on failure modes and edge cases others might miss
- No cheerleading or validation - be honest about weaknesses
## Output Format
### Observations
- [Factual observations about the problem/approach]
### Risks & Failure Modes
- [What could go wrong, with reasoning]
### Blind Spots
- [What the user might be missing]
### Alternative Approaches
- [Other ways to solve this, with tradeoffs]
### Assessment
[Honest 2-3 sentence assessment - what's the real situation here?]Run checks:
ls ~/.claude/commands/
ls ~/.claude/agents/
cat ~/.claude/settings.jsonConfirm everything was created.
Instant path report:
✓ Global permissions configured (asks before destructive ops)
✓ Plugins installed: code-simplifier, frontend-design
✓ Commands installed: /commit-smart, /transfer-context, /debug, /refactor, /update-claudemd, /setup-repo
Next: Run /setup-repo in any project to configure repo-specific settings.
Custom path report:
Installed:
- Permissions: [configured/skipped]
- Plugins: [list what was installed]
- Commands: [list what was created]
- Agents: [list if created]
How to use:
- /commit-smart - atomic commits for multi-agent work
- /transfer-context - when context degrades
- /debug - systematic debugging when stuck
- /refactor - code quality cleanup with jscpd, knip, code-simplifier
- /update-claudemd - update CLAUDE.md with recent learnings
- /ensemble-opinion - multi-model perspectives (if installed)
- /setup-repo - set up a new project with best practices
Next: Run /setup-repo in any project to configure repo-specific settings.