//
Search across all documentation pages
7 pages in this section.
Distinguish reusable slash commands, lifecycle hooks, and isolated subagents as three separate extension points.
Write a first custom slash command, then spawn a subagent for an isolated subtask.
Define a repeatable slash command as a markdown file with frontmatter and a prompt body.
Trigger a shell script automatically after Claude Code edits a file using a PostToolUse hook.
Understand why a subagent runs with isolated context and its own scoped tool access.
Fan out several subagents at once to research independent parts of a codebase in parallel.
Follow proven conventions for naming commands, scoping hooks, and delegating work to subagents.