Skip to main content

Slash

Crewship loads any *.md file under ~/.crewship/commands/ as a top-level command. Each file is parsed for YAML frontmatter (name, description, vars, agent, effort, plan) and a markdown body that’s rendered against positional args and $args. The wiring (cmd/crewship/cmd_slash.go) plus the admin surface (cmd/crewship/cmd_slash_admin.go) make this practical. Naming-collision policy: built-in commands always win. A slash file that would shadow ask, run, tui, etc. is skipped with a [slash] <name> shadows built-in command — skipping warning rather than silently masking. Loader failures (missing dir, malformed file) degrade to warnings — the CLI keeps working without user-defined commands. The admin surface lives under crewship slash:

crewship slash list

Lists loaded slash commands with name, description, agent override, and source file.

crewship slash init

Scaffolds ~/.crewship/commands/ and writes a sample review.md. If the sample already exists, leaves it alone (Sample already exists at <path> — leaving it alone).
The sample looks like:
Once saved, you invoke it like a built-in: crewship review staged 'auth refactor'.

Frontmatter fields

$args in the body is replaced with everything the user typed after the command name. Variables from vars: are bound positionally in order.

See also

  • crewship prompt — local prompt library, lower-cost than a full slash command.
  • crewship ask — the dispatch target for every slash command.
  • crewship plan — what plan: true in frontmatter activates.