depends on chezmoi
- install chezmoi
sh -c "$(curl -fsLS get.chezmoi.io)" -- -b $HOME/.local/binwinget install twpayne.chezmoi
- if you are in PowerShell,
Set-ExecutionPolicy -ExecutionPolicy ByPass -Scope Process chezmoi init --apply berlysia
~/.local/binwill be added to$PATH~/.local/.binwill be added to$PATH, and overwrite this directory with symlink
-
homebrew (only mac)
-
direnv
-
fzf
-
ripgrep
-
bat
-
WSL2 ssh-agent (only WSL)
-
my custom zsh prompt
This dotfiles project includes tools for analyzing Claude Code hook decision logs:
Automated permission pattern analysis and management tool:
# Interactive review of all patterns
bun dot_claude/scripts/update-auto-approve.ts
# Preview changes without applying
bun dot_claude/scripts/update-auto-approve.ts --dry-run
# Analyze last 7 days only
bun dot_claude/scripts/update-auto-approve.ts --since 7d
# Auto-approve safe patterns without interaction
bun dot_claude/scripts/update-auto-approve.ts --auto-approve-safe
# Show detailed analysis information
bun dot_claude/scripts/update-auto-approve.ts --verboseFeatures:
- Analyzes
~/.claude/logs/decisions.jsonlfor permission patterns - Provides risk scoring and confidence levels
- Interactive review interface for pattern approval
- Automatic backup of permission files
- Supports time-based filtering of logs
This repository includes comprehensive Claude Code configuration with:
- 7 custom skills (semantic-commit, react-hooks, codex-review, logic-validation, etc.)
- Global development guidelines (CLAUDE.md)
- Development rules (debugging, external-review, TypeScript standards)
~/.claude/settings.json is managed by splitting it into multiple files:
.settings.base.json: Core settings (model, language, statusLine, alwaysThinkingEnabled, etc.).settings.permissions.json: Permission settings (allow/deny).settings.hooks.json.tmpl: Hooks configuration (dynamically generated with chezmoi variables).settings.plugins.json: Plugin configuration (enabledPlugins)
These files are automatically merged by run_onchange_update-settings-json.sh.tmpl during chezmoi apply.
Important notes:
- To modify hooks configuration, edit
.settings.hooks.json.tmpland runchezmoi apply - Existing
enabledPluginssettings are preserved (user manual changes are not overwritten)
~/.claude.json (MCP servers configuration) is automatically managed by run_onchange_update-claude-json.sh.tmpl:
How it works:
- Reads MCP server versions from
package.jsondependencies - Merges template content with existing
~/.claude.json - Auto-updates
mcpServers,preferredNotifChannel, anddefaultMode - Creates backup before changes and shows diff
Managed MCP servers:
@mizchi/readability- Web page content extractionchrome-devtools-mcp- Chrome DevTools automation@playwright/mcp- Browser automation@upstash/context7-mcp- Documentation search@openai/codex- Code review and analysis
To update versions: Edit package.json dependencies and run chezmoi apply
This project uses a two-layer approach for managing Claude Code skills:
- Stored in
${projectRoot}/.skills/for unified management - Synced to both
~/.claude/skills/and~/.codex/skills/viarun_after_sync-skills.sh.tmpl - Used by both Claude Code and Codex
- Always preserved during updates
- Declaratively managed in YAML configuration
- Installed via
add-skillfrom GitHub repositories - Tracked in
.claude/.external-skills-installed - Auto-removed when deleted from YAML (handcrafted skills are protected)
Both layers coexist in ~/.claude/skills/ directory.
Plugins are managed declaratively through .settings.plugins.json:
After chezmoi apply:
show-missing-plugins.shdetects missing plugins- Displays marketplace registration commands (if needed)
- Shows plugin installation commands to run in Claude Code IDE
Syncing plugin changes back to dotfiles:
~/.claude/scripts/sync-enabled-plugins.shThis exports current enabledPlugins from ~/.claude/settings.json to dotfiles for version control.
To use these skills in another project:
cd /path/to/your/project
curl -fsSL https://raw.githubusercontent.com/berlysia/dotfiles/master/scripts/setup-claude-skills-for-web.sh | bashThis creates a simple .claude/settings.json with inline SessionStart command - no hook files needed!
Skills are installed to ~/.claude/ and auto-update on Claude Code startup.
See docs/external-usage.md for detailed documentation.
- setup-claude-skills-for-web: Setup skills in other projects with one command
- semantic-commit: Semantic commit message generation with change analysis
- react-hooks: React hooks best practices and optimization guidance
- codex-review-cli: Quick code review via Codex CLI (read-only)
- codex-review-mcp: Conversational code review via Codex MCP
- logic-validation: Validate logical consistency of decisions
- optimizing-claude-md: Analyze and improve CLAUDE.md files
- skill-builder: Guided skill creation following best practices