output-style-engineering
Design and maintain Claude Code output styles: choosing the mechanism, setting the frontmatter, and writing the role, voice, and rules the style installs in the system prompt.
xobotyi · Static checks on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add xobotyi/cc-foundry --skill output-style-engineeringAbout this skill
name: output-style-engineering description: >- Design and maintain Claude Code output styles: choosing the mechanism, setting the frontmatter, and writing the role, voice, and rules the style installs in the system prompt. when_to_use: >- Invoke whenever an output style is touched at all — creating, editing, auditing, reviewing, or debugging one, or deciding whether a behavior change belongs in a style. Also invoke on the symptoms: a style has no effect, the register reverts to the default, one rule over-applies, or software-engineering assumptions leak into a non-coding domain. Covers the output-style artifact; the wording of its instructions belongs to prompt-engineering, and the skill artifact belongs to skill-engineering. compatibility: Uses Claude Code frontmatter beyond the Agent Skills spec (when_to_use)
An output style modifies the system prompt. It holds two powers no alternative has: it turns part of the default prompt off, and the harness reinforces it with adherence reminders through the conversation. Every other file-based mechanism only adds text, and then competes with the default it could not remove.
Choose the mechanism first
- Use a style when the role or the register must change and hold for a whole session. The body lives in the system prompt, so it survives compaction, and the harness reminders carry adherence without persistence prose in the body.
- Additive mechanisms stay additive. CLAUDE.md arrives as a user message after the system prompt, and
--append-system-promptappends for one session; neither removes the default the body is arguing with. A body that would work identically as CLAUDE.md content is not a style. - Route the rest away. A rule that must never break belongs in a hook — prose steers, the lifecycle mechanism enforces. A procedure a user invokes belongs in a skill. Work that needs an isolated context belongs in a subagent: a style governs the main conversation only, and a subagent runs its own system prompt, while a fork inherits the parent's prompt with the style included.
- A style shapes Claude's prose, not tool output. Bash output, file contents, and MCP results reach the user unchanged, so a format complaint about them is never a style defect.
# Tone and styleis never removable — the conciseness rule and the no-emoji rule included. A style that must beat those defaults states the behavior it wants, specifically enough that the more general default has nothing to contest. Specificity is what wins; a blanket precedence clause is not — see Never claim precedence over the prompt.
File format, frontmatter fields including force-for-plugin, storage paths and nested resolution, activation methods,
scope priority, the built-in catalog, the comparison against related features, and Agent SDK integration:
[${CLAUDE_SKILL_DIR}/references/spec.md]. Read it when writing the file, deciding where it lives, or loading a style
through the SDK.
Set keep-coding-instructions deliberately
- It gates exactly one section,
# Doing tasks— software-engineering task framing, scope discipline, comment policy, UI verification. Nothing else in the prompt responds to it. - Set
truewhen the style changes how Claude communicates and it still codes,falsewhen the style replaces coding with another domain. The default isfalse, so a tone-only style that omits the field drops the coding discipline without meaning to. - It removes no safety or tone guidance. Destructive-action caution and the conciseness rules sit in sections no
style touches, so
falseis never the way to reach them. - It is inert on lean-prompt models. Opus 4.8, Opus 5, and Fable 5 never receive
# Doing tasks, while Sonnet 5 and Haiku still get the classic prompt. A non-coding style must carry its own domain switch in the body rather than rely on removal, and stays unverified until it is tested on both paths. - Under
true, the body states deltas only. A body that restates scope discipline or comment policy duplicates the section it just kept. Own those rules underfalse, or state nothing about them undertrue.
The verbatim gated text, the sections the flag cannot touch, the model roster for each prompt path, and the
re-derivation procedure for a newer build: [${CLAUDE_SKILL_DIR}/references/coding-instructions.md]. Read it when the
body may duplicate the gated section, or when the flag's effect on a specific model is in question.
Verify injection before editing the body
- Injection can fail silently while the picker still shows the style active. Add a marker rule, run
claude -p "say ok"— a fresh session, because the style is fixed at session start — confirm the marker fires, then remove it. Until the canary passes, the body being edited is not in the prompt and no behavioral result means anything.
The file skeleton, the creation workflow, and the four style patterns — direct professional, domain specialist,
interaction mode, learning — with the keep-coding-instructions value each one needs:
[${CLAUDE_SKILL_DIR}/references/creation.md]. Read it before drafting, because the pattern decides the structure.
Frame the role and the voice
- State the role as outcome and perspective, never as credentials. "You review designs for operational risk; the reader is the on-call engineer" tells the model what to optimize for. "World-class architect with 12+ years" adds nothing and over-constrains.
- Pin the register with five to seven sentences of adjective contrast — "