workflow-example
Critical Rules
- Never execute workflow logic here — this file only parses args and dispatches
- Step 0 always runs first — no exceptions
- Unknown verb → run help.md — never error silently
- Pass all remaining args through — workflow receives $REMAINING_ARGS unchanged
Step 0: Parse Arguments
The raw invocation args (filled by Claude Code / OpenCode slash commands): $ARGUMENTS. If this line is not filled in, read the verb and remaining args from the user's current message.
VERB="[first non-flag argument, or empty]"
REMAINING_ARGS="[everything after VERB]"
case "$VERB" in
"") VERB="help" ;;
"run") VERB="go" ;; # alias: /workflow-example run → go
esac
Step 1: Dispatch to Workflow
Read and execute references/workflows/{VERB}.md, passing $REMAINING_ARGS.
If references/workflows/{VERB}.md does not exist, fall back to references/workflows/help.md.
Workflow Index
- new (
references/workflows/example.md) — example workflow demonstrating the pattern - go (
references/workflows/example.md) — alias target for demonstration - help (
references/workflows/help.md) — print command reference