System Prompt
Clawdia builds a custom system prompt for every agent run. The prompt is Clawdia-owned and does not use the p-coding-agent default prompt. The prompt is assembled by Clawdia and injected into each agent run.Structure
The prompt is intentionally compact and uses fixed sections:- Tooling: current tool list + short descriptions.
- Skills (when available): tells the model how to load skill instructions on demand.
- Clawdia Self-Update: how to run
config.applyandupdate.run. - Workspace: working directory (
agents.defaults.workspace). - Documentation: local path to Clawdia docs (repo or npm package) and when to read them.
- Workspace Files (injected): indicates bootstrap files are included below.
- Sandbox (when enabled): indicates sandboxed runtime, sandbox paths, and whether elevated exec is available.
- Current Date & Time: user-local time, timezone, and time format.
- Reply Tags: optional reply tag syntax for supported providers.
- Heartbeats: heartbeat prompt and ack behavior.
- Runtime: host, OS, node, model, repo root (when detected), thinking level (one line).
- Reasoning: current visibility level + /reasoning toggle hint.
Prompt modes
Clawdia can render smaller system prompts for sub-agents. The runtime sets apromptMode for each run (not a user-facing config):
full(default): includes all sections above.minimal: used for sub-agents; omits Skills, Memory Recall, Clawdia Self-Update, Model Aliases, User Identity, Reply Tags, Messaging, Silent Replies, and Heartbeats. Tooling, Workspace, Sandbox, Current Date & Time (when known), Runtime, and injected context stay available.none: returns only the base identity line.
promptMode=minimal, extra injected prompts are labeled Subagent
Context instead of Group Chat Context.
Workspace bootstrap injection
Bootstrap files are trimmed and appended under Project Context so the model sees identity and profile context without needing explicit reads:AGENTS.mdSOUL.mdTOOLS.mdIDENTITY.mdUSER.mdHEARTBEAT.mdBOOTSTRAP.md(only on brand-new workspaces)
agents.defaults.bootstrapMaxChars (default: 20000). Missing files inject a
short missing-file marker.
Internal hooks can intercept this step via agent:bootstrap to mutate or replace
the injected bootstrap files (for example swapping SOUL.md for an alternate persona).
To inspect how much each injected file contributes (raw vs injected, truncation, plus tool schema overhead), use /context list or /context detail. See Context.
Time handling
The system prompt includes a dedicated Current Date & Time section when the user timezone is known. To keep the prompt cache-stable, it now only includes the time zone (no dynamic clock or time format). Usesession_status when the agent needs the current time; the status card
includes a timestamp line.
Configure with:
agents.defaults.userTimezoneagents.defaults.timeFormat(auto|12|24)
Skills
When eligible skills exist, Clawdia injects a compact available skills list (formatSkillsForPrompt) that includes the file path for each skill. The
prompt instructs the model to use read to load the SKILL.md at the listed
location (workspace, managed, or bundled). If no skills are eligible, the
Skills section is omitted.
Documentation
When available, the system prompt includes a Documentation section that points to the local Clawdia docs directory (eitherdocs/ in the repo workspace or the bundled npm
package docs) and also notes the public mirror, source repo, community Discord, and
ClawdHub (https://clawdhub.com) for skills discovery. The prompt instructs the model to consult local docs first
for Clawdia behavior, commands, configuration, or architecture, and to run
clawdia status itself when possible (asking the user only when it lacks access).