prompts/skills/emacs/SKILL.md
Control Emacs via tmux for interactive editing, magit operations, and buffer navigation using evil-mode (vim keybindings).
npx skillsauth add ramblurr/nix-devenv emacsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use Emacs as an interactive editor via tmux. This skill assumes Doom Emacs or a similar evil-mode configuration with vim keybindings.
Invoke the tmux skill (mandatory!) for session setup and key sending.
Start emacsclient in terminal mode with emacsclient -c -nw.
All key sequences below are shown as typed in Emacs. Send them via tmux send-keys:
C-m for EnterEscape for Escape keyC-c, C-g, etc.M-x, etc.Example - M-x magit C-m means:
tmux -S "$SOCKET" send-keys -t "$TARGET" M-x 'magit' C-m
CRITICAL: After every key sequence, capture the pane output to verify state before proceeding.
Basic movement: Standard vim line movement (h, j, k, l, gg, G)
Search:
/pattern C-m - search forward (cursor jumps to first match)n / N - next/previous matchVisual mode:
v - enter visual mode (character selection)V - enter visual line mode (line selection)s in magit to stage selection)Cancel/Quit:
C-g - cancel current operation (emacs universal cancel)Escape - exit insert/visual mode back to normal modeq - quit current buffer/window (context dependent)Execute commands:
M-x command-name C-m - run any emacs commandReading the Status Bar:
line:column (e.g., 346:2 = line 346, column 2)Toggling Line Numbers:
M-x doom/toggle-line-numbers C-m - cycle through three states: no line numbers, relative line numbers, absolute line numbersSwitch to a project:
M-x projectile-switch-project C-mC-m to selectM-x magit C-mC-m to select.The magit status buffer shows sections:
j/k or searchTab to expand/collapse the section… suffix are collapsedTab on a file to show its diff hunksStage entire hunk:
s to stage that hunkStage specific lines (partial hunk staging):
v to enter visual modej/k to expand selection to desired liness to stage only the selected linesStage entire file:
sUnstage:
u to unstagec to open commit transient menuc again to create a regular commiti to enter insert modeEscape to exit insert modeC-c C-c to finalize the commitC-c C-k to cancelg to refresh the magit status buffer after external git operations| Key | Action |
|-----|--------|
| s | Stage (hunk, file, or visual selection) |
| u | Unstage |
| c c | Create commit |
| c a | Amend commit |
| Tab | Expand/collapse section or file |
| g | Refresh buffer |
| q | Quit magit buffer |
| $ | Show git process output |
| l l | Show log |
| d d | Show diff |
| P p | Push |
| F p | Pull |
C-m to confirm commandsgg should be sent as two separate keys: send-keys 'g' 'g'g to refresh the buffer.C-g twice usually cancels.git commit --amend -m "message", using bash directly is often simpler than navigating magit.testing
Use this OCP when executing or preparing to execute commands that change a live or important system, service reloads/restarts, package changes, deployments, migrations, firewall/network/access changes, credential rotation, NixOS switch/test/boot/deploy, or incident mitigation. It guides safe operations with a persisted ledger for scope, preflight, baseline, rollback, validation, and evidence.
development
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
documentation
Naming conventions for workflow documents in prompts/. Use when creating plans, PRDs, research reports, idea capture or other workflow documents. Triggers on (1) creating new planning documents, (2) naming PRDs or research reports, (3) questions about document organization in prompts/.
testing
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.