Back to Home
CLI Commands

Slash Commands

Use /cook, /code, and /test commands for structured AI-assisted development workflows

Overview

GemKit provides slash commands that trigger structured workflows for common development tasks. These commands are defined in .gemini/commands/ and orchestrate agents with predefined patterns for consistent, high-quality results.

Available Commands

CommandDescriptionUse Case
/cookImplement a feature step by stepNew features, guided implementation
/codeStart coding & testing an existing planExecute planned work
/testRun tests and analyze resultsTesting and coverage analysis

The /cook Command

The /cook command guides you through implementing a feature step by step. It's ideal when you want a structured, interactive approach to building new functionality.

Usage

bash
gk agent spawn -p "/cook implement a dark mode toggle"

Or within an agent session, simply type:

/cook implement user authentication with JWT

How It Works

  1. Understand - Analyzes the feature request and codebase context
  2. Plan - Creates a step-by-step implementation plan
  3. Implement - Guides you through each step with code generation
  4. Verify - Checks implementation against requirements

Example

bash
gk agent spawn -a code-executor \
  -s "frontend-development" \
  -p "/cook add a contact form with validation"

The agent will:

  • Research form best practices
  • Plan the component structure
  • Implement form fields with validation
  • Add error handling and success states
  • Guide you through testing

The /code Command

The /code command executes implementation when you already have a plan. It's optimized for following existing specifications or continuing planned work.

Usage

bash
gk agent spawn -p "/code implement the user dashboard from the plan"

How It Works

  1. Load Plan - Reads existing plan or specification
  2. Execute - Implements according to the plan
  3. Test - Runs tests to verify implementation
  4. Report - Summarizes what was completed

Example

bash
# First, create a plan
gk plan create user-dashboard

# Then execute with /code
gk agent spawn -a code-executor \
  -c plans/user-dashboard.md \
  -p "/code execute the implementation plan"

Difference from /cook

Aspect/cook/code
ApproachInteractive, step-by-stepDirect execution
Best forExploratory developmentPlanned implementation
GuidanceHigh - guides each stepLow - executes plan
InputFeature descriptionExisting plan/spec

The /test Command

The /test command runs tests and provides analysis of the results, including coverage reports and failure diagnostics.

Usage

bash
gk agent spawn -p "/test run the authentication tests"

How It Works

  1. Identify - Finds relevant test files
  2. Execute - Runs the test suite
  3. Analyze - Parses results and coverage
  4. Report - Provides actionable insights

Example

bash
gk agent spawn -a tester \
  -s "testing" \
  -p "/test analyze coverage gaps in the auth module"

Command Configuration

Commands are defined in .gemini/commands/ as TOML files:

markdown
.gemini/commands/
├── code.toml
├── cook.toml
├── test.toml
└── paste/

Command Structure

Each command TOML file defines:

  • Command name and description
  • Default agent to use
  • Required skills
  • Execution steps

Using Commands with Agents

Basic Usage

bash
# Use /cook with default settings
gk agent spawn -p "/cook add user registration"

# Use /code with specific agent and skills
gk agent spawn -a code-executor \
  -s "backend-development,testing" \
  -p "/code implement API endpoints"

# Use /test with context
gk agent spawn -a tester \
  -c src/services/auth.ts \
  -p "/test generate tests for auth service"

Combining Commands with Skills

bash
# Frontend feature with /cook
gk agent spawn -a code-executor \
  -s "frontend-development,frontend-design" \
  -p "/cook create a responsive navigation component"

# Backend implementation with /code
gk agent spawn -a code-executor \
  -s "backend-development" \
  -c plans/api-spec.md \
  -p "/code implement the REST API"

Best Practices

When to Use /cook

  • Building new features from scratch
  • Learning a new codebase
  • Exploratory development
  • When you want step-by-step guidance

When to Use /code

  • Executing well-defined plans
  • Following specifications
  • Batch implementation
  • CI/CD automated tasks

When to Use /test

  • After implementing features
  • Coverage analysis
  • Debugging test failures
  • Pre-commit verification

Creating Custom Commands

You can create custom commands by adding TOML files to .gemini/commands/:

toml
# .gemini/commands/review.toml
name = "review"
description = "Review code for best practices and issues"
agent = "researcher"
skills = ["backend-development", "testing"]

Then use it:

bash
gk agent spawn -p "/review check the authentication module"
Caught a mistake? Edit this page on GitHub
Updated: Jan 20, 2026