From dotfiles-optimizer
Analyzes and optimizes dotfiles for zsh, tmux, git, nvim configs; audits security issues, identifies performance bottlenecks, recommends modern CLI tool replacements.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dotfiles-optimizer:dotfiles-optimizerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Coordinate comprehensive analysis and optimization of dotfiles with intelligent, context-aware recommendations. Reads the dotfiles path from `.claude/dotfiles-optimizer.local.md` (defaults to `~/.dotfiles`).
Coordinate comprehensive analysis and optimization of dotfiles with intelligent, context-aware recommendations. Reads the dotfiles path from .claude/dotfiles-optimizer.local.md (defaults to ~/.dotfiles).
When invoked via /optimize, the following arguments are supported:
Component Scope (optional, positional):
zsh - Shell configuration onlytmux - Tmux configuration onlynvim - Neovim configuration onlygit - Git configuration onlyterminal - Terminal configs (Kitty/Ghostty) onlyall or omitted - Entire dotfiles structureFlags (optional):
--apply - Automatically apply critical and recommended fixes without confirmation--security - Focus analysis on security issues only--performance - Focus analysis on performance optimization only--modern-tools - Focus on modern tool recommendations onlyExamples: /optimize, /optimize zsh, /optimize --security, /optimize zsh --apply, /optimize --performance
Activate this skill when users request:
Infer scope from context: if user is editing a specific config file, focus there. If they request a specific component, scope to it. Otherwise analyze everything. Load dotfiles path from .claude/dotfiles-optimizer.local.md (default: /Users/kriscard/.dotfiles). Check for dotfiles_path override and enable_proactive_warnings setting.
Call dotfiles-analyzer agent with the determined scope for deep analysis (2-3 min). The agent parses configs, checks security issues, identifies performance bottlenecks, suggests modern CLI alternatives, and validates patterns against best practices.
Consult dotfiles-best-practices skill for modern CLI tools, shell performance techniques, security patterns, config organization strategies, and git workflow improvements. Use this to enhance the analyzer's findings with context and rationale.
Organize findings into three tiers:
Format output as: ## Analysis Results for [Scope] with each tier listing count and items with location/remediation/rationale.
Present options: all critical (recommended), all improvements, specific items, or none. For --apply flag: auto-apply critical + recommended, skip optional. When applying: use Read/Edit tools, explain each change, validate syntax. Always create timestamped backups before modifying files.
The user's dotfiles CLI (/Users/kriscard/.dotfiles/dotfiles) handles init, sync, backup, and doctor. This plugin provides analysis, security scanning, best practice validation, and modern tool suggestions. Defer to their script for mechanical operations.
dotfiles CLI script -- complement it, don't duplicate its functionality (init, sync, backup)/Users/kriscard/.dotfiles -- check .claude/dotfiles-optimizer.local.md for overrides| File | Contents |
|---|---|
references/component-analysis.md | Per-component analysis details, modern tool table, security and performance checklists |
references/analysis-patterns.md | Credential detection regex, lazy loading templates, tool configs, common issue fixes |
dotfiles-best-practices -- knowledge base for patterns and modern toolsdotfiles-analyzer -- deep file-by-file analysis, activated by this orchestrator/optimize (full workflow), /audit (read-only analysis)User: "Optimize my dotfiles"
1. Scope: Entire dotfiles (no specific context)
2. Invoke dotfiles-analyzer for comprehensive analysis
3. Reference dotfiles-best-practices for context
4. Findings:
Critical (2): API key in zsh.d/00-env.zsh:45, .gitconfig-work perms 644->600
Recommended (5): Lazy load nvm (-300ms), eza alias, modularize .zshrc,
.env.example template, git commit signing
Optional (3): starship prompt, bat Catppuccin theme, tpm for tmux
5. User: "All critical and recommended"
6. Apply each fix with backup, explanation, and syntax validation
7. Verify changes and confirm completion
npx claudepluginhub kriscard/kriscard-claude-plugins --plugin dotfiles-optimizerAudits dotfiles health: shell startup time, zsh plugin weight, stow symlink integrity, Neovim startup, tool inventory, and security. Produces a prioritized cleanup report.
Guides ShellCheck configuration, installation, .shellcheckrc setup, error codes, and integration for static analysis of bash/sh scripts. Use for linting in CI/CD, fixing issues, and ensuring portability.
Configures ShellCheck static analysis for shell script quality, including CI/CD integration, error code understanding, and rule configuration.