AgentSkillsCN

keybind-audit

分析所有dotfiles中的键绑定,查找冲突、重复和不一致。在修改键绑定或检查冲突时使用。

SKILL.md
--- frontmatter
name: keybind-audit
description: Analyze keybindings across all dotfiles for conflicts, duplicates, and inconsistencies. Use when modifying keybindings or checking for conflicts.

Keybind Audit

Analyze keybindings across all configuration files in this dotfiles repository.

When to use

  • User wants to add or modify a keybinding
  • User asks about keybinding conflicts
  • User wants to check consistency across tools

Target files

ToolFilePattern
zshdot_zshrc.tmplbindkey
tmuxdot_tmux.confbind, bind-key
vimdot_vimrcnnoremap, vnoremap, inoremap, cnoremap
neovimdot_config/nvim/lua/keymap.luavim.keymap.set, nvim_set_keymap
neovim pluginsdot_config/nvim/lua/plugin_configs/*.luavim.keymap.set, keymaps in setup()
obsidiandot_obsidian.vimrcnmap, vmap, exmap
alacrittydot_config/alacritty/alacritty.toml[[keyboard.bindings]]

Analysis checklist

  1. Cross-tool conflicts: Same key combo, different behavior across tools

    • Focus on: Ctrl+key, Alt+key, leader combinations
    • Example: <C-g> in tmux vs zsh
  2. Duplicates: Same keybinding defined multiple times within one tool

    • Example: j -> gj in both dot_vimrc and nvim/lua/keymap.lua
  3. Consistency: Check vim-style navigation unity

    • Are hjkl mapped consistently?
    • Is <leader>fj/fk/fl pattern consistent?
  4. Shadowed defaults: Overwritten important defaults that may cause confusion

  5. Dead bindings: Commented-out bindings that might be worth revisiting

Output format

Group by severity:

Conflicts (must fix)

  • Key: <C-x>
  • Tools: tmux (kill-pane) vs zsh (execute)
  • Recommendation: ...

Duplicates (should fix)

  • Key: j -> gj
  • Files: dot_vimrc:1, keymap.lua:9
  • Recommendation: Keep only in keymap.lua

Inconsistencies (consider)

  • ...

Info

  • ...