AI Disruption

AI Disruption

Share this post

AI Disruption
AI Disruption
Craft AI Coding Workflows: Gemini CLI Slash Commands

Craft AI Coding Workflows: Gemini CLI Slash Commands

Enhance dev workflows using Gemini CLI's custom slash commands. Create code reviews, tests, docs & more via TOML files. Supports user/project-level scopes & namespacing.

Meng Li's avatar
Meng Li
Aug 04, 2025
∙ Paid
7

Share this post

AI Disruption
AI Disruption
Craft AI Coding Workflows: Gemini CLI Slash Commands
5
Share

"AI Disruption" Publication 7300 Subscriptions 20% Discount Offer Link.


Google's Gemini CLI is Here to Assist Developers for Free

Custom slash commands are now standard in CLIs, allowing for quick preset workflow construction.

The latest version of Gemini CLI has also added support, which can now be implemented through TOML files or MCP.

Using Gemini CLI custom slash commands involves two steps: Description and invocation. The rule is that the filename becomes the command name.

Like Claude Code, scopes can be defined: User-level commands: Create .toml files in the ~/.gemini/commands/ directory

Project-level commands: Create .toml files in the .gemini/commands/ directory.

Naming convention: Filename becomes the command name, supports namespacing like git/commit.toml becomes /git:commit

Custom slash command examples:

Simple Code Review Command

# ~/.gemini/commands/review.toml
description = "Review specified code files or directories"
prompt = """
Please review the quality of the following code: {{args}}
Focus on:
1. Code readability and maintainability
2. Potential performance issues
3. Security issues
4. Best practice recommendations
Please provide specific improvement suggestions.
"""

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Meng Li
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share