Slash Commands
Discover and use slash commands in DorkOS
Slash Commands
DorkOS discovers slash commands from your project's .claude/commands/ directory and makes them available through a command palette in the chat UI.
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. Optionally add arguments after the command name, then send the message.
Command Discovery
DorkOS scans .claude/commands/ recursively. Directory nesting creates namespaced commands using a namespace:command pattern:
This structure produces the following commands:
| File | Command |
|---|---|
docs/reconcile.md | /docs:reconcile |
docs/status.md | /docs:status |
spec/create.md | /spec:create |
spec/execute.md | /spec:execute |
commit.md | /commit |
Only .md files inside namespace subdirectories are discovered. Top-level files like commit.md are not currently picked up by the registry -- commands must be inside a 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 Code 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 friendly greeting
argument-hint: '[name]'
allowed-tools: Read, Bash
---
# Greeting Generator
Say hello to the user by name. Be friendly and enthusiastic.
EOFRefresh the command list
Click the refresh button in the command palette, or call the API with the refresh query parameter.
Refreshing Commands
The command registry caches results for performance. To refresh:
- Click the refresh button in the command palette
- Or call the API with
?refresh=true
The cache is also invalidated when the server restarts. During development, use the refresh button for the fastest feedback loop.
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.