Commands
Create reusable slash commands for repetitive workflows.
Custom commands let you run reusable prompt templates with a short slash command.
Example:
/testYou can define commands in config JSON or in markdown files.
Where Commands Live
- Project scope:
.alphabase/commands/*.md - Global scope:
~/.config/alphabase/commands/*.md - Config-based:
commandsection inalphabase.json/alphabase.jsonc
Project commands are ideal for team workflows committed to Git. Global commands are ideal for personal utilities.
Markdown Command Example
Create .alphabase/commands/test.md:
---description: Run tests and summarize failuresagent: buildmodel: <provider>/<model-id>---
Run the project test suite.Summarize failures first, then propose the smallest safe fix set.Run it:
/testJSON Command Example
{ "$schema": "https://alphabase.ai/config.json", "command": { "test": { "description": "Run tests and summarize failures", "template": "Run the project test suite. Summarize failures first, then propose the smallest safe fix set.", "agent": "build", "model": "<provider>/<model-id>" } }}Arguments
Use $ARGUMENTS for all user-provided text.
Use $1, $2, $3 for positional arguments.
---description: Create a component---
Create a new component named $1 using the style conventions in $2.Run:
/component Button docs/ui-guidelines.mdShell Output Injection
Use !\command“ to include command output in prompt context.
---description: Review latest commits---
Recent commits:!`git log --oneline -10`
Review these commits and flag risks or regressions.File References
Use @path/to/file to include file contents.
---description: Review API handler---
Review @packages/api/src/handler.ts for reliability and error handling gaps.Frontmatter Fields
Supported command metadata fields:
description: short label shown in command UIagent: optional agent overridemodel: optional model override in<provider>/<model-id>format
Best Practices
- Keep commands focused on one outcome.
- Prefer deterministic wording for repeatability.
- Commit team commands to
.alphabase/commands/. - Keep personal commands in global config.
- Avoid embedding secrets or tokens in command templates.