| name | safe-command-patterns |
| description | Reusable command rules that minimize accidental data loss, context overflow, and unreviewed changes. Use before editing, searching, and committing. |
Safe command patterns
Purpose
Default safety rails for agent shell usage: bounded output, inspect-before-edit, confirmation gates.
When to Use
Throughout every coding task — before search, edit, test, or commit.
Required Tools
git, rg or IDE search; optional bat, delta.
Install
Install blocks are shared — See install-blocks.md.
Windows PowerShell
Use winget blocks from the reference when provisioning a new machine.
WSL2 Ubuntu
Use apt/curl blocks from the reference; symlink fdfind → fd if needed.
macOS
Use Homebrew blocks from the reference.
Common Commands
git status --short
git diff --stat
git diff -- path/to/file
rg "pattern" path/ --max-count 30
Agent-Safe Patterns
- See bounded-output-patterns.md.
- When fff MCP is connected, prefer
ffgrep/fffind for repeated repo search over many shell roundtrips; one-off probes may still use rg/fd.
- Never paste secrets into commands or logs.
- Prefer project scripts from AGENTS.md over invented commands.
Commands Requiring Confirmation
See commands-requiring-confirmation.md.
Troubleshooting
- Huge command output: add
--max-count, path prefix, or -g globs.
- Wrong directory:
git rev-parse --show-toplevel.
Windows Notes
WSL2 Notes
- Run repo commands from the WSL checkout, not
/mnt/c/... unless intentional.
- See windows-wsl-split.md.
Verification Checklist