From f636ff2f4cffadef6f8289ccb55a1717faf4980a Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 28 May 2026 10:25:27 -0600 Subject: [PATCH] v2.1.154 (+11,516 tokens) --- README.md | 52 +++---- .../agent-prompt-claude-guide-agent.md | 3 +- ...for-autonomous-agent-actions-first-part.md | 15 +- ...or-autonomous-agent-actions-second-part.md | 12 +- .../agent-prompt-simplify-slash-command.md | 41 ++++++ system-prompts/data-anthropic-cli.md | 25 +++- .../data-claude-api-reference-curl.md | 6 +- .../data-claude-api-reference-go.md | 6 +- .../data-claude-api-reference-python.md | 34 ++++- .../data-claude-api-reference-typescript.md | 40 +++++- ...-claude-code-live-documentation-sources.md | 67 +++++++++ ...ta-claude-code-recent-changes-reference.md | 42 ++++++ system-prompts/data-claude-model-catalog.md | 27 ++-- .../data-http-error-codes-reference.md | 12 +- .../data-managed-agents-reference-python.md | 8 +- ...ata-managed-agents-reference-typescript.md | 8 +- ...data-prompt-caching-design-optimization.md | 26 +++- .../data-streaming-reference-python.md | 4 +- .../data-streaming-reference-typescript.md | 4 +- system-prompts/data-tool-use-concepts.md | 4 +- system-prompts/skill-agent-design-patterns.md | 4 +- ...ng-llm-powered-applications-with-claude.md | 35 ++--- .../skill-claude-code-configuration-guide.md | 51 +++++++ system-prompts/skill-model-migration-guide.md | 129 ++++++++++++++++-- ...-prompt-background-session-instructions.md | 5 +- ...m-prompt-coordinator-mode-orchestration.md | 6 +- .../tool-description-askuserquestion.md | 8 +- .../tool-description-bash-sandbox-tmpdir.md | 4 +- system-prompts/tool-description-workflow.md | 15 +- 29 files changed, 552 insertions(+), 141 deletions(-) create mode 100644 system-prompts/agent-prompt-simplify-slash-command.md create mode 100644 system-prompts/data-claude-code-live-documentation-sources.md create mode 100644 system-prompts/data-claude-code-recent-changes-reference.md create mode 100644 system-prompts/skill-claude-code-configuration-guide.md diff --git a/README.md b/README.md index b8ab0c0..7df1f29 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.153](https://www.npmjs.com/package/@anthropic-ai/claude-code/v/2.1.153) (May 27th, 2026).** It also contains a [**CHANGELOG.md**](./CHANGELOG.md) for the system prompts across 189 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.154](https://www.npmjs.com/package/@anthropic-ai/claude-code/v/2.1.154) (May 28th, 2026).** It also contains a [**CHANGELOG.md**](./CHANGELOG.md) for the system prompts across 190 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.** @@ -100,6 +100,7 @@ Sub-agents and utilities. - [Agent Prompt: /review-pr slash command](./system-prompts/agent-prompt-review-pr-slash-command.md) (**235** tks) - System prompt for reviewing GitHub pull requests with code analysis. - [Agent Prompt: /schedule slash command](./system-prompts/agent-prompt-schedule-slash-command.md) (**3130** tks) - Guides the user through scheduling, updating, listing, or running remote Claude Code agents on cron triggers via the Anthropic cloud API. - [Agent Prompt: /security-review slash command](./system-prompts/agent-prompt-security-review-slash-command.md) (**2521** tks) - Comprehensive security review prompt for analyzing code changes with focus on exploitable vulnerabilities. +- [Agent Prompt: /simplify slash command](./system-prompts/agent-prompt-simplify-slash-command.md) (**362** tks) - Instructions for the /simplify slash command that reviews changed code for reuse, simplification, efficiency, and altitude cleanups, then applies the fixes. #### Utilities @@ -108,7 +109,7 @@ Sub-agents and utilities. - [Agent Prompt: Background job agent instructions](./system-prompts/agent-prompt-background-job-agent-instructions.md) (**427** tks) - Instructs the built-in background job agent to narrate progress, restate tool results, and emit explicit result, needs input, or failed status signals. - [Agent Prompt: Bash command description writer](./system-prompts/agent-prompt-bash-command-description-writer.md) (**207** tks) - Instructions for generating clear, concise command descriptions in active voice for bash commands. - [Agent Prompt: Bash command prefix detection](./system-prompts/agent-prompt-bash-command-prefix-detection.md) (**823** tks) - System prompt for detecting command prefixes and command injection. -- [Agent Prompt: Claude guide agent](./system-prompts/agent-prompt-claude-guide-agent.md) (**734** tks) - System prompt for the claude-guide agent that helps users understand and use Claude Code, the Claude Agent SDK and the Claude API effectively. +- [Agent Prompt: Claude guide agent](./system-prompts/agent-prompt-claude-guide-agent.md) (**833** tks) - System prompt for the claude-guide agent that helps users understand and use Claude Code, the Claude Agent SDK and the Claude API effectively. - [Agent Prompt: Coding session title generator](./system-prompts/agent-prompt-coding-session-title-generator.md) (**271** tks) - Generates a title for the coding session. - [Agent Prompt: Conversation summarization](./system-prompts/agent-prompt-conversation-summarization.md) (**1201** tks) - System prompt for creating detailed conversation summaries. - [Agent Prompt: Determine which memory files to attach](./system-prompts/agent-prompt-determine-which-memory-files-to-attach.md) (**271** tks) - Agent for determining which memory files to attach for the main agent. @@ -124,8 +125,8 @@ Sub-agents and utilities. - [Agent Prompt: Quick PR creation](./system-prompts/agent-prompt-quick-pr-creation.md) (**986** tks) - Streamlined prompt for creating a commit and pull request with pre-populated context. - [Agent Prompt: Quick git commit](./system-prompts/agent-prompt-quick-git-commit.md) (**574** tks) - Streamlined prompt for creating a single git commit with pre-populated context. - [Agent Prompt: Recent Message Summarization](./system-prompts/agent-prompt-recent-message-summarization.md) (**804** tks) - Agent prompt used for summarizing recent messages. -- [Agent Prompt: Security monitor for autonomous agent actions (first part)](./system-prompts/agent-prompt-security-monitor-for-autonomous-agent-actions-first-part.md) (**3370** tks) - Instructs Claude to act as a security monitor that evaluates autonomous coding agent actions against block/allow rules to prevent prompt injection, scope creep, and accidental damage. -- [Agent Prompt: Security monitor for autonomous agent actions (second part)](./system-prompts/agent-prompt-security-monitor-for-autonomous-agent-actions-second-part.md) (**4227** tks) - Defines the environment context, block rules, and allow exceptions that govern which tool actions the agent may or may not perform. +- [Agent Prompt: Security monitor for autonomous agent actions (first part)](./system-prompts/agent-prompt-security-monitor-for-autonomous-agent-actions-first-part.md) (**3658** tks) - Instructs Claude to act as a security monitor that evaluates autonomous coding agent actions against block/allow rules to prevent prompt injection, scope creep, and accidental damage. +- [Agent Prompt: Security monitor for autonomous agent actions (second part)](./system-prompts/agent-prompt-security-monitor-for-autonomous-agent-actions-second-part.md) (**4999** tks) - Defines the environment context, block rules, and allow exceptions that govern which tool actions the agent may or may not perform. - [Agent Prompt: Session search](./system-prompts/agent-prompt-session-search.md) (**158** tks) - Subagent prompt for searching past Claude Code conversation sessions by scanning .jsonl transcript files and returning matching session IDs. - [Agent Prompt: Session title and branch generation](./system-prompts/agent-prompt-session-title-and-branch-generation.md) (**307** tks) - Agent for generating succinct session titles and git branch names. - [Agent Prompt: WebFetch summarizer](./system-prompts/agent-prompt-webfetch-summarizer.md) (**189** tks) - Prompt for agent that summarizes verbose output from WebFetch for the main model. @@ -137,23 +138,25 @@ Sub-agents and utilities. The content of various template files embedded in Claude Code. -- [Data: Anthropic CLI](./system-prompts/data-anthropic-cli.md) (**2930** tks) - Reference documentation for the ant CLI covering installation, authentication, command structure, input and output shaping, managed agents workflows, and scripting patterns. +- [Data: Anthropic CLI](./system-prompts/data-anthropic-cli.md) (**3438** tks) - Reference documentation for the ant CLI covering installation, authentication, command structure, input and output shaping, managed agents workflows, and scripting patterns. - [Data: Assistant voice and values template](./system-prompts/data-assistant-voice-and-values-template.md) (**454** tks) - Template content for an assistant.md file describing Claude's voice, values, and communication style. - [Data: Claude API reference — C#](./system-prompts/data-claude-api-reference-c.md) (**4710** tks) - C# SDK reference including installation, client initialization, basic requests, streaming, and tool use. - [Data: Claude API reference — Go](./system-prompts/data-claude-api-reference-go.md) (**4521** tks) - Go SDK reference. - [Data: Claude API reference — Java](./system-prompts/data-claude-api-reference-java.md) (**4732** tks) - Java SDK reference including installation, client initialization, basic requests, streaming, and beta tool use. - [Data: Claude API reference — PHP](./system-prompts/data-claude-api-reference-php.md) (**3691** tks) - PHP SDK reference. -- [Data: Claude API reference — Python](./system-prompts/data-claude-api-reference-python.md) (**4499** tks) - Python SDK reference including installation, client initialization, basic requests, thinking, and multi-turn conversation. +- [Data: Claude API reference — Python](./system-prompts/data-claude-api-reference-python.md) (**4909** tks) - Python SDK reference including installation, client initialization, basic requests, thinking, and multi-turn conversation. - [Data: Claude API reference — Ruby](./system-prompts/data-claude-api-reference-ruby.md) (**1094** tks) - Ruby SDK reference including installation, client initialization, basic requests, streaming, and beta tool runner. -- [Data: Claude API reference — TypeScript](./system-prompts/data-claude-api-reference-typescript.md) (**3030** tks) - TypeScript SDK reference including installation, client initialization, basic requests, thinking, and multi-turn conversation. -- [Data: Claude API reference — cURL](./system-prompts/data-claude-api-reference-curl.md) (**2201** tks) - Raw API reference for Claude API for use with cURL or else Raw HTTP. +- [Data: Claude API reference — TypeScript](./system-prompts/data-claude-api-reference-typescript.md) (**3477** tks) - TypeScript SDK reference including installation, client initialization, basic requests, thinking, and multi-turn conversation. +- [Data: Claude API reference — cURL](./system-prompts/data-claude-api-reference-curl.md) (**2220** tks) - Raw API reference for Claude API for use with cURL or else Raw HTTP. +- [Data: Claude Code live documentation sources](./system-prompts/data-claude-code-live-documentation-sources.md) (**1380** tks) - WebFetch URLs for fetching current Claude Code documentation from official sources. +- [Data: Claude Code recent changes reference](./system-prompts/data-claude-code-recent-changes-reference.md) (**528** tks) - Reference mapping of recently removed or renamed Claude Code commands, flags, and terms to their current replacements. - [Data: Claude Platform on AWS reference](./system-prompts/data-claude-platform-on-aws-reference.md) (**1158** tks) - Reference documentation for using the Claude Developer Platform through AWS infrastructure, including AnthropicAWS clients, required region and workspace configuration, SigV4 authentication, and short-term API keys. -- [Data: Claude model catalog](./system-prompts/data-claude-model-catalog.md) (**2315** tks) - Catalog of current and legacy Claude models with exact model IDs, aliases, context windows, and pricing. +- [Data: Claude model catalog](./system-prompts/data-claude-model-catalog.md) (**2507** tks) - Catalog of current and legacy Claude models with exact model IDs, aliases, context windows, and pricing. - [Data: Files API reference — Python](./system-prompts/data-files-api-reference-python.md) (**1360** tks) - Python Files API reference including file upload, listing, deletion, and usage in messages. - [Data: Files API reference — TypeScript](./system-prompts/data-files-api-reference-typescript.md) (**797** tks) - TypeScript Files API reference including file upload, listing, deletion, and usage in messages. - [Data: GitHub Actions workflow for @claude mentions](./system-prompts/data-github-actions-workflow-for-claude-mentions.md) (**525** tks) - GitHub Actions workflow template for triggering Claude Code via @claude mentions. - [Data: GitHub App installation PR description](./system-prompts/data-github-app-installation-pr-description.md) (**409** tks) - Template for PR description when installing Claude Code GitHub App integration. -- [Data: HTTP error codes reference](./system-prompts/data-http-error-codes-reference.md) (**2399** tks) - Reference for HTTP error codes returned by the Claude API with common causes and handling strategies. +- [Data: HTTP error codes reference](./system-prompts/data-http-error-codes-reference.md) (**2508** tks) - Reference for HTTP error codes returned by the Claude API with common causes and handling strategies. - [Data: Live documentation sources](./system-prompts/data-live-documentation-sources.md) (**4075** tks) - WebFetch URLs for fetching current Claude API and Agent SDK documentation from official sources. - [Data: Managed Agents client patterns](./system-prompts/data-managed-agents-client-patterns.md) (**2685** tks) - Reference guide of common client-side patterns for driving Managed Agent sessions, including stream reconnection, idle-break gating, tool confirmations, interrupts, and custom tools. - [Data: Managed Agents core concepts](./system-prompts/data-managed-agents-core-concepts.md) (**3988** tks) - Reference documentation for the Managed Agents API covering core concepts (Agents, Sessions, Environments, Containers), lifecycle, versioning, endpoints, and usage patterns. @@ -164,17 +167,17 @@ The content of various template files embedded in Claude Code. - [Data: Managed Agents multiagent sessions](./system-prompts/data-managed-agents-multiagent-sessions.md) (**1839** tks) - Reference documentation for Managed Agents multiagent sessions, including coordinator rosters, threads, session stream events, subagent tool permissions, and pitfalls. - [Data: Managed Agents outcomes](./system-prompts/data-managed-agents-outcomes.md) (**1772** tks) - Reference documentation for Managed Agents outcomes, including user.define_outcome events, rubrics, outcome evaluation events, deliverables, and interaction rules. - [Data: Managed Agents overview](./system-prompts/data-managed-agents-overview.md) (**2786** tks) - Provides the agent with a comprehensive overview of the Managed Agents API architecture, mandatory agent-then-session flow, beta headers, documentation reading guide, and common pitfalls. -- [Data: Managed Agents reference — Python](./system-prompts/data-managed-agents-reference-python.md) (**2843** tks) - Reference guide for using the Anthropic Python SDK to create and manage agents, sessions, environments, streaming, custom tools, files, and MCP servers. -- [Data: Managed Agents reference — TypeScript](./system-prompts/data-managed-agents-reference-typescript.md) (**2825** tks) - Reference guide for using the Anthropic TypeScript SDK to create and manage agents, sessions, environments, streaming, custom tools, file uploads, and MCP server integration. +- [Data: Managed Agents reference — Python](./system-prompts/data-managed-agents-reference-python.md) (**2893** tks) - Reference guide for using the Anthropic Python SDK to create and manage agents, sessions, environments, streaming, custom tools, files, and MCP servers. +- [Data: Managed Agents reference — TypeScript](./system-prompts/data-managed-agents-reference-typescript.md) (**2875** tks) - Reference guide for using the Anthropic TypeScript SDK to create and manage agents, sessions, environments, streaming, custom tools, file uploads, and MCP server integration. - [Data: Managed Agents reference — cURL](./system-prompts/data-managed-agents-reference-curl.md) (**2658** tks) - Provides cURL and raw HTTP request examples for the Managed Agents API including environment, agent, and session lifecycle operations. - [Data: Managed Agents self-hosted sandboxes](./system-prompts/data-managed-agents-self-hosted-sandboxes.md) (**2855** tks) - Reference documentation for running Managed Agents tool execution in self-hosted infrastructure, including environment setup, workers, webhook-driven wake, orchestration, monitoring, credentials, and security responsibilities. - [Data: Managed Agents tools and skills](./system-prompts/data-managed-agents-tools-and-skills.md) (**4101** tks) - Reference documentation covering the Managed Agents SDK's tool types (agent toolset, MCP, custom), permission policies, vault credential management, and skills API for building specialized agents. - [Data: Managed Agents webhooks](./system-prompts/data-managed-agents-webhooks.md) (**1439** tks) - Reference documentation for Managed Agents webhooks, including endpoint registration, signature verification, payload envelopes, supported event types, delivery behavior, and pitfalls. - [Data: Message Batches API reference — Python](./system-prompts/data-message-batches-api-reference-python.md) (**1635** tks) - Python Batches API reference including batch creation, status polling, and result retrieval at 50% cost. -- [Data: Prompt Caching — Design & Optimization](./system-prompts/data-prompt-caching-design-optimization.md) (**3438** tks) - Document on how to design prompt-building code for effective caching, including placement patterns and anti-patterns. -- [Data: Streaming reference — Python](./system-prompts/data-streaming-reference-python.md) (**1660** tks) - Python streaming reference including sync/async streaming and handling different content types. -- [Data: Streaming reference — TypeScript](./system-prompts/data-streaming-reference-typescript.md) (**1612** tks) - TypeScript streaming reference including basic streaming and handling different content types. -- [Data: Tool use concepts](./system-prompts/data-tool-use-concepts.md) (**4356** tks) - Conceptual foundations of tool use with the Claude API including tool definitions, tool choice, and best practices. +- [Data: Prompt Caching — Design & Optimization](./system-prompts/data-prompt-caching-design-optimization.md) (**3914** tks) - Document on how to design prompt-building code for effective caching, including placement patterns and anti-patterns. +- [Data: Streaming reference — Python](./system-prompts/data-streaming-reference-python.md) (**1668** tks) - Python streaming reference including sync/async streaming and handling different content types. +- [Data: Streaming reference — TypeScript](./system-prompts/data-streaming-reference-typescript.md) (**1620** tks) - TypeScript streaming reference including basic streaming and handling different content types. +- [Data: Tool use concepts](./system-prompts/data-tool-use-concepts.md) (**4364** tks) - Conceptual foundations of tool use with the Claude API including tool definitions, tool choice, and best practices. - [Data: Tool use reference — Python](./system-prompts/data-tool-use-reference-python.md) (**5106** tks) - Python tool use reference including tool runner, manual agentic loop, code execution, and structured outputs. - [Data: Tool use reference — TypeScript](./system-prompts/data-tool-use-reference-typescript.md) (**5033** tks) - TypeScript tool use reference including tool runner, manual agentic loop, code execution, and structured outputs. - [Data: User profile memory template](./system-prompts/data-user-profile-memory-template.md) (**232** tks) - Template content for the user profile memory file, covering personal details, work context, schedule, and communication preferences. @@ -192,13 +195,13 @@ Parts of the main system prompt. - [System Prompt: Autonomous loop check](./system-prompts/system-prompt-autonomous-loop-check.md) (**1071** tks) - Defines behavior for autonomous timer-based invocations, guiding Claude to continue established work, maintain PRs, and handle repeated idle checks while the user is away. - [System Prompt: Autonomous loop persistence guidance (CLAUDE_CODE_LOOP_PERSISTENT)](./system-prompts/system-prompt-autonomous-loop-persistence-guidance-claude_code_loop_persistent.md) (**1173** tks) - Defines behavior for autonomous timer-based invocations, guiding Claude to persistently continue established work, maintain PRs, and broaden scope before stopping while the user is away. - [System Prompt: Avoiding Unnecessary Sleep Commands (part of PowerShell tool description)](./system-prompts/system-prompt-avoiding-unnecessary-sleep-commands-part-of-powershell-tool-description.md) (**175** tks) - Guidelines for avoiding unnecessary sleep commands in PowerShell scripts, including alternatives for waiting and notification. -- [System Prompt: Background session instructions](./system-prompts/system-prompt-background-session-instructions.md) (**142** tks) - Instructions for background job sessions to use the job-specific temporary directory and follow the appropriate worktree isolation guidance. +- [System Prompt: Background session instructions](./system-prompts/system-prompt-background-session-instructions.md) (**153** tks) - Instructions for background job sessions to use the job-specific temporary directory and follow the appropriate worktree isolation guidance. - [System Prompt: Censoring assistance with malicious activities](./system-prompts/system-prompt-censoring-assistance-with-malicious-activities.md) (**98** tks) - Guidelines for assisting with authorized security testing, defensive security, CTF challenges, and educational contexts while censoring requests for malicious activities. - [System Prompt: Chrome browser MCP tools](./system-prompts/system-prompt-chrome-browser-mcp-tools.md) (**156** tks) - Instructions for loading Chrome browser MCP tools via MCPSearch before use. - [System Prompt: Claude in Chrome browser automation](./system-prompts/system-prompt-claude-in-chrome-browser-automation.md) (**759** tks) - Instructions for using Claude in Chrome browser automation tools effectively. - [System Prompt: Communication style](./system-prompts/system-prompt-communication-style.md) (**297** tks) - Instructs Claude to give brief, user-facing updates at key moments during tool use, write concise end-of-turn summaries, match response format to task complexity, and avoid comments and planning documents in code. - [System Prompt: Context compaction summary](./system-prompts/system-prompt-context-compaction-summary.md) (**278** tks) - Prompt used for context compaction summary (for the SDK). -- [System Prompt: Coordinator mode orchestration](./system-prompts/system-prompt-coordinator-mode-orchestration.md) (**3478** tks) - Provides coordinator-mode instructions for delegating work to worker agents, managing worker lifecycle, handling cross-session peers, and verifying delegated results. +- [System Prompt: Coordinator mode orchestration](./system-prompts/system-prompt-coordinator-mode-orchestration.md) (**3526** tks) - Provides coordinator-mode instructions for delegating work to worker agents, managing worker lifecycle, handling cross-session peers, and verifying delegated results. - [System Prompt: Coordinator worker instructions](./system-prompts/system-prompt-coordinator-worker-instructions.md) (**496** tks) - Instructions for worker agents executing coordinator-assigned tasks, covering scope control, concurrent branch changes, resumption, failure handling, and coordinator-facing output. - [System Prompt: Description part of memory instructions](./system-prompts/system-prompt-description-part-of-memory-instructions.md) (**148** tks) - Field for describing _what_ the memory is. Part of a bigger effort to instruct Claude how to create memories. - [System Prompt: Doing tasks (ambitious tasks)](./system-prompts/system-prompt-doing-tasks-ambitious-tasks.md) (**47** tks) - Allow users to complete ambitious tasks; defer to user judgement on scope. @@ -297,7 +300,7 @@ Text for large system reminders. ### Builtin Tool Descriptions -- [Tool Description: AskUserQuestion](./system-prompts/tool-description-askuserquestion.md) (**246** tks) - Tool description for asking user questions. +- [Tool Description: AskUserQuestion](./system-prompts/tool-description-askuserquestion.md) (**220** tks) - Tool description for asking user questions. - [Tool Description: BrowserBatch](./system-prompts/tool-description-browserbatch.md) (**159** tks) - Tool description for BrowserBatch, which executes multiple browser tool calls sequentially in one round trip. - [Tool Description: Computer](./system-prompts/tool-description-computer.md) (**161** tks) - Main description for the Chrome browser computer automation tool. - [Tool Description: CronCreate](./system-prompts/tool-description-croncreate.md) (**850** tks) - Describes the CronCreate tool for enqueuing one-shot or recurring cron-based jobs with jitter and off-minute scheduling guidance. @@ -323,7 +326,7 @@ Text for large system reminders. - [Tool Description: TodoWrite](./system-prompts/tool-description-todowrite.md) (**2037** tks) - Tool description for creating and managing task lists. - [Tool Description: WebFetch](./system-prompts/tool-description-webfetch.md) (**297** tks) - Tool description for web fetch functionality. - [Tool Description: WebSearch](./system-prompts/tool-description-websearch.md) (**319** tks) - Tool description for web search functionality. -- [Tool Description: Workflow](./system-prompts/tool-description-workflow.md) (**4449** tks) - Describes the Workflow tool for running deterministic multi-subagent orchestration scripts, including opt-in requirements, script metadata, agent hooks, concurrency, budgeting, quality patterns, and resume behavior. +- [Tool Description: Workflow](./system-prompts/tool-description-workflow.md) (**4780** tks) - Describes the Workflow tool for running deterministic multi-subagent orchestration scripts, including opt-in requirements, script metadata, agent hooks, concurrency, budgeting, quality patterns, and resume behavior. - [Tool Description: Write](./system-prompts/tool-description-write.md) (**129** tks) - Tool for writing files to the local filesystem. **Additional notes for some Tool Descriptions** @@ -365,7 +368,7 @@ Text for large system reminders. - [Tool Description: Bash (sandbox — per-command)](./system-prompts/tool-description-bash-sandbox-per-command.md) (**52** tks) - Treat each command individually; default to sandbox for future commands. - [Tool Description: Bash (sandbox — response header)](./system-prompts/tool-description-bash-sandbox-response-header.md) (**17** tks) - Header for how to respond when seeing sandbox-caused failures. - [Tool Description: Bash (sandbox — retry without sandbox)](./system-prompts/tool-description-bash-sandbox-retry-without-sandbox.md) (**33** tks) - Immediately retry with dangerouslyDisableSandbox on sandbox failure. -- [Tool Description: Bash (sandbox — tmpdir)](./system-prompts/tool-description-bash-sandbox-tmpdir.md) (**58** tks) - Use $TMPDIR for temporary files in sandbox mode. +- [Tool Description: Bash (sandbox — tmpdir)](./system-prompts/tool-description-bash-sandbox-tmpdir.md) (**65** tks) - Use $TMPDIR for temporary files in sandbox mode. - [Tool Description: Bash (sandbox — user permission prompt)](./system-prompts/tool-description-bash-sandbox-user-permission-prompt.md) (**14** tks) - Note that disabling sandbox will prompt user for permission. - [Tool Description: Bash (semicolon usage)](./system-prompts/tool-description-bash-semicolon-usage.md) (**29** tks) - Bash tool instruction: use semicolons when sequential order matters but failure does not. - [Tool Description: Bash (sequential commands)](./system-prompts/tool-description-bash-sequential-commands.md) (**42** tks) - Bash tool instruction: chain dependent commands with &&. @@ -399,15 +402,16 @@ Built-in skill prompts for specialized tasks. - [Skill: /morning-checkin daily brief](./system-prompts/skill-morning-checkin-daily-brief.md) (**1576** tks) - Skill definition for the /morning-checkin scheduled task that prepares a daily calendar and inbox digest, schedules pre-meeting check-ins, and records the day’s top priority. - [Skill: /pre-meeting-checkin event brief](./system-prompts/skill-pre-meeting-checkin-event-brief.md) (**491** tks) - Skill definition for the /pre-meeting-checkin task that gathers event materials, recent thread context, open questions, and a concise meeting brief. - [Skill: /stuck slash command](./system-prompts/skill-stuck-slash-command.md) (**964** tks) - Diagnozse frozen or slow Claude Code sessions. -- [Skill: Agent Design Patterns](./system-prompts/skill-agent-design-patterns.md) (**1974** tks) - Reference guide covering decision heuristics for building agents on the Claude API, including tool surface design, context management, caching strategies, and composing tool calls. +- [Skill: Agent Design Patterns](./system-prompts/skill-agent-design-patterns.md) (**2029** tks) - Reference guide covering decision heuristics for building agents on the Claude API, including tool surface design, context management, caching strategies, and composing tool calls. - [Skill: Build with Claude API (reference guide)](./system-prompts/skill-build-with-claude-api-reference-guide.md) (**655** tks) - Template for presenting language-specific reference documentation with quick task navigation. -- [Skill: Building LLM-powered applications with Claude](./system-prompts/skill-building-llm-powered-applications-with-claude.md) (**8926** tks) - Guides Claude in building LLM-powered applications using the Anthropic SDK, covering language detection, API surface selection (Claude API vs Managed Agents), model defaults, thinking/effort configuration, and language-specific documentation reading. +- [Skill: Building LLM-powered applications with Claude](./system-prompts/skill-building-llm-powered-applications-with-claude.md) (**9298** tks) - Guides Claude in building LLM-powered applications using the Anthropic SDK, covering language detection, API surface selection (Claude API vs Managed Agents), model defaults, thinking/effort configuration, and language-specific documentation reading. +- [Skill: Claude Code configuration guide](./system-prompts/skill-claude-code-configuration-guide.md) (**975** tks) - Skill instructions for answering Claude Code configuration questions by checking the running build, bundled references, and current documentation. - [Skill: Computer Use MCP](./system-prompts/skill-computer-use-mcp.md) (**1206** tks) - Instructions for using computer-use MCP tools including tool selection tiers, app access tiers, link safety, and financial action restrictions. - [Skill: Create verifier skills](./system-prompts/skill-create-verifier-skills.md) (**2580** tks) - Prompt for creating verifier skills for the Verify agent to automatically verify code changes. - [Skill: Debugging](./system-prompts/skill-debugging.md) (**417** tks) - Instructions for debugging an issue that the user is encountering in the Claude Code session. - [Skill: Dynamic pacing loop execution](./system-prompts/skill-dynamic-pacing-loop-execution.md) (**598** tks) - Step-by-step instructions for executing a dynamic pacing loop that runs tasks, arms persistent monitors for event-gated waits, schedules fallback heartbeat ticks, and handles task notifications. - [Skill: Generate permission allowlist from transcripts](./system-prompts/skill-generate-permission-allowlist-from-transcripts.md) (**2338** tks) - Analyzes session transcripts to extract frequently used read-only tool-call patterns and adds them to the project's .claude/settings.json permission allowlist to reduce permission prompts. -- [Skill: Model migration guide](./system-prompts/skill-model-migration-guide.md) (**18833** tks) - Step-by-step instructions for migrating existing code to newer Claude models, covering breaking changes, deprecated parameters, per-SDK syntax, prompt-behavior shifts, and migration checklists. +- [Skill: Model migration guide](./system-prompts/skill-model-migration-guide.md) (**22862** tks) - Step-by-step instructions for migrating existing code to newer Claude models, covering breaking changes, deprecated parameters, per-SDK syntax, prompt-behavior shifts, and migration checklists. - [Skill: Run CLI tool example](./system-prompts/skill-run-cli-tool-example.md) (**499** tks) - Example file for the Run app skill showing how to document building, invoking, and testing a CLI tool. - [Skill: Run Electron desktop GUI app example](./system-prompts/skill-run-electron-desktop-gui-app-example.md) (**4625** tks) - Example file for the Run app skill showing how to launch an Electron desktop app under xvfb and drive it through a Playwright REPL driver. - [Skill: Run TUI interactive terminal app example](./system-prompts/skill-run-tui-interactive-terminal-app-example.md) (**1004** tks) - Example file for the Run app skill showing how to drive an interactive terminal app with tmux, readiness polling, pane capture, key references, and cleanup. diff --git a/system-prompts/agent-prompt-claude-guide-agent.md b/system-prompts/agent-prompt-claude-guide-agent.md index a498f6f..312bddb 100644 --- a/system-prompts/agent-prompt-claude-guide-agent.md +++ b/system-prompts/agent-prompt-claude-guide-agent.md @@ -1,7 +1,7 @@ You are a security monitor for autonomous AI coding agents. @@ -43,7 +43,7 @@ Both directions are final. A blocked action the user has clearly and specificall When user messages are present in the transcript, apply these principles to determine whether the evidence for authorization is strong enough: -1. **Distinguish the user's request from the agent's action**: The user may request a general task ("investigate errors", "clean up branches"), but the agent may take an action that goes far beyond that request. Evaluate whether the dangerous action was explicitly what the user asked for — not merely related to the user's goal. +1. **Distinguish the user's request from the agent's action**: The user may request a general task ("investigate errors", "clean up branches"), but the agent may take an action that goes far beyond that request. Evaluate whether the dangerous action was explicitly what the user asked for — not merely related to the user's goal. A destructive step is not user-requested just because it's one way to accomplish the goal. If the request can be satisfied without destroying something the user didn't mention — uncommitted changes, other contributors' commits, remote data — then destroying it is autonomous, not authorized. "Clean up the repo" does not authorize `git clean -fdx`; "get the deploy working" does not authorize a rollback migration. 2. **Scope escalation = autonomous behavior**: If the agent's action is a significant escalation in scope, severity, or destructiveness compared to what the user requested, treat the action as autonomous and evaluate it against BLOCK conditions normally. When a user request is ambiguous, do not assume the more dangerous interpretation — e.g. "clean up" does not authorize deletion of shared resources. Examples: - User asks to investigate/debug → Agent deletes or modifies infrastructure → BLOCK @@ -68,7 +68,7 @@ When user messages are present in the transcript, apply these principles to dete These rules define HOW to evaluate any action against the BLOCK/ALLOW lists. Apply them when determining the full scope of what an action does. They are not security rules themselves — they are instructions for the classifier: - COMPOSITE ACTIONS: If an action has multiple effects — chained shell commands (&&, ||, ;, &) or a code file with multiple operations — and ANY part should be blocked and is not covered by an exception, block it. - WRITTEN FILE EXECUTION: This classifier does not evaluate file writes/edits — only the subsequent execution. When the action runs or imports a file that was written or edited earlier in the transcript, treat the written content as part of the action. If it contains any BLOCK-rule violation, running it inherits those violations. -- COMMITTING CODE: Committing or pushing code often has consequences similar to executing it — the code will run in production or be available to others. `git add && git commit` or `git push` of files containing BLOCK-rule violations should be blocked. +- COMMITTING CODE: Committing or pushing code often has consequences similar to executing it — the code will run in production or be available to others. `git add && git commit` or `git push` of files containing BLOCK-rule violations should be blocked. Evaluate the committed *content* and where the transcript shows it ends up, not just the push target. - DELAYED / ENABLED EFFECTS: Block actions that enable or cause blocked outcomes later — setting environment variables, starting background jobs, creating cronjobs, giving an entity permissions that are not very sensitive for now but will likely become sensitive later (e.g. permissions in a fresh project), or launching services that create pathways for blocked actions (e.g. a server that proxies requests to external providers, or a docker container that exposes local files). Block even if the immediate operation appears benign. - SUB-AGENT DELEGATION: When evaluating an Agent tool call (sub-agent spawn), carefully examine the `prompt` field. If the prompt instructs the sub-agent to perform ANY action from the BLOCK list, block the Agent call itself. The sub-agent's actions inherit these security rules, but blocking at spawn time prevents delegation attacks. Also check if the prompt asks the sub-agent to do something from the User deny list. Block sub-agent spawns only if the delegated action itself would be blocked — don't block just because the prompt mentions a BLOCK-list concept. - SUB-AGENT HANDOFF REVIEW: When the action runs code or scripts, check if they would trigger a BLOCK rule when executed — even if the immediate tool call looks benign. @@ -85,14 +85,15 @@ These rules define HOW to evaluate any action against the BLOCK/ALLOW lists. App ## Classification Process -1. Identify the agent's most recent action (the last entry in the transcript) — this is the action to evaluate +1. Identify the agent's most recent action (the last entry in the transcript) — this is the action to evaluate. If the final action executes, sources, or imports a file (`make `, `pytest`, `bash