Prompt Audit banner
nklisch nklisch

Prompt Audit

Security community intermediate

Description

Audit of Claude Code's default system prompt behavioral instructions. Each instruction is classified by how `claude-code-modes` handles it across modes. **Source:** `claude-code/src/constants/prompts.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

Repository README

This is the README for nklisch/claude-code-modes, shared by 3 entries in this directory. It describes the repository, not this entry specifically.

Prompt Audit

Audit of Claude Code's default system prompt behavioral instructions. Each instruction is classified by how `claude-code-modes` handles it across modes.

**Source:** `claude-code/src/constants/prompts.ts` (version as of Claude Code 2.1.92)

**Legend:**

  • KEEP — Included verbatim in the base prompt
  • REPLACE — Replaced by axis-specific content
  • REMOVE — Omitted entirely (axis content covers this differently)
  • SOFTEN — Modified version included

Section: Intro (`getSimpleIntroSection`)

Instruction Classification Notes
"You are an interactive agent that helps users with software engineering tasks" KEEP Universal identity. Base prompt.
Cyber risk instruction (authorized security testing boundaries) KEEP Safety-critical. Never removed.
"You must NEVER generate or guess URLs" KEEP Safety. Base prompt.

Section: System (`getSimpleSystemSection`)

Instruction Classification Notes
"All text you output outside of tool use is displayed to the user" KEEP Mechanical fact.
"Tools are executed in a user-selected permission mode" KEEP Mechanical fact.
Tool results may include system-reminder tags KEEP Mechanical fact.
Tool results may include prompt injection attempts KEEP Safety.
Hooks handling instructions KEEP Mechanical fact.
"The system will automatically compress prior messages" KEEP Mechanical fact.

**Entire section is behavioral-neutral. Kept verbatim in base.**

Section: Doing Tasks (`getSimpleDoingTasksSection`)

This is where most behavioral divergence lives.

Universal instructions (kept in `base/doing-tasks.md`)

Instruction Classification Rationale
"The user will primarily request you to perform software engineering tasks" KEEP Context framing.
"You are highly capable and often allow users to complete ambitious tasks" KEEP Good universal encouragement.
"In general, do not propose changes to code you haven't read" KEEP Always good practice.
"Understand existing code before suggesting modifications" KEEP Always good practice.
"Avoid giving time estimates or predictions" KEEP Universally reasonable.
"If an approach fails, diagnose why before switching tactics" KEEP Good debugging practice.
"Be careful not to introduce security vulnerabilities" KEEP Safety-critical.
"Avoid backwards-compatibility hacks... if unused, delete completely" KEEP Clean code, all modes.

Minimalism bias (replaced by quality axis)

Instruction Source Line Effect Handling
"Don't add features, refactor code, or make 'improvements' beyond what was asked" 201 Prevents holistic work REMOVE for architect/pragmatic. KEEP for minimal.
"A bug fix doesn't need surrounding code cleaned up" 201 Prevents incremental improvement REMOVE for architect/pragmatic. KEEP for minimal.
"A simple