Productivity & Workflowβ¨geminiπuniversal
A poor person's plan mode for the Gemini CLI
Plan, review, build, and implement modes for the Gemini CLI
Quick Start
Install this Skill
npx skills add mystilleef/gemini-cli-modes# A poor person's plan mode for the Gemini CLI

**If you don't like Gemini eagerly or randomly modifying, or even
deleting, files in your projects, look no further.**
This project provides a set of custom commands and skills to enforce a
structured, mode-based workflow for the Gemini CLI agent. These modes
guide the agent through the distinct phases of a software engineering
taskβPerceive, Reason, Act, and Refine (`PRAR`)βensuring a safe,
deliberate, and verifiable process.
**Important:** _Assuming you have hooks properly installed, all sessions
begin in `readonly` mode._
## Core concepts: Operational modes
Each custom command transitions the Gemini CLI agent into a specific
**operational mode**, each with its own set of permissions and
protocols. The system relies on the `.gemini_readonly` marker file,
which enforces a "Safe-Default" `readonly` state, preventing accidental
modifications.
- **Read-Only Modes (`/readonly`):** Assuming you have hooks properly
installed, the agent starts all sessions in `readonly` mode. The mode
serves as a perfect base for investigation, analysis, and planning.
The system disables all file modification tools.
- **Write-Enabled Modes (`/writable`, `/build`, `/implement`):** Use
these set of commands to disable `readonly` mode and enable file
modification tools. These modes allow executing an approved plan. The
agent removes the `.gemini_readonly` marker and enables file
modification tools under strict protocols.
## Setup and installation
To use these custom modes, place the project files into your
`~/.gemini/` directory and configure your `settings.json` file.
### 1. Required directory structure
Place the files and directories from this project directly inside your
`~/.gemini/` directory. Your `~/.gemini/` folder should look like this:
```bash
~/.gemini/
βββ settings.json
βββ SYSTEM.md # Foundational operating principles
βββ GEMINI.md # Project-specific directives
βββ commands/
β βββ build.toml
β βββ implement.toml
β βββ plan.toml
β βββ readonly.toml
β βββ review.toml
β βββ writable.toml
βββ hooks/ # Enforcement and behavior hooks
β βββ disable-readonly-sessionend.sh # NEW: Clean session termination
β βββ enable-readonly-startup.sh
β βββ enforce-eprime.sh
β βββ enforce-readonly.sh
β βββ remind-readonly-dynamic.sh
βββ kbase/ # CONSOLIDATED: Unified knowledge base
β βββ GEMINI.md
β βββ agent-protocols.md
β βββ cloud-patterns.md
β βββ data-science-workflow.md
β βββ e-prime-protocol.md
β βββ engineering-principles.md
β βββ gemini-prompt-engineering.md
β βββ ui-ux-design.md
βββ skills/ # NEW: Skills-based architecture
βββ build-mode/
β βββ SKILL.md
βββ implement-mode/
β βββ SKILL.md
βββ plan-mode/
β βββ SKILL.md
βββ readonly-mode/
β βββ SKILL.md
β βββ scripts/
β βββ tests/
βββ review-mode/
β βββ SKILL.md
βββ write-mode/
βββ SKILL.md
βββ scripts/
βββ tests/
```
### 2. `settings.json` configuration
The `settings.json` file plays a crucial role for the Gemini CLI agent
to locate the `kbase` directory, enable the experimental skills feature,
configure hooks, and manage session lifecycle. Copy the settings in
`settings.json` from this project to your own in `~/.gemini/`. The file
includes:
- Experimental skills feature activation
- Tools hooks configuration (`enableHooks`)
- Context configuration for loading knowledge base
- Model configuration with custom aliases for temperature and output
control
- Hooks configuration (`hooksConfig`) to enable hook system
- Hook definitions for read-only enforcement and session lifecycle
**Key hooks configured:**
- `SessionStart`: Creates `.gemini_readonly` marker when session begins
- `BeforeAgent`: Injects `readonly` reminders and enforces E-Prime
communication protocol before agent execution
- `BeforeTool`: Blocks write operations (write, replace, shell commands,
file operations, etc.) when `.gemini_readonly` marker exists
- `SessionEnd`: Removes `.gemini_readonly` marker when session
terminates, ensuring clean exit state
The configuration follows this structure:
```json
{
"experimental": {
"skills": true
},
"tools": {
"enableHooks": true
},
"context": {
"loadMemoryFromIncludeDirectories": true,
"includeDirectories": ["~/.gemini/kbase"]
},
"modelConfigs": {
"customAliases": {
"base": {
"modelConfig": {
"generateContentConfig": {
"temperature": 0.1,
"topP": 0.95
}
}
},
"chat-base": {
"extends": "base",
"modelConfig": {
"generateContentConfig": {
"temperature": 0.2,
"topP": 0.9,
"topK": 1
}
}
... (truncated)Repository
8stars
1forks
Details
Related Skills
More productivity & workflow skills you might like
Excel Automation
Productivity & WorkflowExcel Automation: create workbooks, manage worksheets, read/write cell data, and format spreadsheets via Microsoft Excel and Google Sheets integration
β¨geminiπ€claudeπ¬gptβ¨οΈcursor
77.0k
9.1k
View
Attio Automation
Productivity & WorkflowAutomate Attio CRM operations -- search records, query contacts and companies with advanced filters, manage notes, list attributes, and navigate your relationship data -- using natural language through the Composio MCP integration.
β¨geminiπ€claudeπ¬gptβ¨οΈcursor
77.0k
9.1k
View
Ashby Automation
Productivity & WorkflowAutomate recruiting and hiring workflows in Ashby -- manage candidates, jobs, applications, interviews, and notes through natural language commands.
β¨geminiπ€claudeπ¬gptβ¨οΈcursor
77.0k
9.1k
View
Apify Automation
Productivity & WorkflowAutomate web scraping and data extraction with Apify -- run Actors, manage datasets, create reusable tasks, and retrieve crawl results through the Composio Apify integration.
β¨geminiπ€claudeπ¬gptβ¨οΈcursor
77.0k
9.1k
View