packages/kilo-docs/pages/customize/workflows.md
Workflows (also called slash commands in the new extension) automate repetitive tasks by defining step-by-step instructions for Kilo Code to execute.
{% image src="/docs/img/screenshot-tests/kilo-vscode/visual-regression/settings/agent-behaviour-workflows-chromium-linux.png" alt="Workflows tab in Kilo Code" width="420" caption="Workflows tab in Kilo Code" /%}
{% tabs %} {% tab label="VSCode" %}
Workflows are Markdown files stored as slash commands in .kilo/commands/:
~/.config/kilo/commands/ (available in all projects)[project]/.kilo/commands/ (project-specific).md file with step-by-step instructions/command-name in the chat (just the filename without .md extension) to executeFor example, a file at .kilo/commands/submit-pr.md is invoked with /submit-pr.
Command files can include YAML frontmatter:
---
description: Submit a pull request with checks
agent: code
---
You are helping submit a pull request...
| Field | Description |
|---|---|
description | Shown in the command picker |
agent | Which agent to use when invoking this command |
model | Model override for this command |
subtask | When true, runs as a sub-agent session |
Workflows can leverage all built-in tools: read, glob, grep, edit, write, bash, webfetch, and MCP server tools.
The new extension automatically migrates legacy workflows from .kilocode/workflows/ to the new command format on startup. You can also manually move files and remove the .md extension from invocations.
{% /tab %} {% tab label="VSCode (Legacy)" %}
Workflows are markdown files stored in .kilocode/workflows/:
~/.kilocode/workflows/ (available in all projects)[project]/.kilocode/workflows/ (project-specific).md file with step-by-step instructions/filename.md to executeWorkflows can leverage:
read_file(), search_files(), execute_command()gh, docker, npm, custom scriptsnew_task() for specialized contexts{% /tab %} {% /tabs %}
Release Management
1. Gather merged PRs since last release
2. Generate changelog from commit messages
3. Update version numbers
4. Create release branch and tag
5. Deploy to staging environment
Project Setup
1. Clone repository template
2. Install dependencies (`npm install`, `pip install -r requirements.txt`)
3. Configure environment files
4. Initialize database/services
5. Run initial tests
Code Review Preparation
1. Search for TODO comments and debug statements
2. Run linting and formatting
3. Execute test suite
4. Generate PR description from recent commits
Let's walk through creating a workflow for submitting a pull request.
{% tabs %} {% tab label="VSCode" %}
Create a file called submit-pr.md in your .kilo/commands directory:
---
description: Submit a pull request with full checks
---
# Submit PR Workflow
You are helping submit a pull request. Follow these steps:
1. First, use `grep` to check for any TODO comments or console.log statements that shouldn't be committed
2. Run tests using `bash` with `npm test` or the appropriate test command
3. If tests pass, stage and commit changes with a descriptive commit message
4. Push the branch and create a pull request using `bash` with `gh pr create`
5. Use `question` to get the PR title and description from the user
Parameters needed (ask if not provided):
- Branch name
- Reviewers to assign
Trigger this workflow by typing /submit-pr in the chat.
{% /tab %} {% tab label="VSCode (Legacy)" %}
Create a file called submit-pr.md in your .kilocode/workflows directory:
# Submit PR Workflow
You are helping submit a pull request. Follow these steps:
1. First, use `search_files` to check for any TODO comments or console.log statements that shouldn't be committed
2. Run tests using `execute_command` with `npm test` or the appropriate test command
3. If tests pass, stage and commit changes with a descriptive commit message
4. Push the branch and create a pull request using `gh pr create`
5. Use `ask_followup_question` to get the PR title and description from the user
Parameters needed (ask if not provided):
- Branch name
- Reviewers to assign
Trigger this workflow by typing /submit-pr.md in the chat.
{% /tab %} {% /tabs %}
Kilo Code will:
This saves you from manually running the same steps every time you want to submit code for review.