DorkOS
Guides

Slash Commands

Turn a task you do often into one word you type, and learn how to write your own

Slash Commands

Slash commands turn a multi-step task you do often into one word you type once. Type / in the chat, pick a command, and DorkOS handles the rest, whether that command lives in your project, on your machine, or built into the agent itself.

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.

Most commands in the palette get inserted into the chat and sent to the agent to act on. A few, like /rename, are native: DorkOS runs them locally, right in your browser, and never sends them to the agent at all. You won't notice the difference day to day (both show up in the same palette), but if a command seems to do nothing "in the chat," that's often why: it already did its job without a round trip.

Three commands that work on every agent

DorkOS runs agents on several runtimes (Claude Code, Codex and OpenCode), and each runtime has its own word for the same everyday actions. DorkOS gives you one word for each, so the command your fingers already know keeps working no matter which runtime a chat uses. Type any of the aliases below and DorkOS runs the right action.

Type this…or any of theseWhat happens
/compact/compress, /summarizeShrinks the chat so you free up room to keep working.
/clear/new, /new-chatStarts a fresh chat in the same project; the new chat records where it came from.
/context/usage, /cost, /stats, /statusShows how much context you've used and what it has cost so far.

The palette lists one row per action, so an agent's own word for it never shows up twice. Type an alias and you'll see a small "matched /…" note telling you which action you're about to run.

/clear and /context happen right in your browser, with no round trip to the agent. /compact asks the agent to do the shrinking, because only the agent can compact its own memory. If the agent you're on can't compact, its /compact row is greyed out and marked "Not supported," and typing it just tells you why, instead of quietly sending it as a message.

You can add instructions after /compact to guide what the agent keeps — for example, /compact focus on the API changes. Claude Code follows them. Codex and OpenCode don't take instructions when they compact, so on those two the chat still shrinks but the extra words are ignored.

When the agent asks for it

An agent doesn't have to wait for you to type /compact. When its chat is nearly full, it can ask for the same thing with its compact_my_session tool. A few rules keep this safe:

  • It never happens in the middle of a reply. The chat is summarized after the agent's current reply ends, and before anything you queued behind it. That holds for replies started by another agent or a scheduled task too. If the chat stays busy for half an hour, the request is dropped and the agent can ask again.
  • It only touches the agent's own chat. The tool has no way to name another one.
  • At most once an hour for each chat.
  • You can see it. The chat shows a line like "Summarized at 89% (asked by the agent)", and the line is still there when you reopen the chat later.

Before asking, the agent is told to save what it needs (open work, chat IDs, decisions it's waiting on) to its memory, because a summary leaves out detail for good.

When a chat passes 80% of its room, DorkOS adds one short note to the agent's next reply suggesting it do exactly that. The agent gets the note once, and gets it again only after the chat has been summarized and filled back up.

This works on Claude Code, Codex and OpenCode. The agent's note about what to keep is used on Claude Code only, for the same reason as above. The note at 80% works on all three too. OpenCode's usage report doesn't say how big a chat can get, so DorkOS looks that up in OpenCode's own model list. For a model that list doesn't size, there's no note. Codex set to its older exec mode can't summarize on request at all, so agents there aren't offered the tool.

To stop an agent from asking at all, open its Permissions page and set Own chat to Blocked. Only you can change that setting, and the note at 80% stops mentioning the tool for that agent.

The /flow command family

/flow is the unified workflow engine: one PM-agnostic spine that runs your work from capture to done, no detours. You drive it by hand, one stage at a time, with a command per stage. Each /flow:<stage> command is a thin trigger over a stage skill; the top-level /flow orchestrator routes a stage, a work item, or the autonomous drain.

The stages run in order. The human-review gate after VERIFY has no command: it is the point where you look at the work before it advances.

StageCommandWhat it does
CAPTURE/flow:captureLog a thought as a low-commitment work item
TRIAGE/flow:triageClassify and route the item, simple-vs-complex
IDEATE/flow:ideateShape a brief into a structured ideation artifact
SPECIFY/flow:specifyTurn ideation into a validated specification
DECOMPOSE/flow:decomposeBreak the spec into tasks and mirror them to the tracker
EXECUTE/flow:executeImplement the spec in an isolated worktree
VERIFY/flow:verifyVerify the work, gather proof, hand off to review
REVIEW(human gate)You review before the item advances; no command
DONE/flow:doneReport completion, close the item, check follow-ups

Three more commands sit beside the spine. They observe or steer, never advance a stage:

CommandWhat it does
/flow:statusOne pane: in-flight items, parked questions, the assumption trail
/flow:pauseHalt every autonomous mode at once
/flow:resumeRestore what pause halted

The stage and operator commands live in the flow/ namespace, so they appear in the palette as /flow:capture, /flow:status, and so on. /flow itself is the orchestrator entry point that routes among them. To run the whole loop autonomously, see Turning on the automatic loop.

Command Discovery

The palette shows more than your project's commands. It also includes built-in commands like /compact, /help, and /clear, plus any commands you've defined on your machine in ~/.claude/commands/, plus your project's own skills. The agent itself supplies this full list; DorkOS's project scanner then adds a couple of extra details, like which tools a command is allowed to use, for any command backed by a file in your project.

Your project commands live in .claude/commands/. A file directly inside that folder becomes a top-level command, and a file inside a named subfolder becomes a namespaced command using a namespace:command pattern:

greet.md
reconcile.md
status.md
specify.md
execute.md
FileCommand
greet.md/greet
docs/reconcile.md/docs:reconcile
docs/status.md/docs:status
flow/specify.md/flow:specify
flow/execute.md/flow:execute

A command file at the top level of commands/ (no subfolder) appears in the palette with no namespace prefix, like /greet. Put it inside a named subfolder instead, and it appears as namespace:command, like /docs:reconcile.

Reference: command file format

Most people never touch frontmatter directly. A command works fine with just a description and, optionally, an argument-hint. Here is the full format, for when you want more control over how your own command behaves.

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
---

# 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/mytools

Write 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.
EOF

Refresh the command list

DorkOS caches the discovered commands for 5 minutes (a server restart also clears the cache). To see a new command right away, click the refresh button in the command palette, or call the API with ?refresh=true.

Reference: API

# List all discovered commands
curl http://localhost:4242/api/commands

# Force refresh the command cache
curl http://localhost:4242/api/commands?refresh=true

The response includes a lastScanned timestamp and an array of commands, each with namespace, command, fullCommand, description, argumentHint, aliases (other names that also trigger this command, like /cost and /stats both meaning /usage), allowedTools, and filePath.

Next Steps