Custom slash commands and hooks: shortcuts you trigger, guarantees that fire on their own episode artwork

EPISODE · Jun 1, 2026

Custom slash commands and hooks: shortcuts you trigger, guarantees that fire on their own

from OCDevel Claude Code Podcast

You've been using the slash commands Claude Code ships with. Now write your own, and wire the hooks that fire on their own. Bundle a repeatable workflow into a command you trigger with a slash, then back it with hooks that enforce the rules a command can only ask for: build a /commit command, auto-lint after every edit, block writes to your migrations folder, and force the tests to pass before a turn can end. Episode page & show notes Try a walking desk - stay healthy & sharp while you learn & code Episode 3 covered the slash commands Claude Code ships with. This one is about writing your own, plus the automation that fires whether Claude remembers it or not. Two primitives, one rule for choosing between them: a custom slash command is a shortcut you trigger; a hook is a guarantee that runs on its own. Custom slash commands. Where they live (a per-command folder under your project's .claude or your home .claude, with the folder name becoming the command), the SKILL.md file and its YAML frontmatter, and the fields that matter: description, argument-hint, allowed-tools, model, and disable-model-invocation. Passing arguments with $ARGUMENTS and positional $1/$2, injecting live shell output into the prompt with the !`...` prefix, and pre-approving tools so a workflow runs without permission prompts. Worked example: a /commit command that stages, writes a real message, pushes, and opens a PR. From the skills documentation. Hooks. The lifecycle events (PreToolUse, PostToolUse, UserPromptSubmit, Stop, SessionStart/End, compaction, notifications, subagent events), how they're configured under the hooks key in settings.json, the matcher syntax, the JSON a hook receives on stdin, and how it answers back through exit codes (0 success, 2 blocks) and a decision JSON that can allow, deny, ask, modify tool input, or add context. Three hooks worth stealing: auto-lint and format after every edit, block writes to the migrations folder, and a Stop hook that forces tests to pass before a turn can end. From the hooks documentation. The pitfall. Putting an "always" or "never" rule inside a command's prose and trusting it. Command instructions are advice, like CLAUDE.md; if the cost of the model forgetting is real, that rule belongs in a hook. Plus quick traps: hook timeouts, unquoted arguments, and vague descriptions that never auto-invoke. Browse what you've built with /hooks, /skills, and /help.

You've been using the slash commands Claude Code ships with. Now write your own, and wire the hooks that fire on their own. Bundle a repeatable workflow into a command you trigger with a slash, then back it with hooks that enforce the rules a command can only ask for: build a /commit command, auto-lint after every edit, block writes to your migrations folder, and force the tests to pass before a turn can end.

NOW PLAYING

Custom slash commands and hooks: shortcuts you trigger, guarantees that fire on their own

0:00 0:00

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

That Hoarder: Overcome Compulsive Hoarding That Hoarder Hoarding disorder is stigmatised and people who hoard feel vast amounts of shame. This podcast began life as an audio diary, an anonymous outlet for somebody with this weird condition. That Hoarder speaks about her experiences living with compulsive hoarding, she interviews therapists, academics, researchers, children of hoarders, professional organisers and influencers, and she shares insight and tips for others with the problem. Listened to by people who hoard as well as those who love them and those who work with them, Overcome Compulsive Hoarding with That Hoarder aims to shatter the stigma, share the truth and speak openly and honestly to improve lives. The Small Business Startup School – Business Notes | Financial Literacy | Retail Psychology – For Professionals & Entrepreneurs The Small Business Startup School Inc. Starting or buying a small business? While personal circumstances may vary, business patterns remain timeless. On The Small Business Startup School, we explore strategies, insights, and practical solutions to help entrepreneurs confidently navigate their journey.Hosted by Ola Williams—a retail entrepreneur, fintech founder, and financial coach with over two decades of experience—this podcast marries financial awareness and retail psychology with optimism to deliver actionable takeaways.Join us to learn, grow, and connect as we uncover the keys to business success.Let’s continue to learn together and be encouraged to keep on connecting! DIOSA. Carolina Sanper This podcast is a sacred space created by Carolina Sanper where you connect with your inner wisdom and embody your magnetic feminine power.It is the realization that the mystical realm is where you plant the seeds of your desired reality.It is a portal to your true essence: awareness, presence, and receiving with ease. Welcome home, DIOSA. 🖤 XXX Tech by SOVRYN Dr. Brian Sovryn The crossroads between technology, sensuality, and metaphysics - and the longest running anarchist podcast in the world! Brought to you by Dr. Brian Sovryn.

Frequently Asked Questions

How long is this episode of OCDevel Claude Code Podcast?

Episode duration information is not available.

When was this OCDevel Claude Code Podcast episode published?

This episode was published on June 1, 2026.

What is this episode about?

You've been using the slash commands Claude Code ships with. Now write your own, and wire the hooks that fire on their own. Bundle a repeatable workflow into a command you trigger with a slash, then back it with hooks that enforce the rules a...

Can I download this OCDevel Claude Code Podcast episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!