Answer: In a custom system prompt file, you can use variables to dynamically include built-in content: `${AgentSkills}` injects a complete section of all available agent skills, `${SubAgents}` injects a complete section of available sub-agents, `${AvailableTools}` injects a bulleted list of all currently enabled tool names, and tool name variables using the pattern `${toolName}_ToolName` inject the actual name of a tool. Status: Confirmed Entry: tool/gemini-cli/features/system-prompt-variable-substitution Revision: 1 Digest: sha256:a1024ca16438c66e (changes whenever the content changes) Timeline: Created: 2026-11-13T03:17:48Z Last changed: 2026-11-13T03:17:48Z Last verified: 2026-11-20T12:51:34Z Next check: 2026-11-21T12:51:34Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of AgentSkills variable | ${AgentSkills} | [1] | 2026-11-20 SubAgents variable | ${SubAgents} | [1] | 2026-11-20 AvailableTools variable | ${AvailableTools} | [1] | 2026-11-20 Tool name variable pattern | ${toolName}_ToolName | [1] | 2026-11-20 Sources: [1] Google. "System Prompt Override (GEMINI_SYSTEM_MD)". https://geminicli.com/docs/cli/system-prompt.md Role: primary. Accessed: 2026-11-20T12:51:34Z Quote: "`${AgentSkills}`: Injects a complete section (including header) of all" (Supports: AgentSkills variable) Quote: "`${SubAgents}`: Injects a complete section (including header) of available" (Supports: SubAgents variable) Quote: "`${AvailableTools}`: Injects a bulleted list of all currently enabled tool" (Supports: AvailableTools variable) Quote: "`${toolName}_ToolName` (for example, `${write_file_ToolName}`," (Supports: Tool name variable pattern) Published: 2026-10-16T02:36:07Z Snapshot SHA-256: f32d65071c659670145f560e83f6422561f6b5adaa7eb577b9172c320877265f (captured 2026-11-13T03:17:48Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:17:48Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:51:34Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:51:34Z Last attempt: 2026-11-20T12:51:34Z Notes and limitations: Extracted automatically from a single official source (section "Variable Substitution"). Related: https://latestn.com/tool/gemini-cli/features/task-statuses What task statuses can I set with Gemini CLI tracker tools? https://latestn.com/tool/gemini-cli/features/telemetry-logs-overview What logs does Gemini CLI emit for sessions, tools, and API calls? https://latestn.com/tool/gemini-cli/features/todo-in-progress-limit How many tasks can be in progress at once in Gemini CLI todos? https://latestn.com/tool/gemini-cli/features/rewind-options What options are available when rewinding in Gemini CLI? https://latestn.com/tool/gemini-cli/features/rewind-undo How do I undo a mistake or rewind in Gemini CLI? https://latestn.com/tool/gemini-cli/features/system-prompt-ui-indicator What does the UI indicator show when a custom system prompt is active in Gemini CLI? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:17:48Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/gemini-cli/features/system-prompt-variable-substitution/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/gemini-cli/features/system-prompt-variable-substitution POST: https://latestn.com/dispute/tool/gemini-cli/features/system-prompt-variable-substitution with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/gemini-cli/features/system-prompt-variable-substitution?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How does variable substitution work in a custom system prompt for Gemini CLI? Revision 1, last verified 2026-11-20T12:51:34Z. https://latestn.com/tool/gemini-cli/features/system-prompt-variable-substitution (accessed 2026-11-21T09:59:15Z). @misc{LatestN_tool_gemini_cli_features_system_prompt_variable_substitution_r1, title = {How does variable substitution work in a custom system prompt for Gemini CLI?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/gemini-cli/features/system-prompt-variable-substitution}}, note = {Revision 1; digest sha256:a1024ca16438c66e; last verified 2026-11-20T12:51:34Z; accessed 2026-11-21T09:59:15Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/gemini-cli/features/system-prompt-variable-substitution