Gemini CLI — Prompts
Two formats used:
- TOML commands (
.gemini/commands/): description + prompt fields; supports {{args}} placeholders and !{...} shell interpolations
- SKILL.md (
.gemini/skills/): YAML front-matter + Markdown body (identical format to Codex CLI skills)
Verbatim Excerpt 1: core.toml command (context injection pattern)
File: .gemini/commands/core.toml
description="Injects context of all relevant cli files"
prompt = """
The following output contains the complete
source code of packages/core.
**Pay extremely close attention to these files.** They define the project's
core architecture, component patterns, and testing standards.
The source code contains the content of absolutely every source code file in
packages/core.
You should very rarely need to read any other files from packages/core to resolve
prompts.
!{find packages/core \( -path packages/cli/dist -o -path packages/core/dist -o -name node_modules \) -prune -o -type f \( -name "*.ts" -o -name "*.tsx" \) ! -name "*.test.ts" ! -name "*.test.tsx" ! -name "*.d.ts" -exec echo "--- {} ---" \; -exec cat {} \;}
In addition to the code context, you MUST strictly adhere to the following frontend-specific development guidelines when writing code in packages/core.
...
{{args}}.
"""
Prompting technique: Shell-interpolation context injection (!{...}) — the entire source tree is concatenated into the prompt at invocation time. Bold emphasis on "Pay extremely close attention" forces priority. {{args}} is the user's task appended after the context dump.
Verbatim Excerpt 2: pr-creator skill (process enforcement)
File: .gemini/skills/pr-creator/SKILL.md (partial)
---
name: pr-creator
description:
Use this skill when asked to create a pull request (PR). It ensures all PRs
follow the repository's established templates and standards.
---
# Pull Request Creator
## Workflow
1. **Branch Management**: **CRITICAL:** Ensure you are NOT working on the `main` branch.
- Run `git branch --show-current`.
- If the current branch is `main`, you MUST create and switch to a new descriptive branch.
2. **Commit Changes**: Verify that all intended changes are committed. NEVER commit directly to `main`.
6. **Preflight Check**: Before creating the PR, run the workspace preflight script:
```bash
npm run preflight
Principles
- Safety First: NEVER push to
main. This is your highest priority.
- Compliance: Never ignore the PR template. It exists for a reason.
- Accuracy: Don't check boxes for tasks you haven't done.
**Prompting technique**: Imperative checklist with CRITICAL and NEVER keywords as iron-law constraints. Safety rail (branch check) is step 1. Principles section reiterates the top constraint in a separate section for emphasis — similar to superpowers' "Iron Law" pattern but in a skill rather than a session hook.
## GEMINI.md (project context file)
The `GEMINI.md` file functions like Claude Code's `CLAUDE.md` — it is automatically injected at session start to provide project context, conventions, and skill-invocation mandates.