A labelled foam shadow-board tool drawer in a military aircraft maintenance tool crib, each wrench and tool set into its own cut-out slot with a barcoded accountability tag
AI & LLMs

Building Better Claude Code Workflows with CC-Commands

•8 min read•By Joseph Edmonds•Image: A1C Allen Tyler, 138th Fighter Wing, public domain, via DVIDS

Claude Code has revolutionised how developers work with AI assistance, but managing custom commands across multiple projects quickly becomes a nightmare. Enter CC-Commands, an elegant solution that transforms command management from a tedious chore into an automated, intelligent workflow.

The Claude Code Revolution

Claude Code represents a paradigm shift in AI-assisted development. Unlike traditional coding assistants that provide suggestions, Claude Code offers interactive coding sessions with full file system access, command execution, and the ability to create custom workflows through slash commands.

The power of Claude Code lies in its extensibility. Custom slash commands allow developers to encode complex workflows, automate repetitive tasks, and create domain-specific tools that understand their project's unique requirements. These commands can:

  • Automate deployment processes with intelligent error handling and rollback capabilities
  • Orchestrate testing workflows that adapt to different environments and configurations
  • Manage database operations with safety checks and automated backups
  • Generate project documentation that stays synchronised with code changes

But as projects grow and multiply, a critical problem emerges. How do you manage these valuable commands across multiple repositories?

The Multi-Project Command Management Nightmare

Every developer who has worked with Claude Code across multiple projects has experienced this frustration. You create a brilliant command in one project, perhaps a sophisticated deployment script or a comprehensive testing workflow, and then face the painful reality of maintaining it across your entire codebase.

The Copy-Paste Spiral

The typical journey starts innocently enough. You create a useful command like /deploy:staging that handles environment setup, runs tests, and deploys with proper error handling. It works beautifully, so you copy it to your next project. Then you improve it, adding better logging and rollback capabilities. Now you have two versions.

Fast forward six months. You have eight projects, each with slightly different versions of the same commands. A bug fix in one project means manually updating seven others. A new feature requires careful synchronisation across multiple repositories. The commands that were supposed to save time now consume it.

The Maintenance Burden

The problems compound quickly:

  • Version drift: Commands evolve independently, creating inconsistent behaviour across projects
  • Bug multiplication: A single bug must be fixed multiple times in multiple places
  • Feature fragmentation: Improvements in one project don't benefit others
  • Documentation and onboarding chaos: different projects end up with different command documentation and usage patterns, so new team members have to learn a different set of commands each time they join one

Traditional solutions fall short too: git submodules are too heavyweight and complex, copying files by hand is error-prone and doesn't scale, and package managers were never really designed for this kind of problem, so the developer community needed something better suited to it.

Enter CC-Commands: A Different Approach

CC-Commands solves the multi-project command management problem well, without a lot of extra apparatus. Instead of fighting against the natural evolution of commands, it embraces it whilst maintaining consistency and making it straightforward to share improvements.

The Self-Managing Command System

The brilliance of CC-Commands lies in its meta-circular design. It uses Claude Code commands to manage Claude Code commands, and that turns out to be the choice that makes the rest of the system work. There are three core management commands:

  • /g:command:create: Creates new commands with best practices built-in
  • /g:command:update: Updates existing commands whilst preserving functionality
  • /g:command:sync: Synchronises commands across all projects

You can build your command library directly within your Claude Code session, without ever leaving your development environment: create a new deployment command, enhance an existing one, or share improvements across every project you touch, all from inside the same session.

Intelligent Command Creation

The /g:command:create command does more than generate a template: it acts as an assistant that understands Claude Code's best practices, and when you create a command it:

  • Analyses your requirements to determine the appropriate tools and permissions
  • Generates comprehensive documentation including usage examples and help text
  • Implements safety features and error handling, including fail-fast validation, user confirmations, and recovery instructions with troubleshooting guidance
  • Optimises for Claude Code using Task blocks instead of interactive bash commands

The result is commands that are functional, maintainable, documented, and follow established patterns.

The Synchronisation Revolution

Where CC-Commands truly shines is in its synchronisation capabilities. The /g:command:sync command is a genuinely well thought-out piece of automation, and it is worth looking at how it works.

Smart Commit Generation

Unlike traditional git workflows that require manual commit messages, CC-Commands analyses your actual changes and generates intelligent commit messages automatically. It knows the difference between:

  • Feature additions: "feat: add push command with GitHub Actions monitoring"
  • Bug fixes: "fix: improve error handling in create and update commands"
  • Documentation updates: "docs: update README with current command structure"
  • Refactoring: "refactor: simplify command argument parsing logic"

