The shared system prompt

A workspace's prompt is the sections its manifest lists in system_prompt, in that order. They come from your own identity, the shared core.toml library and plugins.

/core.toml is the shared library of eleven sections; write a name in use = [...] and system_prompt, and each row links to its full text on Prompts.

SectionWhat it tells the model
agent_scale_notePlan at agent speed: never shrink scope with human time estimates; propose the full plan and let the user prune it.
constitution_over_blueprintTreat a step list as advice: hold the goal and constraints, find a better path, open with the goal and how it was checked, and say when it deviated.
discover_dont_recallTake facts from the live system (the disk, a command, the web), not from the prompt, memory or training data. Verify a path before citing it.
prior_artBefore a non-trivial problem, send a background subagent to find what already exists, without blocking the work.
models_policyNever assume or hardcode which model is running. Give each subagent the cheapest tier that does the job, declared explicitly.
contributor_disciplineSmall changes that serve the current goal. No refactors outside scope unless asked.
comment_disciplineComments, docstrings and commit bodies say what the code is now, never its history. Two lines at most.
replace_dont_layerChange a feature by replacing it and updating every caller. No shims, _v2 copies or flags that keep the old path.
git_policyCommit verified work on the main branch and push at checkpoints without asking. Branches, pull requests, tags, releases and force-pushes only on request.
live_environment_policyAfter a verified commit, install the project’s own build. Edit this workspace’s manifest freely; leave other workspaces and vendored trees alone.
communicationCompact replies that lead with the answer or action. No preamble, filler or time estimates.

discover_dont_recall refers to a memory map that sc-memory injects; without that plugin the line has nothing to point at.

Compose a prompt for my workspace
import = [
  { from = "$SC_PROMPTS/core.toml", use = ["discover_dont_recall", "comment_discipline", "communication"] },
]

system_prompt = [
  "identity",
  "discover_dont_recall",
  "comment_discipline",
  "communication",
  "sc-memory:memory_protocol",
]

plugins = [
  "$SC_PLUGINS/sc-memory",
]

[section.identity]
content = """
<identity>
You own the billing service in ~/code/billing-api: its source and its tests. Deployment is out of scope.
</identity>
"""

Print what that renders, with a table of the sections you used and the ones you left out:

sc prompt --debug

Run it from the workspace directory, or use sc <project> <agent> --prompt from anywhere.

PartYou writeWhat it does
system_promptan ordered list of section namesIt is the whole prompt. sc passes it as --system-prompt, which replaces Claude Code’s default.
your own sections[section.<name>] with a content stringText only this workspace uses. Put identity first: what the agent owns, what it may touch, what is out of scope.
import{ from = "$SC_PROMPTS/core.toml", use = ["<section>", ...] }Makes library sections available by name.
plugin sections"<plugin>:<section>" in system_promptSections a plugin in your plugins list publishes. No import needed.

Three rules cover most mistakes:

  • Importing or defining a section does not render it; system_prompt has to name it. A loaded plugin’s inject sections are the exception (see “Use a plugin’s sections”).
  • Keep import, system_prompt, subagent_system_prompt and plugins above the first [section.*] header. In TOML, a key after a table header belongs to that table.
  • An if gate goes on a system_prompt entry, never on an import or a section: { ref = "<section>", if = { var = "model", contains = "qwen" } }.
Rename a section on the way in

A use entry can be a { name, as } table. The section then renders under the new name, which settles a clash when two libraries define the same name:

import = [
  { from = "$SC_PROMPTS/core.toml", use = ["git_policy", { name = "communication", as = "house_style" }] },
]

system_prompt = ["identity", "git_policy", "house_style"]

An alias may not contain :, which is reserved for plugin sections.

Gate a section by model

A gated entry renders only when the variable matches. contains takes a substring or a list of substrings (any one matches), and not_contains is the inverse:

system_prompt = [
  "identity",
  "communication",
  { ref = "open_weights_note", if = { var = "model", contains = ["qwen", "glm", "kimi"] } },
  { ref = "claude_only", if = { var = "model", not_contains = ["qwen", "glm", "kimi"] } },
]

model is the routed model slug on a gateway launch, else the --model value, else claude. Preview one branch with sc prompt --model qwen/x. superclaude.toml lists every variable a gate can read.

Give every subagent the same rules

subagent_system_prompt uses the same entries as system_prompt, but its result is appended to each subagent’s own prompt instead of replacing anything. It reaches every subagent the session starts and never the main agent. Write additive rules there, not an identity. A section may appear in both lists.

