- Home
- Skills
- Kriscard
- Kriscard Claude Plugins
- Dotfiles Best Practices
dotfiles-best-practices_skill
- Shell
1
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill kriscard/kriscard-claude-plugins --skill dotfiles-best-practices- SKILL.md11.7 KB
Overview
This skill is a concise reference for modern dotfiles configuration, organization, and hardening. It collects practical patterns for CLI replacements, shell startup performance, modular config layout, credential safety, and theme consistency. Use it to standardize dotfiles across machines and speed up shell workflows.
How this skill works
The skill describes recommended modern tools (eza, bat, fd, ripgrep, zoxide, starship, delta, lazygit) and concrete aliases or init snippets to adopt them. It outlines performance strategies: lazy loading, selective completion loading, plugin audits, PATH hygiene, and profiling commands. It also presents a modular config layout, Git multi-config patterns, security rules for secrets, and consistent theming practices.
When to use it
- Setting up a new machine and choosing modern CLI defaults
- Reducing shell startup time or diagnosing slow shell startup
- Organizing dotfiles into reusable, version-controlled modules
- Securing credentials and preventing secrets from leaking into Git or history
- Standardizing themes across terminal, editor, and tools
Best practices
- Prefer fast modern replacements (eza, bat, fd, rg, zoxide) and alias only after checking tool existence
- Lazy-load heavy version managers and completions; target shell startup <500ms
- Organize config into numbered modules (00-env..99-local) so load order is explicit and modules can be disabled
- Never commit secrets; use .env + .env.example and set sensitive files to chmod 600
- Audit plugins quarterly and prefer native functions over bulky plugin stacks
- Use includeIf in .gitconfig to separate work/personal identities and enable commit signing
Example use cases
- Bootstrap dotfiles on a fresh laptop: install modern tools, load ZSH modules, import theme variable and Git identity includes
- Diagnose slow zsh startup: run time zsh -i -c exit, enable zprof temporarily, then convert eager loads to lazy loaders
- Migrate legacy aliases: replace ls/cat/find/grep with eza/bat/fd/rg behind safe existence checks and aliases
- Harden dotfiles repo: add .gitignore for .env and local overrides, move secrets to untracked .env and set strict permissions
- Enforce consistent theme: export THEME_FLAVOUR and reference it from bat, starship, delta, tmux, and Neovim
FAQ
Check with command -v before aliasing, e.g. if [[ -x "$(command -v eza)" ]]; then alias ls='eza --icons --group-directories-first'; fi
What’s the simplest lazy-loading pattern for NVM?
Define a small wrapper that unfunctions itself, sources nvm on first call, then re-invokes the command; the skill includes a ready lazy_load example
Which files should never be committed to dotfiles repo?
Secrets (.env, *_token, *_key), 99-local.zsh, machine-specific paths, and cache files like .zcompdump* should be excluded
How do I switch Git identity per-project?
Use includeIf gitdir rules in your main .gitconfig to point to .gitconfig-personal and .gitconfig-work based on repository paths