<!-- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY -->
<!-- Edit source frontmatter, then run 'erk docs sync' to regenerate. -->

# Commands Documentation

- **[command-rename-pattern.md](command-rename-pattern.md)** — renaming a slash command, migrating command invocations, ensuring complete command name updates
- **[optimization-patterns.md](optimization-patterns.md)** — reducing command file size, using @ reference in commands, modularizing command content
- **[session-id-substitution.md](session-id-substitution.md)** — writing slash commands that need session context, developing hooks that interact with Claude sessions, debugging session ID unavailable errors, passing session metadata to erk exec scripts
- **[step-renumbering-checklist.md](step-renumbering-checklist.md)** — merging or removing steps in slash commands, refactoring command workflows, encountering broken step references in commands, reviewing command documentation for consistency
- **[tool-restriction-safety.md](tool-restriction-safety.md)** — implementing slash commands with safety constraints, designing read-only commands, creating commands that work in plan mode
- **[tripwires.md](tripwires.md)** — adding documentation routing rules, making documentation more discoverable, preventing common agent mistakes
