Claude Code subagents, hooks and slash commands: a practical setup guide
The guide explains how to turn CLAUDE.md guidance into enforced behavior using subagents, hooks, and slash commands in Claude Code. Subagents are Markdown files in .claude/agents/ with YAML frontmatter, each running in its own context with limited tools such as read-only access for reviewers. Hooks configured in .claude/settings.json can block or allow tool calls, such as stopping destructive shell commands or refusing edits to secret files, and can run formatters or tests. Slash commands defined in .claude/commands/ chain subagents into repeatable workflows. The article also advises reading hook scripts before enabling them and keeping them under version control, since hooks run with the user's permissions.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in