Instruction assembly reader

Gemini CLI system-prompt architecture

Promptcred maps Gemini CLI's documented instruction assembly across the exportable or replaceable base prompt, dynamic capability substitutions, hierarchical GEMINI.md context, and harness-level tool controls.

Documentation-derived analysis Gemini CLI instruction assembly · reviewed August 11, 2026

Publication context

Read the provenance first

No exported or runtime prompt was collected. The page maps first-party documentation and preserves the distinction between built-in prompt, override, dynamic substitutions, and project context.

Source tier
Tier A · vendor-published
Confidence
high
Reviewed
Aug 11, 2026
Completeness
partial
Checksum
sha256:8afca99720239…
Raw artifact
No prompt artifact available

Promptcred analysis

What the instruction record establishes

Interpretation stays within the selected artifact, mapped sections, and stated publication limits.

Instruction architecture

  • The documented assembly separates the built-in prompt, a full replacement file, injected capability names, hierarchical GEMINI.md context, and harness security controls.
  • Because the override replaces the built-in prompt, a custom file must carry any default instruction the workflow still needs.
  • A useful configuration-review sequence is to identify the built-in prompt or its replacement, account for dynamic capability substitutions, locate applicable GEMINI.md scopes, and then verify harness controls. This is a Promptcred mental model, not a documented serialization order.

Evidence: Built-in prompt export and override, Dynamic skills, subagents, and tools, GEMINI.md context hierarchy, Tools, security, and confirmation

Practical lessons for professional users

  • Review an exported default before replacing it, and carry forward any instruction the custom prompt still requires.
  • Put project guidance at the narrowest appropriate GEMINI.md scope and verify active tools, confirmation, and sandbox settings for the run.
  • For a repository migration, compare the exported default with the proposed replacement, keep repository conventions in workspace GEMINI.md, and review enabled tools and confirmation settings before file or shell work. This is a review procedure, not evidence of an observed session.

Evidence: Built-in prompt export and override, GEMINI.md context hierarchy, Tools, security, and confirmation

What can and cannot safely be inferred

Supported by this record

  • Official documentation establishes prompt export and replacement, dynamic capability substitution, scoped GEMINI.md context, and confirmation-aware tools.

Outside this record

  • It does not establish one universal runtime prompt, one fixed model, all enabled tools, the exact final instruction order, or the effective configuration of a particular session.

Evidence: Built-in prompt export and override, Dynamic skills, subagents, and tools, GEMINI.md context hierarchy, Tools, security, and confirmation

Official documentation synthesis

Official-source prompt architecture

A documentation-derived map of the base prompt, full replacement, dynamic capabilities, scoped GEMINI.md context, and harness-level tool controls.

01

Built-in prompt export and override

editorial normalization
Editorial normalization:
Gemini CLI documents a complete built-in system-prompt override through GEMINI_SYSTEM_MD and a separate GEMINI_WRITE_SYSTEM_MD workflow for exporting the current default prompt for review.

Reading note. The override is a replacement rather than a merge; Promptcred does not execute either environment-variable workflow.

02

Dynamic skills, subagents, and tools

source led map
Source-led map:
Custom system prompts can dynamically include available agent skills, subagents, and tool names. The resolved instruction assembly therefore depends on enabled capabilities.

Reading note. A static base file alone is not enough to describe every runtime assembly.

03

GEMINI.md context hierarchy

editorial normalization
Editorial normalization:
Global, workspace, and just-in-time GEMINI.md files provide hierarchical project context. They are distinct from the base system prompt and may load at different scopes.

Reading note. The documentation separates stable operational instructions from evolving project and task strategy.

04

Tools, security, and confirmation

editorial normalization
Editorial normalization:
Gemini CLI evaluates tool requests against security policies; file mutation and shell execution require confirmation, while sandboxing and trusted folders add execution boundaries.

Reading note. The permission boundary is enforced by the CLI harness, not only by prompt wording.

Evidence and provenance

Tier A · vendor-published: Gemini CLI system-prompt override documentation — Vendor documentation supports a Tier A architecture record and a limited prompt-intelligence page.

Tier A · vendor-published: Gemini CLI GEMINI.md context documentation — Vendor-published documentation supports the project-context claims.

Tier A · vendor-published: Gemini CLI tools reference — Vendor-published documentation supports the capability and confirmation record.

Snapshot evidence

What this snapshot includes and leaves out.

Product surface
Gemini CLI
Model context
Configurable Gemini modelThe selected documentation describes the CLI instruction architecture rather than pinning one universal model snapshot.
Checksum scope
Four-section source-led instruction-assembly map; UTF-8, LF line endings.
Raw mode
The CLI can export its current default prompt, but Promptcred does not run that workflow or present the result as an immutable universal artifact.

Available pages

Search Promptcred

Type to search available pages.