Custom commands
A custom command is a markdown file that becomes a /name shortcut for a prompt you use often.
Availability
Custom commands read command files from the machine CCD runs on. Today that means self-hosted CCD installs and platform workspaces. On the hosted service, for a project that lives on one of your dedicated nodes, the command list is empty. Use skills or instruction files instead.
Where command files live
Later locations override earlier ones when names collide:
~/.claude/commands/(read for compatibility)~/.ccd/commands/<project>/.claude/commands/<project>/.ccd/commands/
Subfolders become namespaces. .ccd/commands/git/pr.md is /git:pr. Command names may contain letters, digits, _, ., : and -. Files larger than 64 KB are ignored.
Example
.ccd/commands/fix-issue.md:
---
description: Fix a numbered issue and add a test
argument-hint: <issue-number> [extra notes]
allowed-tools: Bash
---
Fix issue number $1.
Recent commits for context:
!`git log --oneline -5`
Extra notes from me: $ARGUMENTS
Follow the conventions in @CCD.md and add a regression test.
Then type /fix-issue 42 keep the public API unchanged.
Frontmatter
| Key | Meaning |
|---|---|
description |
Shown in the command list. Defaults to the first line of the body. |
argument-hint |
A hint such as <issue-number>. |
allowed-tools |
A comma list. It must include Bash for ! shell lines to run. |
model |
Optional model for this command. |
Substitutions
| Syntax | Result |
|---|---|
$ARGUMENTS |
Everything typed after the command name. |
$1 to $9 |
The Nth argument, split like a shell (quotes work). |
!`command` |
Runs the command in the project folder and inserts its output. Needs allowed-tools: Bash. 15 second timeout, output clipped to 20 KB, a stripped-down environment (only PATH, HOME, LANG, LC_ALL, TERM). |
@path/to/file.ext |
Inlines the file (up to 100 KB). The path must stay inside the project folder; other @ text is left as it is. |
If you type arguments but the file uses neither $ARGUMENTS nor $1..$9, the arguments are appended as ARGUMENTS: ... so they are never lost.
Shell safety
Arguments substituted into a !`...` line are always shell-quoted, so /fix-issue "1; rm -rf ~" cannot inject a second command. Over the web API, shell lines in project command files are disabled (the notes list says "shell in project commands is disabled on the server"), because project files are writable by tenants.
API
# list
curl -H "X-API-Key: $CCD_API_KEY" "$CCD_URL/api/dev/commands?project_id=$PID"
# expand to the prompt text
curl -X POST -H "X-API-Key: $CCD_API_KEY" -H "Content-Type: application/json" \
-d '{"project_id":"'$PID'","name":"fix-issue","args":"42"}' \
"$CCD_URL/api/dev/commands/expand"