argument_substitution
How user-provided arguments are injected into command templates. Mechanisms vary: $ARGUMENTS, {{args}}, positional $1/$2/${@:N}, and other interpolation syntaxes.
Type: object Content type: commands
Provider Support
Section titled “Provider Support”| Provider | Supported | Mechanism |
|---|---|---|
| claude-code | ✓ | $ARGUMENTS (all args), $ARGUMENTS[N] (Nth arg), $N (positional), ${CLAUDE_SESSION_ID} and other env vars; shared with skills argument substitution |
| factory-droid | ✓ | $ARGUMENTS substitution in Markdown-type commands expands to text typed after the command name; argument-hint frontmatter field provides autocomplete usage hint; executable commands receive arguments as positional shell parameters |
| gemini-cli | ✓ | {{args}} placeholder injects all user-provided arguments; processed before shell injection (!{...}) and other substitutions; default argument handling collapses newlines |
| opencode | ✓ | Commands support $ARGUMENTS (all arguments as a single string) and positional parameters $1, $2, $3, etc. for individual arguments; all placeholders are substituted from user input at invocation time |
| pi | ✓ | positional expansion: $1, $2 (specific positions), $@ or $ARGUMENTS (all args joined), ${@:N} (args from position N), ${@:N:L} (L args starting at N); richer syntax than most providers |
| roo-code | ✓ | argument-hint frontmatter field documents expected arguments; user-supplied arguments are appended to the command body at invocation time |
| amp | ✗ | not documented |
| cline | ✗ | Workflow markdown files are plain prompt templates with no documented argument-substitution placeholder (no {{args}} or equivalent) |
| codex | ✗ | no implementation details captured; only source is a redirect stub to external docs — cannot confirm argument substitution support |
| copilot-cli | ✗ | built-in slash commands accept literal positional arguments (e.g. /add-dir PATH, /skills info SKILL-NAME) but Copilot CLI does not document a user-authored custom-command mechanism with template-substitution syntax (no $ARGUMENTS, $1/$2, or {{args}} interpolation) |
| crush | ✗ | not documented |
| cursor | ✗ | not documented |
| kiro | ✗ | not documented |
| windsurf | ✗ | Cascade Workflows are plain Markdown prompt templates; no `{{args}}` or equivalent placeholder syntax is documented for user-provided arguments |
| zed | ✗ | not documented |