Expert guide for managing cross-platform dotfiles with chezmoi, mise, and aqua. Handles templating, secret management, and multi-OS workflows.
Expert assistant for managing mimikun's comprehensive cross-platform dotfiles repository. Specializes in chezmoi template management, multi-OS support, secret handling, and automated quality assurance workflows.
This skill provides guidance for working with a sophisticated dotfiles setup that supports Linux, Windows, and macOS environments. The repository uses modern tooling for configuration management, version control, and automated testing.
When exploring this dotfiles repository:
**Key directories:**
**Primary workflows:**
```bash
chezmoi diff
chezmoi apply --verbose
chezmoi status
chezmoi edit <file>
chezmoi cd
chezmoi execute-template < template-file
chezmoi init --apply --verbose https://github.com/mimikun/dotfiles.git
```
**Always run `chezmoi diff` before `chezmoi apply` to review changes.**
Use these patterns for OS detection in chezmoi templates:
```go-template
{{- $isWindows := (eq .chezmoi.os "windows") -}}
{{- $isLinux := (eq .chezmoi.os "linux") -}}
{{- $isMacOS := (eq .chezmoi.os "darwin") -}}
{{- $isWorkLinux := (and (eq .chezmoi.os "linux") (isExecutable "/usr/local/bin/this_is_work_pc")) -}}
{{- $isWorkWindows := (and (eq .chezmoi.os "windows") (isExecutable "C:\\Program Files\\Yt Env Checks\\this_is_work_pc.exe")) -}}
{{- $isWorkPC := (or $isWorkLinux $isWorkWindows) -}}
{{- if $isWindows }}
{{- else if $isLinux }}
{{- else if $isMacOS }}
{{- end }}
```
Handle secrets securely using chezmoi's secret integration:
```go-template
{{- if $isWorkPC }}
{{- if $isWorkLinux }}
{{ (rbwFields "item-name").field_name.value }}
{{- else }}
{{ (bitwardenFields "item" "item-id").field_name.value }}
{{- end }}
{{- else }}
{{- end }}
```
**Never commit secrets directly to the repository.**
Run common tasks using mise:
```bash
mise tasks list
mise tasks run lint
mise tasks run format
mise tasks run clean
mise tasks run update
mise tasks run patch:branch
mise doctor
```
**Lua (Neovim configurations):**
```lua
return {
"plugin/name",
dependencies = {},
opts = {},
config = function(_, opts)
-- Configuration
end,
}
```
**Bash scripts:**
```bash
#!/usr/bin/env bash
set -euo pipefail
{{- if eq .chezmoi.os "windows" }}
{{- else }}
{{- end }}
```
**PowerShell scripts:**
```powershell
#Requires -Version 5.1
[CmdletBinding()]
param()
```
Run quality checks before committing:
```bash
make lint
make format
lefthook run pre-commit
lefthook install
```
**Individual linters:**
```bash
stylua --check .
selene .
npx prettier --check .
npx textlint docs/
npx cspell "**/*.md" "**/*.txt"
pwsh -Command "Invoke-ScriptAnalyzer -Path . -Recurse"
```
1. Create a patch branch: `make patch-branch`
2. Edit template files: `chezmoi edit <file>`
3. Test changes: `chezmoi diff`
4. Apply locally: `chezmoi apply`
5. Run quality checks: `make lint`
6. Commit using conventional commits format:
```
<type>(<scope>): <subject>
<body>
<footer>
```
Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`
Manage CLI tools with aqua:
```bash
aqua install
aqua update
aqua generate <package-name>
aqua which <tool>
```
```bash
make patch-branch
make switch-master
make delete-branch
make morning-routine
```
1. **Always use chezmoi variables** - Never hardcode paths or OS-specific values
2. **Test templates thoroughly** - Use `chezmoi diff` and `chezmoi execute-template`
3. **Validate on target OS** - Test multi-OS templates on each platform
4. **Profile performance** - Keep shell startup time minimal with lazy loading
5. **Review security** - Never commit secrets, validate executable paths
6. **Use mise tasks** - Leverage task automation for complex operations
7. **Maintain consistency** - Follow existing patterns for file naming and structure
```bash
mise doctor
aqua which <tool>
chezmoi execute-template < template-file
```
Renovate automatically creates PRs for dependency updates. Review and test before merging.
---
**Remember:** This is a living configuration optimized for cross-platform compatibility and performance. Always test changes across target operating systems and maintain security best practices.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/dotfiles-management-assistant/raw