Slash Commands
Create and use slash commands to guide Claude through repeatable tasks
Slash Commands
DorkOS discovers slash commands from your project's .claude/commands/ directory and makes them available through a command palette in the chat input.
Using Commands
Open the command palette
Type / in the chat input to open the command palette.
Find your command
Search or browse available commands. Commands are sorted alphabetically and grouped by namespace.
Insert and run
Select a command to insert it into the chat input. Add arguments after the command name if needed, then send.
Command Discovery
DorkOS scans .claude/commands/ recursively. Directory nesting creates namespaced commands using a namespace:command pattern:
| File | Command |
|---|---|
docs/reconcile.md | /docs:reconcile |
docs/status.md | /docs:status |
spec/create.md | /spec:create |
spec/execute.md | /spec:execute |
Only .md files inside namespace subdirectories are discovered. Top-level files directly inside
commands/ are not picked up — commands must be inside a named subdirectory.
Command Format
Commands are Markdown files with optional YAML frontmatter:
---
description: Check developer guides for documentation drift
argument-hint: '[guide-name | --all]'
allowed-tools: Read, Grep, Glob, Bash
category: documentation
---
# Documentation Reconciliation
[Instructions for Claude to follow...]Frontmatter Fields
Prop
Type
If your frontmatter values contain special YAML characters (brackets, colons, pipes), wrap them in quotes. DorkOS includes a fallback parser for malformed YAML, but quoting is more reliable.
Creating Custom Commands
Create the directory structure
Create a namespace directory inside .claude/commands/:
mkdir -p .claude/commands/mytoolsWrite the command file
Create a Markdown file with frontmatter and instructions:
cat > .claude/commands/mytools/greet.md << 'EOF'
---
description: Generate a greeting
argument-hint: '[name]'
allowed-tools: Read, Bash
---
# Greeting Generator
Say hello to the user by name.
EOFRefresh the command list
The registry caches results for 5 minutes. To refresh immediately, click the refresh button in the command palette or call the API with ?refresh=true.
Cache Behavior
The command registry caches results for 5 minutes. The cache is also cleared on server restart. To force an immediate refresh:
- Click the refresh button in the command palette
- Call the API with
?refresh=true
API
# List all discovered commands
curl http://localhost:4242/api/commands
# Force refresh the command cache
curl http://localhost:4242/api/commands?refresh=trueThe response includes a lastScanned timestamp and an array of commands, each with namespace, command, fullCommand, description, argumentHint, allowedTools, and filePath.