Search⌘ K
AI Features

Custom Commands and Automation

Explore how to create and use custom commands in Claude Code to automate repetitive development tasks. Learn to set up command files, use dynamic arguments, and streamline workflows for faster, consistent, and reusable coding processes aligned with your project standards.

Claude Code comes with built-in slash commands, but its real power lies in the custom commands that we define. Custom commands let us save complex or repetitive prompts through one-click actions. Instead of typing the same instructions again and again (for example, “Perform a code review following our team standards…” or “Generate tests using our preferred framework…”), we can transform these tasks into reusable commands. This approach saves time and ensures consistent results whenever the command runs.

In this lesson, we will explore how to create custom commands in Claude Code, use dynamic arguments, and apply them to streamline your development workflow.

How are custom commands created?

Setting up a custom command in Claude Code is straightforward. Custom command files live in your project and are Markdown files that contain the instructions you want Claude to execute. Follow these steps:

  1. Locate (or create) the hidden .claude folder at the root of your project/current directory.

  2. Inside ...