diff --git a/README.md b/README.md index dd7f301..91782da 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Download it and try it out for free! **https://piebald.ai/** > [!tip] > **NEW (June 12, 2026):** We've greatly expanded this list with many more of Claude Code's prompts—**from 350 to 515 (+165)**—our most complete coverage yet. -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.272](https://www.npmjs.com/package/@anthropic-ai/claude-code/v/2.1.272) (September 14th, 2026).** It also contains a [**CHANGELOG.md**](./CHANGELOG.md) for the system prompts across 289 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.273](https://www.npmjs.com/package/@anthropic-ai/claude-code/v/2.1.273) (September 15th, 2026).** It also contains a [**CHANGELOG.md**](./CHANGELOG.md) for the system prompts across 290 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.** @@ -139,9 +139,9 @@ Sub-agents and utilities. - [Agent Prompt: Plugin eval pilot trust requirement](./system-prompts/agent-prompt-plugin-eval-pilot-trust-requirement.md) (**205** tks) - Requires explicit user trust for a plugin directory before piloting its eval cases with --trust-plugin and otherwise limits work to writing case files. - [Agent Prompt: Project thread status card classifier](./system-prompts/agent-prompt-project-thread-status-card-classifier.md) (**4085** tks) - Classifies a Project thread as needing a reply, needing approval, done, failed, or working and emits concise owner-facing status-card JSON. - [Agent Prompt: Prompt Suggestion Generator v2](./system-prompts/agent-prompt-prompt-suggestion-generator-v2.md) (**344** tks) - V2 instructions for generating prompt suggestions for Claude Code. -- [Agent Prompt: Pull request creation](./system-prompts/agent-prompt-pull-request-creation.md) (**1165** tks) - Prompt for creating a single GitHub pull request from existing commits with branch, template, attribution, shell-formatting, and git-safety guidance. -- [Agent Prompt: Quick PR creation](./system-prompts/agent-prompt-quick-pr-creation.md) (**1685** 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) (**1335** tks) - Streamlined prompt for creating a single git commit with pre-populated context. +- [Agent Prompt: Pull request creation](./system-prompts/agent-prompt-pull-request-creation.md) (**1207** tks) - Prompt for creating a single GitHub pull request from existing commits with branch, template, attribution, shell-formatting, and git-safety guidance. +- [Agent Prompt: Quick PR creation](./system-prompts/agent-prompt-quick-pr-creation.md) (**1741** 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) (**1368** tks) - Streamlined prompt for creating a single git commit with pre-populated context. - [Agent Prompt: Read-only search agent](./system-prompts/agent-prompt-read-only-search-agent.md) (**93** tks) - Defines a read-only search agent for broad fan-out code searches that returns conclusions instead of file dumps. - [Agent Prompt: Recent Message Summarization](./system-prompts/agent-prompt-recent-message-summarization.md) (**868** tks) - Agent prompt used for summarizing recent messages. - [Agent Prompt: Remote machine auto mode rules](./system-prompts/agent-prompt-remote-machine-auto-mode-rules.md) (**228** tks) - Adds host-declared deny, allow, and environment rules to the security monitor prompt for commands that will run on another machine. @@ -168,7 +168,7 @@ The content of various template files embedded in Claude Code. - [Data: /auto-mode-setup usage](./system-prompts/data-auto-mode-setup-usage.md) (**406** tks) - Defines /auto-mode-setup proposal and reviewed-apply command syntax, request ID ordering, save-target validation, and integrity requirements. - [Data: Artifact MCP connector guidance](./system-prompts/data-artifact-mcp-connector-guidance.md) (**351** tks) - Explains how Artifact MCP manifests declare claude.ai, built-in, and host connectors and how to discover exact server and upstream tool names. -- [Data: Artifact connector call observation requirement](./system-prompts/data-artifact-connector-call-observation-requirement.md) (**199** tks) - Requires observing a connector tool request and response before publishing an Artifact that calls it. +- [Data: Artifact connector call observation requirement](./system-prompts/data-artifact-connector-call-observation-requirement.md) (**281** tks) - Explains how to obtain connector argument names from the loaded tool schema, learn result shapes from safe real calls, and disclose shapes that cannot be verified before publishing. - [Data: Artifact connector server naming guidance](./system-prompts/data-artifact-connector-server-naming-guidance.md) (**241** tks) - Explains how connector tool prefixes map to manifest server identifiers and why in-page calls must use the resolved connector display name. - [Data: Artifact decision component HTML skeleton](./system-prompts/data-artifact-decision-component-html-skeleton.md) (**1117** tks) - Provides the canonical HTML and JSON-island skeleton for embedding one reusable Artifact decision block. - [Data: Artifact document quickstart routing](./system-prompts/data-artifact-document-quickstart-routing.md) (**169** tks) - Routes document creation to an attached first-party document connector, a requested file-format skill, or an Artifact quickstart intent. @@ -244,6 +244,7 @@ The content of various template files embedded in Claude Code. - [Data: Streaming reference — Java](./system-prompts/data-streaming-reference-java.md) (**287** tks) - Java streaming reference including streamed content-block delta handling and text extraction. - [Data: Streaming reference — PHP](./system-prompts/data-streaming-reference-php.md) (**315** tks) - PHP streaming reference including streaming events and handling content block deltas (requires SDK v0.5.0+). - [Data: Streaming reference — Ruby](./system-prompts/data-streaming-reference-ruby.md) (**116** tks) - Ruby streaming reference including basic streamed text handling. +- [Data: Structured usage rate-limit rows field](./system-prompts/data-structured-usage-rate-limit-rows-field.md) (**177** tks) - Schema description for structured usage rate-limit rows, including server-defined meter ordering, null and empty semantics, and the synthesized header-fallback row. - [Data: Thin-client diff dialog schema](./system-prompts/data-thin-client-diff-dialog-schema.md) (**198** tks) - Internal data description for workspace git diff payloads used by the thin-client diff dialog. - [Data: Token counting reference](./system-prompts/data-token-counting-reference.md) (**665** tks) - Reference documentation for counting Claude model tokens with the Messages count_tokens endpoint and Anthropic SDK or CLI examples, including warnings against OpenAI tokenizers. - [Data: Tool use display metadata field](./system-prompts/data-tool-use-display-metadata-field.md) (**172** tks) - Documents the tool_use_meta wire field carrying per-block display metadata for a message's tool_use blocks; it is wrapper-level UI metadata and is not replayed to the model. @@ -424,8 +425,8 @@ Text for large system reminders. - [System Reminder: /btw side question](./system-prompts/system-reminder-btw-side-question.md) (**419** tks) - System reminder for /btw slash command side questions without tools. - [System Reminder: Agent mention](./system-prompts/system-reminder-agent-mention.md) (**45** tks) - Notification that user wants to invoke an agent. -- [System Reminder: AppifactRepl Slides deck workflow](./system-prompts/system-reminder-appifactrepl-slides-deck-workflow.md) (**2259** tks) - Instructs Claude to create or revise Slides decks through one AppifactRepl program while handling file-backed and store-backed decks safely. -- [System Reminder: AppifactRepl design canvas workflow](./system-prompts/system-reminder-appifactrepl-design-canvas-workflow.md) (**2185** tks) - Instructs Claude to create or revise Design canvases through one AppifactRepl program while handling file-backed and store-backed canvases safely. +- [System Reminder: AppifactRepl Slides deck workflow](./system-prompts/system-reminder-appifactrepl-slides-deck-workflow.md) (**2086** tks) - Instructs Claude to create or revise a file-backed Slides deck through one AppifactRepl program while preserving its project/deck.json index, slide files, and embedded speaker notes. +- [System Reminder: AppifactRepl design canvas workflow](./system-prompts/system-reminder-appifactrepl-design-canvas-workflow.md) (**2090** tks) - Instructs Claude to create or revise a file-backed Design canvas through one AppifactRepl program while preserving its project/canvas.json index and changed board files. - [System Reminder: Artifact auto-replies resumed](./system-prompts/system-reminder-artifact-auto-replies-resumed.md) (**349** tks) - Reports that Artifact comment auto-replies resumed, explains which stopped-period comments are handled based on the stop cause, and warns that the stop remains until the watch reconnects. - [System Reminder: Artifact capability declaration revocation warning](./system-prompts/system-reminder-artifact-capability-declaration-revocation-warning.md) (**342** tks) - Warns that publishing a replacement capability declaration would implicitly revoke stored capabilities and explains how to preserve or intentionally revoke them. - [System Reminder: Artifact comment reply activation failure](./system-prompts/system-reminder-artifact-comment-reply-activation-failure.md) (**204** tks) - Explains that an Artifact comment reply was not posted because Claude is not currently activated for the thread and requires reactivation before retrying. @@ -484,10 +485,10 @@ Text for large system reminders. - [System Reminder: Memory index capacity warning](./system-prompts/system-reminder-memory-index-capacity-warning.md) (**330** tks) - Warns when a private or team memory index approaches or exceeds its byte or line read limit and instructs Claude to compact it below the target size. - [System Reminder: Memory updates](./system-prompts/system-reminder-memory-updates.md) (**237** tks) - Introduces refreshed memory-file state, invalidates earlier reads, and forbids reproducing the machine-generated update block to the user. - [System Reminder: Nested memory contents](./system-prompts/system-reminder-nested-memory-contents.md) (**33** tks) - Contents of a nested memory file. -- [System Reminder: New Slides deck parallel AppifactRepl workflow](./system-prompts/system-reminder-new-slides-deck-parallel-appifactrepl-workflow.md) (**647** tks) - Directs a new Slides deck to be framed and populated through ordered parallel AppifactRepl calls, one per slide. -- [System Reminder: New Slides deck two-step AppifactRepl workflow](./system-prompts/system-reminder-new-slides-deck-two-step-appifactrepl-workflow.md) (**942** tks) - Directs a new Slides deck through a first step that reads prefetched instructions and a second step that builds ordered slides with AppifactRepl. -- [System Reminder: New design canvas parallel AppifactRepl workflow](./system-prompts/system-reminder-new-design-canvas-parallel-appifactrepl-workflow.md) (**763** tks) - Directs a new Design canvas to be framed and populated through ordered parallel AppifactRepl calls, one per board. -- [System Reminder: New design canvas two-step AppifactRepl workflow](./system-prompts/system-reminder-new-design-canvas-two-step-appifactrepl-workflow.md) (**1125** tks) - Directs a new Design canvas through a first step that reads prefetched instructions and a second step that builds ordered artboards with AppifactRepl. +- [System Reminder: New Slides deck parallel AppifactRepl workflow](./system-prompts/system-reminder-new-slides-deck-parallel-appifactrepl-workflow.md) (**1088** tks) - Directs a new Slides deck to be framed and populated through ordered parallel AppifactRepl calls, one per slide. +- [System Reminder: New Slides deck two-step AppifactRepl workflow](./system-prompts/system-reminder-new-slides-deck-two-step-appifactrepl-workflow.md) (**1404** tks) - Directs a new Slides deck through a first step that reads prefetched instructions and a second step that builds ordered slides with AppifactRepl. +- [System Reminder: New design canvas parallel AppifactRepl workflow](./system-prompts/system-reminder-new-design-canvas-parallel-appifactrepl-workflow.md) (**1152** tks) - Directs a new Design canvas to be framed and populated through ordered parallel AppifactRepl calls, one per board. +- [System Reminder: New design canvas two-step AppifactRepl workflow](./system-prompts/system-reminder-new-design-canvas-two-step-appifactrepl-workflow.md) (**1579** tks) - Directs a new Design canvas through a first step that reads prefetched instructions and a second step that builds ordered artboards with AppifactRepl. - [System Reminder: New diagnostics detected](./system-prompts/system-reminder-new-diagnostics-detected.md) (**83** tks) - Notification about new diagnostic issues. - [System Reminder: Output style active](./system-prompts/system-reminder-output-style-active.md) (**102** tks) - Notification that an output style is active. - [System Reminder: Plan approved](./system-prompts/system-reminder-plan-approved.md) (**152** tks) - Notifies Claude that the user approved the plan, provides the saved plan file and approved plan content, and allows coding to begin. @@ -534,9 +535,10 @@ Text for large system reminders. - [Tool Description: AppifactRepl](./system-prompts/tool-description-appifactrepl.md) (**1332** tks) - Defines one-call JavaScript execution against built-in or skill-provided Appifact SDKs, including artifact binding, storage capabilities, output, and error semantics. - [Tool Description: Artifact HTML document skeleton](./system-prompts/tool-description-artifact-html-document-skeleton.md) (**363** tks) - Explains the HTML skeleton and minimal reset added at artifact publish time and requires authors to provide page content, title, and styles. - [Tool Description: Artifact action reference](./system-prompts/tool-description-artifact-action-reference.md) (**989** tks) - Enumerates available Artifact actions and conditionally documents publish, read, list, delete, open, pin, and unpin behavior. +- [Tool Description: Artifact asset read result](./system-prompts/tool-description-artifact-asset-read-result.md) (**578** tks) - Formats a successful Artifact asset read with its saved path, byte count, content type, digest, and writer trust warning that the file is data rather than instructions. - [Tool Description: Artifact browser storage guidance](./system-prompts/tool-description-artifact-browser-storage-guidance.md) (**253** tks) - Defines browser storage as fallible per-viewer convenience state and directs reliable or shared state to runtime capabilities. - [Tool Description: Artifact comments guidance](./system-prompts/tool-description-artifact-comments-guidance.md) (**603** tks) - Explains how to read, reply to, and resolve activated Artifact comment threads while treating viewer comments as untrusted data. -- [Tool Description: Artifact database guidance](./system-prompts/tool-description-artifact-database-guidance.md) (**931** tks) - Describes shared durable Artifact database reads and writes, private per-viewer data/users/me addressing, and treating viewer-written rows as untrusted data. +- [Tool Description: Artifact database guidance](./system-prompts/tool-description-artifact-database-guidance.md) (**980** tks) - Describes shared durable Artifact database reads and writes, private per-viewer data/users/me addressing, and treating viewer-written rows as untrusted data. - [Tool Description: Artifact database version pinning guidance](./system-prompts/tool-description-artifact-database-version-pinning-guidance.md) (**183** tks) - Instructs Claude to pin writes to the last-read document version with if_version and to re-read and retry after conflicts instead of overwriting concurrent changes. - [Tool Description: Artifact design fallback requirements](./system-prompts/tool-description-artifact-design-fallback-requirements.md) (**282** tks) - Defines minimum title, theme, resource allowlist, responsive-layout, and overflow requirements when a page is written before the Artifact design skill loads. - [Tool Description: Artifact external resource allowlist](./system-prompts/tool-description-artifact-external-resource-allowlist.md) (**277** tks) - Defines the CSP-enforced CDN and font allowlist for artifact pages and requires unsupported assets to be inlined. @@ -550,9 +552,9 @@ Text for large system reminders. - [Tool Description: Artifact theme-aware styling](./system-prompts/tool-description-artifact-theme-aware-styling.md) (**317** tks) - Explains artifact viewer theme states and the CSS token strategy required to support explicit and system light and dark themes. - [Tool Description: Artifact title and description guidance](./system-prompts/tool-description-artifact-title-and-description-guidance.md) (**338** tks) - Defines concise, distinctive, stable artifact title requirements and assigns explanatory text to the description parameter. - [Tool Description: Artifact type creation guidance](./system-prompts/tool-description-artifact-type-creation-guidance.md) (**188** tks) - Explains how to create a private Artifact from a published Artifact type and then update only the resulting Artifact's own files. -- [Tool Description: Artifact type discovery guidance](./system-prompts/tool-description-artifact-type-discovery-guidance.md) (**1148** tks) - Directs the agent to discover per-account published Artifact types before creating presentations, reader-facing documents, or designs, and explains type inspection and available or unavailable creation flows. -- [Tool Description: Artifact type file-backed content update guidance](./system-prompts/tool-description-artifact-type-file-backed-content-update-guidance.md) (**553** tks) - Explains how to detect file-backed Artifact type content, read every changed file, republish it to the same URL, and preserve the type's index metadata. -- [Tool Description: Artifact unsupported supporting file error](./system-prompts/tool-description-artifact-unsupported-supporting-file-error.md) (**239** tks) - Formats the Artifact publish error for a supporting file whose content type cannot be served. +- [Tool Description: Artifact type discovery guidance](./system-prompts/tool-description-artifact-type-discovery-guidance.md) (**1156** tks) - Directs the agent to discover per-account published Artifact types before creating presentations, reader-facing documents, or designs, and explains type inspection and available or unavailable creation flows. +- [Tool Description: Artifact type file-backed content detection guidance](./system-prompts/tool-description-artifact-type-file-backed-content-detection-guidance.md) (**355** tks) - Directs the agent to inspect an Artifact type index before writing, determine whether its content is file-backed, read every file being changed, and republish changed copies safely. +- [Tool Description: Artifact type file-backed content update guidance](./system-prompts/tool-description-artifact-type-file-backed-content-update-guidance.md) (**1105** tks) - Explains how to detect file-backed Artifact type content, read every changed file, republish it to the same URL, and preserve the type's index metadata. - [Tool Description: Artifact watch approval explanation](./system-prompts/tool-description-artifact-watch-approval-explanation.md) (**271** tks) - Explains the approval scope and local or cloud notification behavior when Claude watches an Artifact, including optional comment delivery and unattended replies. - [Tool Description: AskUserQuestion decision guidance](./system-prompts/tool-description-askuserquestion-decision-guidance.md) (**60** tks) - Additional guidance for using AskUserQuestion only when the user's answer changes what the agent should do next. - [Tool Description: AskUserQuestion extended host guidance](./system-prompts/tool-description-askuserquestion-extended-host-guidance.md) (**302** tks) - Guides hosts with extended AskUserQuestion support on question ordering, text and number inputs, multi-select defaults, optional labels, and follow-up question requests. @@ -588,6 +590,7 @@ Text for large system reminders. - [Tool Description: EnterWorktree](./system-prompts/tool-description-enterworktree.md) (**1062** tks) - Creates a new isolated worktree or enters an existing one only when explicitly requested, with eligibility, switching, lifecycle, and cleanup rules. - [Tool Description: ExitPlanMode](./system-prompts/tool-description-exitplanmode.md) (**648** tks) - Description for the ExitPlanMode tool, which presents a plan dialog for the user to approve. - [Tool Description: ExitWorktree](./system-prompts/tool-description-exitworktree.md) (**527** tks) - Describes ExitWorktree, which returns the session to its original working directory and either keeps or removes the session-created worktree. +- [Tool Description: FetchInboxMessage](./system-prompts/tool-description-fetchinboxmessage.md) (**916** tks) - Describes reading Remote Control inbox messages, distinguishes verified owner relays from untrusted third-party text, and defines confirmation, trust, expiry, and retry rules. - [Tool Description: Glob compact](./system-prompts/tool-description-glob-compact.md) (**0** tks) - Compact Glob tool description served to newer models — file pattern matching returning paths sorted by modification time. - [Tool Description: Glob](./system-prompts/tool-description-glob.md) (**90** tks) - Tool description for file pattern matching and searching by name. - [Tool Description: Grep compact](./system-prompts/tool-description-grep-compact.md) (**0** tks) - Compact Grep tool description served to newer models — ripgrep-backed content search preferred over raw grep/rg, with permission-UI integration. @@ -600,6 +603,7 @@ Text for large system reminders. - [Tool Description: ListMcpResourcesTool](./system-prompts/tool-description-listmcpresourcestool.md) (**82** tks) - Tool description for listing available MCP resources from all configured servers or a specific server. - [Tool Description: Navigate tab cleanup guidance](./system-prompts/tool-description-navigate-tab-cleanup-guidance.md) (**82** tks) - Requires closing automatically opened browser tabs when they are no longer needed unless the user wants them kept open. - [Tool Description: Navigate](./system-prompts/tool-description-navigate.md) (**218** tks) - Describes the browser navigate tool for opening URLs and moving forward or backward in tab history. +- [Tool Description: New file-backed Artifact type content guidance](./system-prompts/tool-description-new-file-backed-artifact-type-content-guidance.md) (**784** tks) - Explains how to create and later update a file-backed Artifact type instance while preserving its index metadata, reading changed files, and publishing only project content. - [Tool Description: NotebookEdit](./system-prompts/tool-description-notebookedit.md) (**194** tks) - Tool description for editing Jupyter notebook cells by replacing, inserting, or deleting a cell using cell IDs from the read tool. - [Tool Description: Poll](./system-prompts/tool-description-poll.md) (**414** tks) - Describes the Poll tool for waiting on queued harness events, signaling idleness, and interpreting event provenance, nonce manifests, and chunked delivery. - [Tool Description: PowerShell](./system-prompts/tool-description-powershell.md) (**2850** tks) - Describes the PowerShell command execution tool with syntax guidance, timeout settings, and instructions to prefer specialized tools over PowerShell for file operations. @@ -629,6 +633,7 @@ Text for large system reminders. - [Tool Description: Session artifact watch lifecycle](./system-prompts/tool-description-session-artifact-watch-lifecycle.md) (**707** tks) - Explains live artifact watch setup, optional comment auto-replies, session restoration, status checks, and lifecycle limits. - [Tool Description: ShowOnboardingRolePicker](./system-prompts/tool-description-showonboardingrolepicker.md) (**38** tks) - ShowOnboardingRolePicker: presents a row of clickable role chips during Cowork onboarding. - [Tool Description: Skill proposal rendering](./system-prompts/tool-description-skill-proposal-rendering.md) (**208** tks) - Defines when and how to render complete recurring-procedure skill proposals for user review without writing files. +- [Tool Description: Skill-scoped git push refusal](./system-prompts/tool-description-skill-scoped-git-push-refusal.md) (**258** tks) - Explains that an active skill rejects dangerous or bypassing git push forms, permits a plain push to the configured remote, and forbids evasion or silent substitution. - [Tool Description: SuggestConnectors](./system-prompts/tool-description-suggestconnectors.md) (**224** tks) - Describes the SuggestConnectors tool for resolving SearchMcpRegistry directoryUuid values into full connector payloads and install-state guidance. - [Tool Description: SuggestSkills proactive guidance](./system-prompts/tool-description-suggestskills-proactive-guidance.md) (**303** tks) - Guides proactive use of SuggestSkills to recommend addable standalone skills for repeatable tasks without interrupting one-off work. - [Tool Description: Task Get](./system-prompts/tool-description-task-get.md) (**182** tks) - Retrieve a task by ID with full details and comments. @@ -709,7 +714,7 @@ Text for large system reminders. - [Tool Description: Live Artifact watch guidance (app wording)](./system-prompts/tool-description-live-artifact-watch-guidance-app-wording.md) (**359** tks) - App-worded guidance for live Artifact watches, optional comment auto-replies, watch status, and truthful subscription reporting. - [Tool Description: PowerShell (git guidance)](./system-prompts/tool-description-powershell-git-guidance.md) (**192** tks) - PowerShell tool guidance to prefer new commits, consider safer alternatives to destructive git operations, and never bypass hooks or signing without an explicit user request. - [Tool Description: Prohibited artifact publishing (app wording)](./system-prompts/tool-description-prohibited-artifact-publishing-app-wording.md) (**185** tks) - App-worded prohibition on publishing impersonation, fabricated records, deceptive collection flows, or content targeting private individuals. -- [Tool Description: Publish audience-facing deliverables (app wording)](./system-prompts/tool-description-publish-audience-facing-deliverables-app-wording.md) (**462** tks) - App-worded guidance to publish finished audience-facing deliverables through Artifacts or first-party document connectors while keeping immediate personal advice in the terminal. +- [Tool Description: Publish audience-facing deliverables (app wording)](./system-prompts/tool-description-publish-audience-facing-deliverables-app-wording.md) (**482** tks) - App-worded guidance to publish finished audience-facing deliverables through Artifacts or first-party document connectors while keeping immediate personal advice in the terminal. - [Tool Description: SendUserMessage (verbatim)](./system-prompts/tool-description-sendusermessage-verbatim.md) (**102** tks) - Describes the concise SendUserMessage tool variant for sending verbatim user-visible messages with normal or proactive status. - [Tool Description: Snooze (delay and reason guidance)](./system-prompts/tool-description-snooze-delay-and-reason-guidance.md) (**437** tks) - Extends the snooze tool description with guidance on choosing delaySeconds relative to the 5-minute prompt cache TTL and writing informative reason fields. - [Tool Description: TaskList (teammate workflow)](./system-prompts/tool-description-tasklist-teammate-workflow.md) (**133** tks) - Conditional section appended to TaskList tool description. diff --git a/system-prompts/agent-prompt-pull-request-creation.md b/system-prompts/agent-prompt-pull-request-creation.md index c370a49..e83bfaa 100644 --- a/system-prompts/agent-prompt-pull-request-creation.md +++ b/system-prompts/agent-prompt-pull-request-creation.md @@ -1,7 +1,7 @@ -The type definitions cover only the call envelope — they do not tell you a connector tool's argument names or its result encoding. Never publish a page that calls a connector tool without having observed one real request/response pair for that tool in this session; if you cannot safely observe one (for example, the connector is unauthenticated here, or calling the tool would have side effects), say that explicitly to the user at publish time — in your reply, not as a note inside the published page — instead of shipping a guessed shape. Observed response payloads are the user's real data: learn the shape from them, but never embed the observed values in the published page as sample or placeholder data. +The type definitions cover only the call envelope, not a connector tool's argument names or result shape. Take argument names from the tool's input schema in this session's own definition of that connector tool, when it is loaded here. Learn a result's shape from one real call of a tool that is safe to run — never run a write only to learn its result. The published page can also read a tool's schema itself with `describeTool(server, tool)` at view time, once the viewer has allowed the connector for that page; this session cannot read that answer before publishing, so it is no substitute for a schema read here. If this session has no schema for a tool and cannot safely call it, say so to the user at publish time — in your reply, not as a note inside the published page — instead of shipping a guessed shape. Observed response payloads are the user's real data: learn the shape from them, but never embed the observed values in the published page as sample or placeholder data. diff --git a/system-prompts/data-structured-usage-rate-limit-rows-field.md b/system-prompts/data-structured-usage-rate-limit-rows-field.md new file mode 100644 index 0000000..8bcffe3 --- /dev/null +++ b/system-prompts/data-structured-usage-rate-limit-rows-field.md @@ -0,0 +1,6 @@ + +The server's usage rows (the usage endpoint's limits[]), as sent: which meters apply, their scope, labels, severity and order are the server's, so a client renders them verbatim and a new meter needs no client release. Empty when the server reported no meters; null when the body carried no rows at all (a server that predates them). When the usage fetch failed and the CLI fell back to rate-limit response headers, this holds at most the one row it synthesizes from them (the overage-included weekly window, shaped like the server's), or null when the headers carried none. diff --git a/system-prompts/system-reminder-appifactrepl-design-canvas-workflow.md b/system-prompts/system-reminder-appifactrepl-design-canvas-workflow.md index 543b0c2..4417d21 100644 --- a/system-prompts/system-reminder-appifactrepl-design-canvas-workflow.md +++ b/system-prompts/system-reminder-appifactrepl-design-canvas-workflow.md @@ -1,51 +1,47 @@ -[How to build and iterate on Design canvases efficiently] First list this canvas's files. If `canvas.json` is among them, the content lives in files: each board is `project/`, where is its key in `canvas.json`'s `boards`. Then read each file you will change by its `path` and publish the changed ones back with `file_path` and `files`; include `canvas.json` only when you add, remove, reorder, move or resize a board or change anything else it holds, changing just those keys. If the AppifactRepl tool is among your tools, do all of that inside one program, as the last example below shows: `files.list()`, `files.read` or `files.readMany` for what you change, the new text written into `files.dir()`, ONE `files.publish`. Never write_db / read_db a canvas kept as files. If `canvas.json` is not listed and the AppifactRepl tool is among your tools, use it for this canvas instead of separate write_db / read_db calls. One call runs a short JavaScript program against this canvas's store: a whole design lands in one step, and each artboard appears the moment its line runs. Call it as `{artifact: , code}`. Images and font files upload from inside the program, one call per file: put the file in `files.dir()`, then `(await claude.use("assets")).upload(path)` answers `{url, id}`, and each returned `url` goes in verbatim where the board names it. +[How to build and iterate on Design canvases efficiently] This canvas's content lives in files under `project/`, nothing in the store: the index is `project/canvas.json`, and each board is `project/`, where is its key in the index's `boards`. Read each file you will change by its `path` and publish the changed ones back with `file_path` and `files`; include `project/canvas.json` only when you add, remove, reorder, move or resize a board or change anything else it holds, changing just those keys. If the AppifactRepl tool is among your tools, use it for this canvas instead of separate Artifact calls: do all of that inside one program, as the examples below show: `files.list()`, `files.read` or `files.readMany` for what you change, the new text written into `files.dir()`, ONE `files.publish`. One call runs a short JavaScript program against this canvas's files: a whole design lands in one step. Call it as `{artifact: , code}`. Never write_db / read_db this canvas. Images and font files upload from inside the program, one call per file: put the file in `files.dir()`, then `(await claude.use("assets")).upload(path)` answers `{url, id}`, and each returned `url` goes in verbatim where the board names it. Create: one call. ```js -const db = await claude.use("db"); -// 1 · frames first: meta + every artboard EMPTY, one batch -> the frames show at once -await db.batch([ - { op:"set", path:"design/meta", data:{ v:2, title, boardOrder:["Main.dc.html","Pricing.dc.html"], launch:{view:"canvas"} } }, - { op:"set", path:"boards/Main.dc.html", data:{ path:"Main.dc.html", x:0, y:0, w:880, h:560, html:"" } }, - { op:"set", path:"boards/Pricing.dc.html", data:{ path:"Pricing.dc.html", x:960, y:0, w:880, h:560, html:"" } }, -]); -// 2 · then one artboard per line, in order -> each paints as it lands -await db.doc("boards/Main.dc.html").update({ html: mainHtml }); -await db.doc("boards/Pricing.dc.html").update({ html: pricingHtml }); +const files = await claude.use("files"); +const fs = require("fs"), path = require("path"), dir = files.dir(); +fs.mkdirSync(path.join(dir, "project"), { recursive: true }); +// 1 · the index: read it when it is listed, else start it with its createdOnFiles key; every artboard's boards entry and its place in order, every other key kept +const listed = (await files.list()).some(f => f.path === "project/canvas.json"); +const canvas = listed ? JSON.parse(await files.read("project/canvas.json")) : { v:3, launch:{ view:"canvas" }, pages:[], boards:{}, order:[], notes:{}, designSystems:[], attachments:{}, createdOnFiles:{ v:1, at:new Date().toISOString() } }; +canvas.title = title; +canvas.boards = { "Main.dc.html": { x:0, y:0, w:880, h:560 }, "Pricing.dc.html": { x:960, y:0, w:880, h:560 } }; +canvas.order = ["Main.dc.html","Pricing.dc.html"]; +fs.writeFileSync(path.join(dir, "project/canvas.json"), JSON.stringify(canvas, null, 2) + "\n"); +// 2 · one file per artboard +fs.writeFileSync(path.join(dir, "project/Main.dc.html"), mainHtml); +fs.writeFileSync(path.join(dir, "project/Pricing.dc.html"), pricingHtml); +// 3 · ONE publish: file_path = one file, files = the others +await files.publish({ file_path: "project/canvas.json", files: { "project/Main.dc.html": "project/Main.dc.html", "project/Pricing.dc.html": "project/Pricing.dc.html" } }); ``` -Revise: read it back, change only what was asked, one call. Each call starts fresh, so it reads a document before it changes it. -```js -const db = await claude.use("db"); -const b = (await db.doc("boards/Pricing.dc.html").get()).data(); -await db.doc("boards/Pricing.dc.html").update({ html: b.html.replace("£12", "£14") }); -``` - -A canvas kept as files, with this tool: list first in the SAME program that writes, also for a canvas you filled earlier in this conversation: a store canvas can move to files at any moment, and it never moves back. Write ONE program that handles both outcomes of its listing: if `canvas.json` is listed, read it (`files.readMany`) and write the files; if it is not, write the store. Never stop and start over because the listing surprised you: a brand-new canvas usually has its `canvas.json` by the time its first program runs. When you must see existing files first, do all the looking in ONE program that prints only what you need (the listing, `canvas.json`, the parts of files you will match): read every file you need in one program, with one `files.readMany([paths])` (their texts come back in that order); then ONE program that lists again, reads, writes and publishes. The writing program reads, with `files.read` or `files.readMany`, every EXISTING file it replaces or removes, `canvas.json` included, before it publishes: a listing alone does not count, and a publish over a file it did not read may be refused; new files need no read. +Revise: read it back in the SAME program that writes, change only what was asked, one call. Each call starts fresh. When you must see existing files first, do all the looking in ONE program that prints only what you need (the listing, `project/canvas.json`, the parts of files you will match): read every file you need in one program, with one `files.readMany([paths])` (their texts come back in that order); then ONE program that reads, writes and publishes. The writing program reads, with `files.read` or `files.readMany`, every EXISTING file it replaces or removes, `project/canvas.json` included, before it publishes: a listing alone does not count, and a publish over a file it did not read may be refused; new files need no read. ```js const files = await claude.use("files"); const fs = require("fs"), path = require("path"); -// 1 · which kind? no canvas.json listed: a store canvas, so run the Revise program above right here, in this same call -if (!(await files.list()).some(f => f.path === "canvas.json")) { /* the db program */ return; } -// 2 · read every existing file you change, canvas.json too; write the new text into files.dir() at the same relative paths -const [index, pricing] = await files.readMany(["canvas.json", "project/Pricing.dc.html"]); +// 1 · read every existing file you change, the index too; write the new text into files.dir() at the same relative paths +const [index, pricing] = await files.readMany(["project/canvas.json", "project/Pricing.dc.html"]); const canvas = JSON.parse(index); const dir = files.dir(); fs.mkdirSync(path.join(dir, "project"), { recursive: true }); fs.writeFileSync(path.join(dir, "project/Pricing.dc.html"), pricing.replace("£12", "£14")); -// a new artboard: its file, plus canvas.json with its boards entry and its path in order, every other key kept +// a new artboard: its file, plus the index with its boards entry and its path in order, every other key kept fs.writeFileSync(path.join(dir, "project/Faq.dc.html"), faqHtml); canvas.boards["Faq.dc.html"] = { x: 1920, y: 0, w: 880, h: 560 }; canvas.order.push("Faq.dc.html"); -fs.writeFileSync(path.join(dir, "canvas.json"), JSON.stringify(canvas)); -// 3 · ONE publish: file_path = one changed file, files = the others -await files.publish({ file_path: "canvas.json", files: { "project/Pricing.dc.html": "project/Pricing.dc.html", "project/Faq.dc.html": "project/Faq.dc.html" } }); +fs.writeFileSync(path.join(dir, "project/canvas.json"), JSON.stringify(canvas, null, 2) + "\n"); +// 2 · ONE publish: file_path = one changed file, files = the others +await files.publish({ file_path: "project/canvas.json", files: { "project/Pricing.dc.html": "project/Pricing.dc.html", "project/Faq.dc.html": "project/Faq.dc.html" } }); ``` -Send `canvas.json` only when the layout changes, and keep every key of it you are not changing. Publish only `canvas.json` and files under `project/`: never `index.html`, `SKILL.md` or anything under `artifact-type/`. Files you leave out stay as they are; `"project/Old.dc.html": null` in `files` removes one you have read, with `canvas.json` sent too, its `boards` entry and its path in `order` taken out. If the publish is refused because someone saved in the meantime, or names files that changed, run this program again from its first line, once: its listing and reads pick up their version. If it names files that were not read, add a `files.read` of each to the program first. If it says you have not viewed the latest version, read the canvas's url with the Artifact tool once, then run the program again. Any other refusal: tell the user what it said and stop. Print only what you need from a file, never whole bodies you do not need: the output is capped. +Send `project/canvas.json` only when the layout changes, and keep every key of it you are not changing, its `createdOnFiles` or `convertedFrom` key included. Publish only files under `project/`: never `index.html`, `SKILL.md` or anything under `artifact-type/`. Files you leave out stay as they are; `"project/Old.dc.html": null` in `files` removes one you have read, with `project/canvas.json` sent too, its `boards` entry and its path in `order` taken out. If the publish is refused because someone saved in the meantime, or names files that changed, run this program again from its first line, once: its reads pick up their version. If it names files that were not read, add a `files.read` of each to the program first. If it says you have not viewed the latest version, read the canvas's url with the Artifact tool once, then run the program again. Any other refusal: tell the user what it said and stop. Print only what you need from a file, never whole bodies you do not need: the output is capped. -Every shape, limit and the write order above still apply. With that tool, do not use write_db or read_db for this canvas; without it, follow the steps above. +Every shape and limit above still applies. With that tool, do not use write_db or read_db for this canvas; without it, follow the steps above. diff --git a/system-prompts/system-reminder-appifactrepl-slides-deck-workflow.md b/system-prompts/system-reminder-appifactrepl-slides-deck-workflow.md index c813e40..a828b56 100644 --- a/system-prompts/system-reminder-appifactrepl-slides-deck-workflow.md +++ b/system-prompts/system-reminder-appifactrepl-slides-deck-workflow.md @@ -1,55 +1,45 @@ -[How to build and iterate on Slides decks efficiently] First list this deck's files. If `deck.json` is among them, the content lives in files: each slide is `project/slides/.html`, where is its entry in `deck.json`'s `order`. Then read each file you will change by its `path` and publish the changed ones back with `file_path` and `files`; include `deck.json` only when you add, remove or reorder slides or change anything else it holds, changing just those keys. If the AppifactRepl tool is among your tools, do all of that inside one program, as the last example below shows: `files.list()`, `files.read` or `files.readMany` for what you change, the new text written into `files.dir()`, ONE `files.publish`. Write nothing to the store of a deck kept as files except speaker notes, which stay store records at `notes/`, never in a file. If `deck.json` is not listed and the AppifactRepl tool is among your tools, use it for this deck instead of separate write_db / read_db calls. One call runs a short JavaScript program against this deck's store: a whole deck lands in one step, and each slide appears the moment its line runs. Call it as `{artifact: , code}`. Images and font files upload from inside the program, one call per file: put the file in `files.dir()`, then `(await claude.use("assets")).upload(path)` answers `{url, id}`, and each returned `url` goes in verbatim where the slide or font document names it. +[How to build and iterate on Slides decks efficiently] This deck's content lives in files under `project/`, nothing in the store: the index is `project/deck.json`, and each slide is `project/slides/.html`, where is its entry in the index's `order`; speaker notes are the `