npx claudepluginhub kriscard/kriscard-claude-plugins --plugin dotfiles-optimizerThis skill uses the workspace's default tool permissions.
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`).
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 and uses ShellCheck for static analysis of shell scripts, including linting setup in CI/CD, error code fixes, rule customization, and portability checks.
Sets Claude Code permissions for dev-shell-tools including git, ripgrep, fzf, zoxide, docker, package managers (npm/pnpm/yarn/bun/python/uv), and AI CLIs (gemini/claude). Creates .claude/settings.local.json and rules/cli-tools.md. Triggers on setperms or permission setup queries.
Share bugs, ideas, or general feedback.
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