That's convenient in itself, but it also builds a commit history a team can actually read back later, showing how the commands evolved.

Conflict-Free Collaboration

The synchronisation system handles the complexities of multi-project collaboration. It automatically:

  • Detects changes across all command files
  • Commits improvements with descriptive messages
  • Pulls updates from other contributors
  • Resolves conflicts with clear guidance
  • Pushes changes to share with all projects

This produces a living command ecosystem that evolves continuously whilst maintaining consistency across all projects.

A Worked Example: Before and After

To understand the true impact of CC-Commands, consider a typical development scenario across multiple projects:

Before CC-Commands: The Manual Nightmare

A team maintains five PHP projects, each requiring similar deployment workflows. They have variations of a deployment command in each project:

  • Project A: Basic deployment with manual testing
  • Project B: Deployment with automated tests but no rollback
  • Project C: Advanced deployment with rollback but poor error handling
  • Project D: Deployment with good error handling but no monitoring
  • Project E: Comprehensive deployment but complex configuration

When a critical bug is discovered in the deployment logic, it requires manual fixes across five repositories. When a new feature is added to one project, it must be carefully ported to the others.

After CC-Commands: One Command, Everywhere

With CC-Commands, the same team has a single, authoritative deployment command that:

  • Incorporates the best features from all previous versions, maintaining consistency across every project
  • Evolves continuously as improvements are made
  • Synchronises automatically when any project runs /g:command:sync
  • Includes comprehensive documentation and error handling

A bug fix or feature enhancement in one project automatically benefits all others. The maintenance burden shifts from "update five commands" to "update one command and sync everywhere."

The Command Arsenal

CC-Commands comes with a thoughtfully curated set of commands that demonstrate best practices and solve common problems:

Command Management Suite

  • /g:command:create: Intelligent command creation with safety features
  • /g:command:update: Non-destructive command enhancement
  • /g:command:sync: Automated repository synchronisation

GitHub Integration Tools

  • /g:gh:push: Smart git push with Actions monitoring
  • /g:gh:issue:plan: Convert GitHub issues to comprehensive plans

Workflow Enhancement

  • /g:w:plan: Generate project plans with progress tracking

Each command carries real error handling and a workflow that has been used and refined in practice, not just a thin wrapper. They're examples of how to build robust, maintainable Claude Code commands.

Beyond Commands: A Philosophy

CC-Commands represents more than just a tool. It embodies a philosophy of intelligent automation and collaborative development. The system demonstrates several key principles:

Automation That Understands Context

Rather than blind automation, CC-Commands analyses context to make intelligent decisions. It understands the difference between different types of changes and generates appropriate commit messages, and it recognises when README files need updates and suggests improvements.

Safety Without Bureaucracy

The system includes comprehensive safety features like permission management, fail-fast validation, and user confirmations, without creating bureaucratic overhead. Safety features prevent problems whilst maintaining development velocity.

Evolution Over Revolution

CC-Commands doesn't require wholesale changes to existing workflows. It fits into existing Claude Code setups and enhances them gradually, so you can adopt commands incrementally and let the system grow with your needs.

Getting Started: Your First Command

Installing CC-Commands is remarkably simple. From your project root:

curl -fsSL https://raw.githubusercontent.com/LongTermSupport/cc-commands/main/setup.sh | bash

This single command installs the entire system, including all management commands and GitHub integration tools.

Creating your first command is just as straightforward:

/g:command:create db:reset "Reset database to clean state with test data"

The system will analyse your requirements, generate a comprehensive command with proper error handling and documentation, and make it available for immediate use.

Conclusion: Building Better Workflows

CC-Commands solves a fundamental problem in modern development: how to maintain consistency and share improvements across multiple projects without sacrificing agility or creating maintenance overhead.

By embracing the meta-circular design of commands that manage commands, CC-Commands creates a self-improving system that grows more valuable over time. Each command created, each improvement made, and each synchronisation run contributes to a shared knowledge base.

The solution here doesn't rely on complexity. Three commands (create, update, and sync) cover the whole multi-project management problem whilst still enabling powerful workflows and intelligent automation, and that simplicity is what makes it work.

For developers working with Claude Code across multiple projects, I'd call CC-Commands close to a necessity rather than just a convenience: it takes command management out of the category of tedious chores and turns it into something automated and largely hands-off.

Managing commands manually across multiple projects doesn't scale; letting commands manage themselves does. The project is open source: github.com/LongTermSupport/cc-commands.

This is exactly the kind of problem the guardrail tooling below is built for.

See the open-source work