DEV Community

Cover image for Introducing ccmd: Slash Command Manager for Claude Code
Guilherme Sousa
Guilherme Sousa

Posted on

Introducing ccmd: Slash Command Manager for Claude Code

I've recently published ccmd, a command-line tool I built to help manage Claude Code commands (slash commands, like /migrate-db, /seed, /hello-world, etc.). If you're using Claude Code regularly and creating custom prompts, you’ve probably faced the same issue I did: managing and reusing these commands across different projects gets messy quickly.

The idea is to treat commands as versioned packages—similar to how you manage dependencies with tools like npm, pip, or go mod.

Why I Built It

I love using Claude Code, but I found myself copy-pasting .md files into each repo just to reuse a command. Worse, if I wanted to update one of them, I had no visibility on where else that command was being used. I wanted a way to:

  • Version control my prompts
  • Reuse the same command in multiple projects
  • Easily install/remove/update them
  • Keep project directories clean

So, I built this tool to do just that.

Installing

You can get started in three ways:

Option 1: via npm (Recommended)

Assuming you have Node.js installed:

npm install -g @gifflet/ccmd
Enter fullscreen mode Exit fullscreen mode

This is the easiest and most portable method, as more users typically have Node.js available than Go.

Option 2: via Go

If you prefer or already use Go:

go install github.com/gifflet/ccmd/cmd/ccmd@latest
Enter fullscreen mode Exit fullscreen mode

Option 3: via Release Page

If you don’t want to install via npm or Go, you can grab a precompiled binary:

👉 Head over to the Releases page and download the executable for your OS (Windows, macOS, Linux). Make sure it’s executable and available in your PATH.

Basic Usage

Inside any Claude-enabled project:

ccmd init                    # sets up a ccmd.yaml
ccmd install <git-url>       # installs a command
ccmd list                    # see what's installed
ccmd update <name>           # update a specific command
ccmd remove <name>           # remove a command
Enter fullscreen mode Exit fullscreen mode

For example:

ccmd install gifflet/hello-world
Enter fullscreen mode Exit fullscreen mode

That installs the command into .claude/commands/, where Claude Code can detect and run it as /hello-world.

Creating Your Own Commands

To publish your own slash command:

mkdir my-command && cd my-command
ccmd init
# Fill in the interactive prompts
Enter fullscreen mode Exit fullscreen mode

Add your index.md (or other entrypoint), commit, and push to GitHub. Then others can install it via:

ccmd install https://github.com/your-user/my-command
Enter fullscreen mode Exit fullscreen mode

Thoughts on Prompts as Code

One of my motivations here is to treat markdown command files as real software artifacts. They deserve:

  • Versioning
  • Reuse
  • Dependency management
  • Independent evolution from the main repo

This tool helps make that possible.


If you'd like to try it or contribute, the repo is here:
👉 https://github.com/gifflet/ccmd

Feedback, PRs, or ideas are always welcome!

Top comments (0)