← Back to blog

Useful Claude commands

If you have been using Claude Code for a while, you may have learned some best practices. Sometimes these come from success stories where your coding agent one-shotted a complex feature. Other times, they come from battle scars like unwinding a complex Git history. This blog will focus on some things I’ve picked up, and implemented Claude Commands for. If you use Claude, you’ll find commands are stored in the .claude/commands folder.

If you use Claude to develop, you’ll find that after a while, you repeat the same workflows. Research this, and do that. Update your context, and answer this question based on it. That’s where commands come in. With commands, you can define a repeatable playbook to follow. Many of us have had headaches from using Git. You’ll see a command here that alleviates some of the pain I’ve had by always aligning with best practices. It can unleash the power of technologies of which the driver may not have expertise, not to mention any experience using. As I share my commands below, I won’t go into specifics on the contents, other than to share an example prompt to create it. The power of prompt engineering is not lost here, so you can refine my examples as you see fit.

Speckit

The /speckit framework offers powerful commands for spec-driven framework. If you have seen my blog on speckit, or if you use it personally, you’ll already know what I mean. If you’re curious, you can read more about that here: Using Spec-Driven Development

/roadmap

As mentioned, one of the best benefits of LLM Coding Agents is the time-to-implement for new ideas. Ordinarily, life might get in the way. Once you have the idea, and an initial MVP built-out with the ‘must have’ requirements, you may want to develop further. The /roadmap command can be used to build out, and prioritize, the feature set of your application based on its current state and initial guidance from CLAUDE.md.

But, here is a starter prompt to create your own /roadmap command:

Create a new command, /roadmap. The roadmap command should read the CLAUDE.md file to understand the project goals and desired end state, analyze Git history for the latest progress, and then read the code base to gain context of the project. Then, create or update the ROADMAP.md file to include a prioritized feature roadmap.

Depending on the project, you may also request a competitive analysis. This can be useful in scenarios where you are building against a known-good model, e.g., you’re building a personal CRM modeled after SalesForce.

/next-steps

One of the most exciting aspects of AI-paired programming is the turnaround from idea-to-implementation. Within a day, a simple idea like personal planners or fitness trainers can come to life thanks to Claude. Even though LLMs can write all of your code, leveraging the Agent to make effective progress can be difficult in larger projects. Or, if you’re context switching or get distracted by life, one might lose their momentum. /next-steps is a helpful command to pick up where you left off, or use the power of AI to guide your next steps, given the latest progress and roadmap.

Here is a starter prompt for /next-steps:

Create a new command, /next-steps. The next-steps command should read the CLAUDE.md file to understand the project objectives and desired end state, analyze Git history for the latest progress, and read the codebase to understand current state. Apply product management best practices to prioritize next steps by user impact, dependencies, and effort. Then, present a clear prioritized summary of recommended next steps as actionable tasks, so a developer can immediately pick up where they left off.

/manage-git

While Git is a powerful Version-Control software, even those who are technical have trouble fully harnessing its potential. I learn something about Git everytime I touch it, often because I’ve broken something. /manage-git is a good way to alleviate this, and give yourself a leg up. Similar to /next-steps this /manage-git is an analog, in that its sole focus is ‘next steps’ of Git management. Do we have any changes to commit? Is our working tree clean? Do we have stale branches? Can we create worktree for parallel development in side-by-side Claude sessions? These are all questions easily answered, now, by a single command call.

Create a new command, /manage-git. The manage-git command should check the current Git status including staged, unstaged, and untracked changes, review the branch list for stale or merged branches, and inspect the commit history for unpushed commits. Apply Git best practices for clean version control hygiene including conventional commit messages and atomic commits. Then, present a clear summary of recommended Git actions such as commits to make, branches to clean up, or changes to push. Recommend potential parallel development scenarios, and provide guidance on worktree best practices. Always confirm with the user before executing any Git operations, so a developer can keep their repository organized safely and without unintended changes.

Conclusion

This will be a living blog post, as I am still learning the power of Claude commands, and finding their use cases. Hopefully these commands can provide value in your vibe-coding journies. If you found this interesting, please consider reading my other related posts on the subject. Thanks for reading.