Mastering Claude Code: Slash Commands & Subagents
Explore Claude Code's advanced workflows with slash commands, subagents, and verification loops for efficient coding automation.
Written by AI. Bob Reynolds

Mastering Claude Code: Advanced Workflows with Slash Commands and Subagents
In the world of coding, efficiency is often the name of the game. Boris Cherny, the creator of Claude Code, recently shared insights into his advanced automation workflows. These workflows transform repetitive prompts into streamlined processes using slash commands, subagents, and verification loops.
Slash Commands: Automating the Inner Loop
Slash commands in Claude Code are more than mere shortcuts; they're integral to automating repetitive tasks. "If there's something you find yourself prompting more than once," Boris suggests, "you should turn that into a slash command." These commands are stored alongside your code in Git, ensuring repeatable behavior is encoded directly into your projects.
A practical example from the video demonstrates how a command like commit-push-pr can automate the entire process of staging changes, writing commit messages, pushing to a branch, and opening a pull request. This approach not only saves time but also reduces the likelihood of human error.
Subagents: Task Versus Role
While slash commands handle specific tasks, subagents in Claude Code are role-based specialists. Boris explains that subagents like the 'Code Simplifier' or 'Verify App' act as automated specialists that you can call upon repeatedly. "A subagent is like a specialist you call on repeatedly," he notes.
The distinction is clear: slash commands are about doing a task, while subagents embody a role. This role-based automation allows for more nuanced and specialized task management within coding projects.
Verification Loops: Ensuring Quality
Verification loops are arguably the cornerstone of Boris's workflow, ensuring the quality and correctness of code outputs. "Give Claude a way to verify its work," Boris emphasizes. This feedback loop is crucial—allowing Claude to test its outputs, catch errors early, and iterate rapidly.
Verification might involve running a test suite for backend code or performing UI tests for web applications. The key is that verification transforms Claude from a guesser into a reliable coder. Without this, one risks discovering bugs only after deploying, which can be costly and time-consuming.
Slash Commands as Workflow Glue
Boris Cherny's approach to Claude Code illustrates the potential for automation to enhance productivity in software development. By leveraging slash commands, subagents, and verification loops, developers can create robust, repeatable workflows that minimize manual intervention while maximizing efficiency.
For those interested in exploring these workflows, Boris has provided a public, fork-friendly GitHub repository. It's a practical resource for anyone looking to implement similar automation strategies in their own projects.
More Like This
AI Tools: Colleague or CNC Machine?
Explore AI's dual role as a colleague or tool and its impact on work.
Becoming a Claude Code Power User
Master Claude Code updates with custom tools and stay ahead.
Claude Code: Self-Improving Skills Demystified
Explore Claude Code's self-improving skills for coding efficiency.
Integrating Claude Code with GitHub Actions: A Deep Dive
Explore the integration of Claude Code with GitHub Actions, covering setup, costs, and AI-driven automation.
Claude Code 2.1: A Veteran's Take on AI Tools
Explore Claude Code 2.1's new features with insights from a veteran tech journalist.
Claude Code's Side Channel Solves AI Coding's Focus Problem
Anthropic's new /btw command lets developers ask questions without disrupting Claude Code's work—addressing context pollution that degrades AI performance.
Claude Code and AI-Driven SEO for Shopify Stores
A live walkthrough of using Claude Code, SEMrush MCP, and Shopify to build AI-optimized pages raises real questions about where SEO is heading.
Garry Tan's Blueprint for the AI-Native Company
Y Combinator's Garry Tan argues that how you organize AI matters more than which AI you use. Here's what that means in practice.