subagent_system_prompt = [
  "discover_dont_recall",
  "comment_discipline",
]
Use a plugin’s sections

A plugin can publish sections in a plugin.toml at its root. Once the plugin is in your plugins list, name a section as <plugin>:<section>, for example sc-memory:memory_protocol. Every plugin’s sections are listed under Plugin sections.

  • The namespace is the name in the plugin’s .claude-plugin/plugin.json, else its directory name.
  • A plugin’s inject = [...] sections render in the main prompt of every workspace that lists the plugin, after the manifest’s own sections. Gates are kept and subagents are untouched. Naming one in system_prompt only pins its position, and it is not added twice.
  • A section outside inject renders only where system_prompt names it. sc doctor reports dead-plugin-prose for a published section that is not in inject and never named.
  • Prompts marks each plugin section as default or opt-in, and shows any model condition it carries.
Install the library

sc system installs core.toml at $SC_PROMPTS/core.toml from the release, and replaces it on later releases for as long as you leave it unedited. The default path is ~/.superclaude/_global/shared/prompt/core.toml. Open the directory with sc edit prompt.

core.toml also removes EnterPlanMode and ExitPlanMode from the tool list of every workspace that imports it; delete the [harness] table from your own copy to restore them.

Once you edit core.toml, it is yours: sc system never overwrites it, and prints one line when a newer one is published. To take the new one, move your copy aside and re-run sc system. To keep your own sections and still get updates, put them in a separate library beside it (see “Write my own library”).

My sc is older than 0.2.1 and has no core.toml

An sc older than 0.2.1 does not install the library. A manifest that imports from a missing file fails to render, and the launch stops. Download it from the site:

mkdir -p ~/.superclaude/_global/shared/prompt
curl -fsSL https://superclaude.io/core.toml -o ~/.superclaude/_global/shared/prompt/core.toml

If you export $SC_PROMPTS, save it in that directory instead. If you set $SUPERCLAUDE_HOME, the default directory is $SUPERCLAUDE_HOME/_global/shared/prompt.

Write my own library

A library is a TOML file of [section.<name>] tables, each with a content string, and no system_prompt key. Without system_prompt, sc treats the file as content to import, not a workspace to launch. Save it beside core.toml and import it the same way:

import = [
  { from = "$SC_PROMPTS/core.toml", use = ["communication"] },
  { from = "$SC_PROMPTS/team.toml", use = ["review_rules"] },
]

Pointing sc validate at a library says so:

sc validate --spf ~/.superclaude/_global/shared/prompt/core.toml
sc: `~/.superclaude/_global/shared/prompt/core.toml` has no `system_prompt` — it's a library/preset, not a launchable leaf

Write each section body as one XML element named for what it governs. The tag is the heading the model sees, so sections compose in any order. The order of sections in the file does not matter; each manifest’s system_prompt sets the render order. In core.toml, five sections use a tag that differs from their name: agent_scale_note is <agent_scale>, constitution_over_blueprint is <climber>, discover_dont_recall is <live_truth>, models_policy is <models>, and contributor_discipline is <scope_discipline>.

Before you delete a section from a library, remove it from every manifest that imports it. An import that cannot resolve stops the launch.

Check that my prompt renders

sc validate renders the manifest once per model family and reports errors and lints. sc prompt prints the exact text.

sc validate
sc prompt --debug
OK     model=claude/default
OK     model=deepseek/x
OK     model=qwen/x
OK     model=glm/x
OK     model=kimi/x
OK     model=minimax/x

summary: 6 branch(es), 0 error(s), 0 warning(s)

Importing from a library that is not installed fails on every branch:

ERROR  model=claude/default: cannot open `~/.superclaude/_global/shared/prompt/core.toml`: No such file or directory (os error 2)

Importing a name the library does not define fails, and the error lists the names it does define:

ERROR  model=claude/default: import from `~/.superclaude/_global/shared/prompt/core.toml`: no section `harness_header` (available: agent_scale_note, constitution_over_blueprint, discover_dont_recall, prior_art, models_policy, contributor_discipline, comment_discipline, replace_dont_layer, git_policy, live_environment_policy, communication)

Listing a section in system_prompt that you never imported or defined fails with system_prompt ref `<name>` matches no section. Add --strict to make lint warnings exit non-zero as well. Every other manifest key is on superclaude.toml, and sc prompt example prints a commented reference manifest.

Next: Environment variables

View as Markdown