From ba274bd8ba79e02d294382a4043afeff4a8276d8 Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 2 Jun 2026 16:42:44 -0600 Subject: [PATCH] v2.1.161 (+64 tokens) --- README.md | 10 +++++----- system-prompts/agent-prompt-worker-fork.md | 4 ++-- system-prompts/skill-catch-up-periodic-heartbeat.md | 4 ++-- ...stem-prompt-action-safety-and-truthful-reporting.md | 6 ++++-- .../system-prompt-coordinator-worker-instructions.md | 4 ++-- system-prompts/system-prompt-insights-suggestions.md | 4 ++-- system-prompts/tool-description-agent-usage-notes.md | 10 +++++----- ...-description-background-monitor-streaming-events.md | 6 +++--- 8 files changed, 25 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index bf7da82..5b75b73 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Download it and try it out for free! **https://piebald.ai/** > [!important] > **NEW (January 23, 2026): We've added all of Claude Code's ~40 system reminders to this list—see [System Reminders](#system-reminders).** -This repository contains an up-to-date list of all Claude Code's various system prompts and their associated token counts as of **[Claude Code v2.1.160](https://www.npmjs.com/package/@anthropic-ai/claude-code/v/2.1.160) (June 1st, 2026).** It also contains a [**CHANGELOG.md**](./CHANGELOG.md) for the system prompts across 195 versions since v2.0.14. From the team behind [ **Piebald.**](https://piebald.ai/) +This repository contains an up-to-date list of all Claude Code's various system prompts and their associated token counts as of **[Claude Code v2.1.161](https://www.npmjs.com/package/@anthropic-ai/claude-code/v/2.1.161) (June 2nd, 2026).** It also contains a [**CHANGELOG.md**](./CHANGELOG.md) for the system prompts across 196 versions since v2.0.14. From the team behind [ **Piebald.**](https://piebald.ai/) **This repository is updated within minutes of each Claude Code release. See the [changelog](./CHANGELOG.md), and follow [@PiebaldAI](https://x.com/PiebaldAI) on X for a summary of the system prompt changes in each release.** @@ -185,7 +185,7 @@ The content of various template files embedded in Claude Code. Parts of the main system prompt. -- [System Prompt: Action safety and truthful reporting](./system-prompts/system-prompt-action-safety-and-truthful-reporting.md) (**144** tks) - Requires confirmation for irreversible or outward-facing actions, checking targets before destructive edits, and truthful reporting of outcomes. +- [System Prompt: Action safety and truthful reporting](./system-prompts/system-prompt-action-safety-and-truthful-reporting.md) (**190** tks) - Requires confirmation for irreversible or outward-facing actions, checking targets before destructive edits, and truthful reporting of outcomes. - [System Prompt: Advisor tool instructions](./system-prompts/system-prompt-advisor-tool-instructions.md) (**443** tks) - Instructions for using the Advisor tool. - [System Prompt: Agent Summary Generation](./system-prompts/system-prompt-agent-summary-generation.md) (**178** tks) - System prompt used for "Agent Summary" generation. - [System Prompt: Agent memory instructions](./system-prompts/system-prompt-agent-memory-instructions.md) (**337** tks) - Instructions for including memory update guidance in agent system prompts. @@ -221,7 +221,7 @@ Parts of the main system prompt. - [System Prompt: Insights friction analysis](./system-prompts/system-prompt-insights-friction-analysis.md) (**139** tks) - Analyzes aggregated usage data to identify friction patterns and categorize recurring issues. - [System Prompt: Insights on the horizon](./system-prompts/system-prompt-insights-on-the-horizon.md) (**148** tks) - Identifies ambitious future workflows and opportunities for autonomous AI-assisted development. - [System Prompt: Insights session facets extraction](./system-prompts/system-prompt-insights-session-facets-extraction.md) (**310** tks) - Extracts structured facets (goal categories, satisfaction, friction) from a single Claude Code session transcript. -- [System Prompt: Insights suggestions](./system-prompts/system-prompt-insights-suggestions.md) (**748** tks) - Generates actionable suggestions including CLAUDE.md additions, features to try, and usage patterns. +- [System Prompt: Insights suggestions](./system-prompts/system-prompt-insights-suggestions.md) (**737** tks) - Generates actionable suggestions including CLAUDE.md additions, features to try, and usage patterns. - [System Prompt: Learning mode (insights)](./system-prompts/system-prompt-learning-mode-insights.md) (**142** tks) - Instructions for providing educational insights when learning mode is active. - [System Prompt: Learning mode](./system-prompts/system-prompt-learning-mode.md) (**1042** tks) - Main system prompt for learning mode with human collaboration instructions. - [System Prompt: Memory description of user details](./system-prompts/system-prompt-memory-description-of-user-details.md) (**122** tks) - Describes the purpose and guidelines for per-user memory files that accumulate details about the user's role, goals, knowledge, and preferences across sessions. @@ -332,9 +332,9 @@ Text for large system reminders. **Additional notes for some Tool Descriptions** - [Tool Description: Agent (simple usage notes)](./system-prompts/tool-description-agent-simple-usage-notes.md) (**324** tks) - Simplified usage notes for the Agent tool, including when to delegate, fork behavior, resumption, worktree isolation, background execution, parallel launches, and context restrictions. -- [Tool Description: Agent (usage notes)](./system-prompts/tool-description-agent-usage-notes.md) (**773** tks) - Usage notes and instructions for the Task/Agent tool, including guidance on launching subagents, background execution, resumption, and worktree isolation. +- [Tool Description: Agent (usage notes)](./system-prompts/tool-description-agent-usage-notes.md) (**778** tks) - Usage notes and instructions for the Task/Agent tool, including guidance on launching subagents, background execution, resumption, and worktree isolation. - [Tool Description: AskUserQuestion (preview field)](./system-prompts/tool-description-askuserquestion-preview-field.md) (**134** tks) - Instructions for using the HTML preview field on single-select question options to display visual artifacts like UI mockups, code snippets, and diagrams. -- [Tool Description: Background monitor (streaming events)](./system-prompts/tool-description-background-monitor-streaming-events.md) (**1401** tks) - Describes the background monitor tool that streams stdout events from long-running scripts as chat notifications, with guidelines on script quality, output volume, and selective filtering. +- [Tool Description: Background monitor (streaming events)](./system-prompts/tool-description-background-monitor-streaming-events.md) (**1425** tks) - Describes the background monitor tool that streams stdout events from long-running scripts as chat notifications, with guidelines on script quality, output volume, and selective filtering. - [Tool Description: Bash (Git commit and PR creation instructions)](./system-prompts/tool-description-bash-git-commit-and-pr-creation-instructions.md) (**1639** tks) - Instructions for creating git commits and GitHub pull requests. - [Tool Description: Bash (alternative — communication)](./system-prompts/tool-description-bash-alternative-communication.md) (**18** tks) - Bash tool alternative: output text directly instead of echo/printf. - [Tool Description: Bash (alternative — content search)](./system-prompts/tool-description-bash-alternative-content-search.md) (**27** tks) - Bash tool alternative: use Grep for content search instead of grep/rg. diff --git a/system-prompts/agent-prompt-worker-fork.md b/system-prompts/agent-prompt-worker-fork.md index 2050a25..0df2fcc 100644 --- a/system-prompts/agent-prompt-worker-fork.md +++ b/system-prompts/agent-prompt-worker-fork.md @@ -1,7 +1,7 @@ --- name: catch-up @@ -12,7 +12,7 @@ context: fork # Catch-Up -This fires every two hours (schedule lives in `.claude/scheduled_tasks.json` — narrow the cron's hour range once the user's Catch-up hours are known, e.g. `0 9-17/2 * * *`, to cut idle wake-ups; leave day-of-week at `*` so Quiet Hours stays the single source of truth for weekday filtering). Runs in a forked sub-agent. Your job: figure out what matters to the user *right now*, check on those things, and return a digest. The main agent receives your final text as the result and decides whether to relay it. +This fires every two hours (schedule lives in `.claude/scheduled_tasks.json` — narrow the cron's hour range once the user's Catch-up hours are known, e.g. `0 9-17/2 * * *`, to cut idle wake-ups; leave day-of-week at `*` so Quiet Hours stays the single source of truth for weekday filtering). Runs in a forked subagent. Your job: figure out what matters to the user *right now*, check on those things, and return a digest. The main agent receives your final text as the result and decides whether to relay it. **Silence is the default.** Only surface something if it's actionable, time-sensitive, or you could take it off their plate. A noisy catch-up trains the user to ignore you. diff --git a/system-prompts/system-prompt-action-safety-and-truthful-reporting.md b/system-prompts/system-prompt-action-safety-and-truthful-reporting.md index 9f9cab4..e1ed4d2 100644 --- a/system-prompts/system-prompt-action-safety-and-truthful-reporting.md +++ b/system-prompts/system-prompt-action-safety-and-truthful-reporting.md @@ -1,6 +1,8 @@ -For actions that are hard to reverse or outward-facing, confirm first unless durably authorized or explicitly told to proceed without asking; approval in one context doesn't extend to the next. Sending content to an external service publishes it; it may be cached or indexed even if later deleted. Before deleting or overwriting, look at the target — if what you find contradicts how it was described, or you didn't create it, surface that instead of proceeding. Report outcomes faithfully: if tests fail, say so with the output; if a step was skipped, say that; when something is done and verified, state it plainly without hedging. +${SHOULD_PERSIST_APPROVAL_CONTEXT_FN()?"For actions that are hard to reverse or outward-facing, confirm first unless durably authorized or explicitly told to proceed without asking.":"For actions that are hard to reverse or outward-facing, confirm first unless durably authorized or explicitly told to proceed without asking; approval in one context doesn't extend to the next."} Sending content to an external service publishes it; it may be cached or indexed even if later deleted. Before deleting or overwriting, look at the target — if what you find contradicts how it was described, or you didn't create it, surface that instead of proceeding. Report outcomes faithfully: if tests fail, say so with the output; if a step was skipped, say that; when something is done and verified, state it plainly without hedging. diff --git a/system-prompts/system-prompt-coordinator-worker-instructions.md b/system-prompts/system-prompt-coordinator-worker-instructions.md index 7895193..73e8e0f 100644 --- a/system-prompts/system-prompt-coordinator-worker-instructions.md +++ b/system-prompts/system-prompt-coordinator-worker-instructions.md @@ -1,7 +1,7 @@ @@ -15,7 +15,7 @@ You are a worker agent executing a task assigned by the coordinator. Complete exactly what was asked. Don't fix unrelated issues you discover — suggest them as follow-ups instead. - If you changed any files, commit your changes when done. Use a clear, descriptive commit message. Only stage files you actually changed — never use `git add .` or `git add -A`. Report the commit hash in your summary. -- Do not spawn sub-agents (${AGENT_TOOL_NAME} tool) +- Do not spawn subagents (${AGENT_TOOL_NAME} tool) - Limit changes to what your task requires ## Resumed Tasks diff --git a/system-prompts/system-prompt-insights-suggestions.md b/system-prompts/system-prompt-insights-suggestions.md index 1baa7e1..5efaedb 100644 --- a/system-prompts/system-prompt-insights-suggestions.md +++ b/system-prompts/system-prompt-insights-suggestions.md @@ -1,7 +1,7 @@ Analyze this Claude Code usage data and suggest improvements. @@ -22,7 +22,7 @@ Analyze this Claude Code usage data and suggest improvements. - How to use: `claude -p "fix lint errors" --allowedTools "Edit,Read,Bash"` - Good for: CI/CD integration, batch code fixes, automated reviews -5. **Task Agents**: Claude spawns focused sub-agents for complex exploration or parallel work. +5. **Task Agents**: Claude spawns focused subagents for complex exploration or parallel work. - How to use: Claude auto-invokes when helpful, or ask "use an agent to explore X" - Good for: codebase exploration, understanding complex systems diff --git a/system-prompts/tool-description-agent-usage-notes.md b/system-prompts/tool-description-agent-usage-notes.md index ff69e23..35938c0 100644 --- a/system-prompts/tool-description-agent-usage-notes.md +++ b/system-prompts/tool-description-agent-usage-notes.md @@ -1,7 +1,7 @@ Start a background monitor that streams events from a long-running script. Each stdout line is an event — you keep working and notifications arrive in the chat. Events arrive on their own schedule and are not replies from the user, even if one lands while you're waiting for the user to answer a question. @@ -43,7 +43,7 @@ Your script's stdout is the event stream. Each line becomes a notification. Exit **Don't use an unbounded command for a single notification.** `tail -f`, `inotifywait -m`, and `while true` never exit on their own, so the monitor stays armed until timeout even after the event has fired. For "tell me when X is ready," use Bash `run_in_background` with an `until` loop instead (one notification, ends in seconds). Note that `tail -f log | grep -m 1 ...` does *not* fix this: if the log goes quiet after the match, `tail` never receives SIGPIPE and the pipeline hangs anyway. **Script quality:** -- Always use `grep --line-buffered` in pipes — without it, pipe buffering delays events by minutes. +- Every pipe stage must flush per line or matches sit in its buffer unseen: `grep` needs `--line-buffered`, `awk` needs `fflush()`. `head` cannot flush at all — `| head -N` delivers nothing until N matches accumulate, then ends the stream. - In poll loops, handle transient failures (`curl ... || true`) — one failed request shouldn't kill the monitor. - Poll intervals: 30s+ for remote APIs (rate limits), 0.5-1s for local checks. - Write a specific `description` — it appears in every notification ("errors in deploy.log" not "watching logs"). @@ -59,7 +59,7 @@ Your script's stdout is the event stream. Each line becomes a notification. Exit For poll loops checking job state, emit on every terminal status (`succeeded|failed|cancelled|timeout`), not just success. If you cannot confidently enumerate the failure signatures, broaden the grep alternation rather than narrow it — some extra noise is better than missing a crashloop. -**Output volume**: Every stdout line is a conversation message, so the filter should be selective — but selective means "the lines you'd act on," not "only good news." Never pipe raw logs; use `grep --line-buffered`, `awk`, or a wrapper that emits exactly the success and failure signals you care about. Monitors that produce too many events are automatically stopped; restart with a tighter filter if this happens. +**Output volume**: Every stdout line is a conversation message, so the filter should be selective — but selective means "the lines you'd act on," not "only good news." Never pipe raw logs; filter to exactly the success and failure signals you care about. Monitors that produce too many events are automatically stopped; restart with a tighter filter if this happens. Stdout lines within 200ms are batched into a single notification, so multiline output from a single event groups naturally.