Commands
Learn how to use slash commands to trigger automated workflows with Lia in your SaaS Boilerplate project.
By the end of this guide, you'll understand how to use slash commands with Lia to automate development workflows in your SaaS Boilerplate project.
What Are Commands in Code Agents?
Commands are custom slash commands (like /setup or /create-command) that trigger specific automated workflows in AI code agents. When you type a slash command in your chat with Lia, she executes a predefined sequence of actions designed to accomplish complex development tasks.
In modern code agents (Cursor, VS Code Copilot, Claude Code, etc.), commands provide a way to create "shortcuts" for frequently used workflows. Instead of describing what you want to do in natural language each time, you can use a command to trigger a specific, well-defined process.
How Commands Work
When you interact with Lia, she automatically recognizes slash commands and executes the corresponding workflow. These commands influence:
- Project Setup: Environment configuration and dependency management
- Code Generation: Automated creation of components, pages, and features
- Quality Assurance: Testing, validation, and documentation workflows
- Development Automation: Streamlined processes for common tasks
Commands in SaaS Boilerplate
The SaaS Boilerplate includes a comprehensive set of commands organized in the .rulesync/commands/ directory. These commands are specifically designed for multi-tenant SaaS applications built with modern web technologies.
File Structure
.rulesync/commands/
├── init.md # Personalized project onboarding
├── setup.md # Environment configuration and dependencies
├── create-command.md # Custom command creation workflow
├── create-rule.md # Custom rule creation workflow
├── docs.md # Documentation generation and management
└── task.md # Complete feature development lifecycleAvailable Commands
| Command | Description |
|---|---|
/init | Start personalized project onboarding and setup guidance |
/setup | Guide through complete environment configuration and dependency installation |
/create-command | Create new custom slash commands with proper structure and validation |
/create-rule | Create new rules for training Lia and automating workflows |
/docs | Generate and manage project documentation automatically |
/task | Guide through complete feature development lifecycle from planning to deployment |
Using Commands
To use a command, simply type it in your chat with Lia:
Start a chat with Lia
Open your preferred code editor and start a chat with Lia.
Follow the guidance
Lia will guide you through any required prompts and questions.
Review results
Once complete, review the generated files, code changes, or other outputs.
Creating Custom Commands
To create a new custom command for your project, you have two options: using the /create-command command for guided creation, or manually creating the command file.
Use the /create-command command in your chat with Lia to create a new command interactively.
Define the command details
Lia will guide you through:
- Command name: The slash command (e.g.,
/my-custom-workflow) - Purpose: What the command should accomplish
- Workflow steps: The sequence of actions to execute
- Validation rules: How to ensure the command works correctly
Test and finalize
Lia will create the command file and allow you to test it before finalizing.
Create the command file manually in the .rulesync/commands/ directory.
Create the command file
Create a new Markdown file in .rulesync/commands/ with a descriptive name:
touch .rulesync/commands/my-custom-command.mdAdd the command structure
Use this template as a starting point:
---
description: "Custom command for [specific purpose]"
---
# /my-custom-command
## Overview
[Explain what this command does and when to use it]
## Workflow Steps
1. [Step 1 description]
2. [Step 2 description]
3. [Additional steps as needed]
## Validation
[How to verify the command worked correctly]
## Integration Points
[How this command works with other commands or rules]Customize the command
Replace the placeholders with your specific requirements:
- Update the
descriptionin the frontmatter - Define clear workflow steps that Lia can follow
- Include validation criteria
- Document integration points with existing commands
Troubleshooting
Integration with Rules
Commands work seamlessly with rules to provide comprehensive automation:
- Setup Commands: Use environment rules for configuration
- Development Commands: Apply coding standards and patterns
- Testing Commands: Follow validation and quality rules
- Documentation Commands: Use documentation standards