Skip to main content
Gemini CLI runs skills inline within a single context window. While it doesn’t support true sub-agent delegation, the structured SDD workflow still provides significant value for planning and implementation.

Prerequisites

  • Gemini CLI installed and configured
  • Git installed for cloning the repository
  • Access to ~/.gemini/ directory
  • GEMINI_SYSTEM_MD=1 environment variable set

Installation Steps

1

Clone the repository

2

Run the installer

This copies skills to ~/.gemini/skills/sdd-*/You should see output like:
3

Configure system prompt

Gemini CLI requires the system prompt to be enabled via environment variable.Add to your shell profile (~/.bashrc, ~/.zshrc, etc.):
Apply changes:
4

Add orchestrator to GEMINI.md

Open or create the Gemini system prompt file:
If the file doesn’t exist, create it. This file contains system-level instructions for Gemini CLI.
Append the contents from examples/gemini-cli/GEMINI.md to your existing file.
The orchestrator section teaches Gemini CLI to:
  • Detect SDD triggers and commands
  • Read skill files from ~/.gemini/skills/sdd-*/SKILL.md
  • Execute skills inline (within current context)
  • Track state between phases
  • Follow artifact storage policies
Key sections added:
  • Operating Mode (delegate-only principle)
  • Artifact Store Policy
  • Commands table
  • Command → Skill Mapping
  • Engram Artifact Convention
5

Verify installation

Start Gemini CLI in any project:
Type:
Expected response:

Configuration Locations

Skills Directory

~/.gemini/skills/sdd-*/Contains 9 skill folders + _shared/ conventions

System Prompt

~/.gemini/GEMINI.mdOrchestrator instructions and system configuration

Environment

~/.gemini/.envMust contain GEMINI_SYSTEM_MD=1

How Inline Execution Works

Unlike Claude Code or OpenCode, Gemini CLI doesn’t have a Task tool for sub-agent delegation. Instead: Key differences:
  • Skills run in the same context window as the orchestrator
  • No fresh context per phase (more context usage)
  • Still provides structured workflow and artifact management
  • Planning phases work well; implementation may hit context limits on large features

Example Usage

Initialize SDD

Start a New Feature

Fast-Forward Planning

Artifact Storage

System Prompt Setup

Gemini CLI requires the system prompt to be explicitly enabled:

Option 1: Environment Variable (Global)

Add to shell profile:

Option 2: .env File (Per-Session)

Create or edit ~/.gemini/.env:

Verify System Prompt is Loaded

If loaded correctly, Gemini should reference the orchestrator instructions from GEMINI.md.

Verification Checklist

1

Check skills are installed

Should show 9 directories:
2

Check shared conventions

Should show:
3

Verify GEMINI.md exists

Should return matches if orchestrator instructions are present.
4

Check environment variable

Should output: 1
5

Test SDD command

Should recognize the command and read the sdd-init skill.

Troubleshooting

Problem: Gemini doesn’t recognize /sdd-initSolutions:
  1. Check GEMINI_SYSTEM_MD=1 is set: echo $GEMINI_SYSTEM_MD
  2. Verify ~/.gemini/GEMINI.md contains SDD orchestrator instructions
  3. Restart terminal session to reload environment variables
  4. Try alternative phrasing: “Initialize SDD for this project”
Problem: Gemini can’t read skill filesSolutions:
  1. Verify skills are in ~/.gemini/skills/sdd-*/
  2. Check file permissions allow reading
  3. Ensure each skill has SKILL.md file
  4. Try absolute path in orchestrator instructions
Problem: Orchestrator instructions not activeSolutions:
  1. Set environment variable: export GEMINI_SYSTEM_MD=1
  2. Add to shell profile for persistence
  3. Verify ~/.gemini/GEMINI.md exists and is readable
  4. Restart Gemini CLI after making changes
Problem: Errors about context length on large featuresSolutions:
  1. Use /sdd-explore first to understand scope before committing
  2. Break large features into smaller changes
  3. Use none artifact mode to reduce context usage
  4. Consider using Claude Code or OpenCode for large features (true sub-agents)

Limitations vs Claude Code/OpenCode

For the best sub-agent experience with fresh context windows, consider using Claude Code or OpenCode.

Next Steps

Quick Start

Learn the SDD workflow

Commands Reference

Complete command documentation

Engram Setup

Install recommended persistence

Upgrade to OpenCode

Get true sub-agent support