| name | dot-gemini-guard |
| description | Intercepts edits to ~/.gemini/ and ~/.config/ synced files and redirects to ~/projects/dot-ai-config/. Triggers when modifying GEMINI.md, skills, commands, settings, or dotfiles (kitty, fish, nvim, mise, git). Also logs skill/command invocations to the usage tracker.
|
dot-gemini-guard
~/.gemini/ and select ~/.config/ directories are synced copies — the source of truth is ~/projects/dot-ai-config/.
When this skill triggers
Activate whenever you are about to:
- Edit, write, or create files under
~/.gemini/ (GEMINI.md, skills/, commands/, settings.json, settings.local.json)
- Edit, write, or create files under
~/.config/kitty/, ~/.config/fish/, ~/.config/nvim/, ~/.config/mise/
- Edit
~/.gitconfig, ~/.gitignore_global, or ~/.tmux.conf
- Modify any skill or command content
What to do
-
Redirect the edit to the equivalent path under ~/projects/dot-ai-config/:
| Instead of | Edit this |
|---|
~/.gemini/GEMINI.md | ~/projects/dot-ai-config/dot_gemini/GEMINI.md |
~/.gemini/skills/<name>/SKILL.md | ~/projects/dot-ai-config/dot_gemini/skills/<name>/SKILL.md |
~/.gemini/commands/<name>.md | ~/projects/dot-ai-config/dot_gemini/commands/<name>.md |
~/.gemini/settings.json | ~/projects/dot-ai-config/dot_gemini/settings.json |
~/.gemini/settings.local.json | ~/projects/dot-ai-config/dot_gemini/settings.local.json |
~/.config/kitty/* | ~/projects/dot-ai-config/kitty/* |
~/.config/fish/config.fish | ~/projects/dot-ai-config/fish/config.fish |
~/.config/fish/conf.d/* | ~/projects/dot-ai-config/fish/conf.d/* |
~/.config/fish/functions/* | ~/projects/dot-ai-config/fish/functions/* |
~/.config/nvim/* | ~/projects/dot-ai-config/nvim/* |
~/.config/mise/config.toml | ~/projects/dot-ai-config/mise.toml |
~/.gitconfig | ~/projects/dot-ai-config/gitconfig |
~/.gitignore_global | ~/projects/dot-ai-config/gitignore_global |
~/.tmux.conf | ~/projects/dot-ai-config/tmux.conf |
-
Immediately after editing, run the sync script so changes take effect right away (don't wait for git push):
~/projects/dot-ai-config/sync.sh
This copies the edited files to their active locations (~/.gemini/, ~/.config/, etc.).
-
Log the invocation — update the usage tracker (see below).
Usage Tracker
After any skill or command is invoked (not just this guard — ALL skills and commands), append/update an entry in ~/projects/dot-ai-config/USAGE.md.
Format:
| Name | Type | Last Invoked | Count |
- If the skill/command already has a row, update
Last Invoked to today and increment Count
- If it's new, add a row with count 1
- Keep the table sorted by
Last Invoked descending (most recent first)
This file lives in the dot-ai-config repo so it's version-controlled and reviewable.