From 4cd566a1ec0403e01055d3d400092b087a076697 Mon Sep 17 00:00:00 2001 From: Mike Date: Wed, 3 Jun 2026 16:00:08 -0600 Subject: [PATCH] v2.1.162 (+9,871 tokens) --- README.md | 16 +- .../skill-design-sync-package-source-shape.md | 199 +++++++++++++++++ .../skill-design-sync-slash-command.md | 199 +---------------- ...kill-design-sync-storybook-source-shape.md | 207 ++++++++++++++++++ ...it-claudemd-and-skill-setup-new-version.md | 6 +- ...git-commit-and-pr-creation-instructions.md | 7 +- system-prompts/tool-description-designsync.md | 8 +- system-prompts/tool-description-lsp.md | 7 +- .../tool-description-notebookedit.md | 14 +- 9 files changed, 450 insertions(+), 213 deletions(-) create mode 100644 system-prompts/skill-design-sync-package-source-shape.md create mode 100644 system-prompts/skill-design-sync-storybook-source-shape.md diff --git a/README.md b/README.md index b333738..bb261c2 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.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 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.162](https://www.npmjs.com/package/@anthropic-ai/claude-code/v/2.1.162) (June 3rd, 2026).** It also contains a [**CHANGELOG.md**](./CHANGELOG.md) for the system prompts across 197 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.** @@ -312,15 +312,15 @@ Text for large system reminders. - [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. -- [Tool Description: DesignSync](./system-prompts/tool-description-designsync.md) (**938** tks) - Describes the DesignSync tool for reading and updating claude.ai/design design-system projects, including project listing, plan finalization, file writes and deletes, and asset registration. +- [Tool Description: DesignSync](./system-prompts/tool-description-designsync.md) (**904** tks) - Describes the DesignSync tool for reading and updating claude.ai/design design-system projects, including project listing, plan finalization, file writes and deletes, and asset registration. - [Tool Description: Edit](./system-prompts/tool-description-edit.md) (**202** tks) - Tool for performing exact string replacements in files. - [Tool Description: EnterPlanMode](./system-prompts/tool-description-enterplanmode.md) (**881** tks) - Tool description for entering plan mode to explore and design implementation approaches. - [Tool Description: EnterWorktree](./system-prompts/tool-description-enterworktree.md) (**774** tks) - Tool description for the EnterWorktree tool. - [Tool Description: ExitPlanMode](./system-prompts/tool-description-exitplanmode.md) (**417** 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) - Roughly, the reverse of the ExitWorktree. - [Tool Description: Grep](./system-prompts/tool-description-grep.md) (**300** tks) - Tool description for content search using ripgrep. -- [Tool Description: LSP](./system-prompts/tool-description-lsp.md) (**255** tks) - Description for the LSP tool. -- [Tool Description: NotebookEdit](./system-prompts/tool-description-notebookedit.md) (**121** tks) - Tool description for editing Jupyter notebook cells. +- [Tool Description: LSP](./system-prompts/tool-description-lsp.md) (**298** tks) - Description for the LSP tool. +- [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: PowerShell](./system-prompts/tool-description-powershell.md) (**1914** tks) - Describes the PowerShell command execution tool with syntax guidance, timeout settings, and instructions to prefer specialized tools over PowerShell for file operations. - [Tool Description: PushNotification](./system-prompts/tool-description-pushnotification.md) (**261** tks) - Tool description for PushNotification. This is a tool that sends a desktop notification in the user's terminal and pushes to their phone if Remote Control is connected. - [Tool Description: REPL](./system-prompts/tool-description-repl.md) (**715** tks) - Describes the REPL tool, a JavaScript programming interface for looping, branching, and composing Claude Code tool calls as async functions. @@ -344,7 +344,7 @@ Text for large system reminders. - [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) (**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 (Git commit and PR creation instructions)](./system-prompts/tool-description-bash-git-commit-and-pr-creation-instructions.md) (**1665** 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. - [Tool Description: Bash (alternative — edit files)](./system-prompts/tool-description-bash-alternative-edit-files.md) (**27** tks) - Bash tool alternative: use Edit for file editing instead of sed/awk. @@ -401,9 +401,11 @@ Text for large system reminders. Built-in skill prompts for specialized tasks. - [Skill: /catch-up periodic heartbeat](./system-prompts/skill-catch-up-periodic-heartbeat.md) (**1591** tks) - Skill definition for the /catch-up periodic heartbeat that scans current priorities, triages actionable changes, reports a short digest, and updates catch-up state. -- [Skill: /design-sync slash command](./system-prompts/skill-design-sync-slash-command.md) (**10052** tks) - Skill definition for syncing a React design system to claude.ai/design, including project selection, converter configuration, validation, upload planning, and self-check behavior. +- [Skill: /design-sync Storybook source shape](./system-prompts/skill-design-sync-storybook-source-shape.md) (**9705** tks) - Shape-specific /design-sync instructions for syncing a React design system from Storybook stories and built package output. +- [Skill: /design-sync package source shape](./system-prompts/skill-design-sync-package-source-shape.md) (**8928** tks) - Shape-specific /design-sync instructions for syncing a React design system from a built package without Storybook. +- [Skill: /design-sync slash command](./system-prompts/skill-design-sync-slash-command.md) (**1154** tks) - Skill definition for syncing a React design system to claude.ai/design, including project selection, source-shape detection, converter configuration, validation, upload planning, and self-check behavior. - [Skill: /dream memory consolidation](./system-prompts/skill-dream-memory-consolidation.md) (**512** tks) - Skill definition for the /dream nightly housekeeping job that consolidates recent logs and transcripts into persistent memory topics, learnings, and a pruned MEMORY.md index. -- [Skill: /init CLAUDE.md and skill setup (new version)](./system-prompts/skill-init-claudemd-and-skill-setup-new-version.md) (**5384** tks) - A comprehensive onboarding flow for setting up CLAUDE.md and related skills/hooks in the current repository, including codebase exploration, user interviews, and iterative proposal refinement. +- [Skill: /init CLAUDE.md and skill setup (new version)](./system-prompts/skill-init-claudemd-and-skill-setup-new-version.md) (**5412** tks) - A comprehensive onboarding flow for setting up CLAUDE.md and related skills/hooks in the current repository, including codebase exploration, user interviews, and iterative proposal refinement. - [Skill: /insights report output](./system-prompts/skill-insights-report-output.md) (**182** tks) - Formats and displays the insights usage report results after the user runs the /insights slash command. - [Skill: /loop cloud-first scheduling offer](./system-prompts/skill-loop-cloud-first-scheduling-offer.md) (**510** tks) - Decision tree for offering cloud-based scheduling before falling back to local session loops in the /loop command. - [Skill: /loop self-pacing mode](./system-prompts/skill-loop-self-pacing-mode.md) (**678** tks) - Instructs Claude how to self-pace a recurring loop by arming event monitors as primary wake signals and scheduling fallback heartbeat delays between iterations. diff --git a/system-prompts/skill-design-sync-package-source-shape.md b/system-prompts/skill-design-sync-package-source-shape.md new file mode 100644 index 0000000..66c2165 --- /dev/null +++ b/system-prompts/skill-design-sync-package-source-shape.md @@ -0,0 +1,199 @@ + +# Package source shape + +No Storybook — the component list comes from the package's shipped `.d.ts` exports. Previews are generated from the `.d.ts` prop types plus `cfg.previewArgs`. + +## 2. Explore, then write config (continued) + +3. The converter needs the built `dist/` entry + its `.d.ts` tree. Check whether the entry (from `package.json` `module`/`main`/`exports['.']`) already exists — install may have built it via `prepare`. If missing: + - Run ` run build`. No `build` script → try `prepare`/`prepack`. In a monorepo, the build may be at the repo root (`turbo build --filter=`, `pnpm -F build`, `nx build `). **Some build scripts fork a watcher and exit 0 early — after the command returns, `ls` the expected output (dist/, build/esm/, or whatever `package.json` `module`/`main` points at) and confirm it's populated before continuing.** If it's empty, check for a `--watch` flag in the script and use the one-shot variant, or poll the output dir. + - Still missing → `AskUserQuestion`("What command builds this package?", options = any `scripts.*` containing `tsc|tsup|rollup|vite build|esbuild|swc`, plus freeform). Record the answer as `buildCmd` in the config. + - User says there's no build → the converter will synthesize an entry from `src/` (last resort — `.d.ts` contracts will be weaker; recommend adding a build). +4. **Check what's already in the project.** `DesignSync(list_files)` on the target. If it returns files, read `_ds_bundle.js` via `DesignSync(get_file)` and note the component names from its first-line `/* @ds-bundle: {…} */` header — but **always still rebuild** (step 7); the existing bundle is stale the moment source changes. The header's `sourceHashes` diff decides what to *upload* incrementally via `DesignSync`, not what to build. +5. **Confirm the plan with the user before building.** `AskUserQuestion` with: the component list you found (or a count + a few names if it's long), which files the tokens/CSS are coming from, and which build command you'll run. The build can take minutes and burn tokens — aligning now avoids re-running because it was pointed at the wrong package or missed half the components. + - If the project already has N components (step 4), include that in the question and offer the scope: **(a)** full rebuild + re-upload everything, **(b)** update only the changed components (diff from `sourceHashes`), **(c)** tokens + CSS only (no component rebuild). Default to (b) when the diff is small. +6. **Write `design-sync.config.json` and commit it** — re-sync reuses it so output is reproducible. Only `pkg` and `globalName` are required. **If the file already exists, read it first and preserve `previewArgs`, `dtsPropsFor`, `libOverrides`, and `overrides` — only add to those fields, never replace them.** They accumulate fixes from prior verify-loop iterations. **Also Read `.design-sync/NOTES.md` (or whatever `cfg.notes` points at) before anything else** — it holds repo-specific gotchas a prior sync recorded. + + | Field | Value | + |---|---| + | `pkg` / `globalName` | package name and the `window.*` global to assign — required | + | `shape` | `'storybook'` or `'package'` — pins the source shape (overrides auto-detection). Written on first run. | + | `buildCmd` | the discovered build command; re-sync re-runs it | + | `srcDir` | source root when not `src/`/`lib/`/`components/` | + | `tsconfig` | path to `tsconfig.json` — esbuild reads `compilerOptions.paths` so `@/…` path aliases resolve in synth-entry mode | + | `extraEntries` | package names to merge into `window.` alongside the DS entry (e.g. the DS's separate icon package). Sibling icon packages under the same scope are auto-detected (`[ICON_PKG]`). | + | `componentSrcMap` | **sparse** `{Name: path}` — non-null pins/adds a component's src path; `null` excludes a `.d.ts`-exported internal | + | `dtsPropsFor` | `{Name: "prop?: Type; …"}` — hand-written `Props` body when auto-extraction fails (complex generics, cross-package types) | + | `previewArgs` | `{Name: {prop: value, …}}` — props rendered as a `Preview` export in the auto-generated `.design-sync/previews/.tsx`. Use for simple flat props; for composed JSX children edit the `.tsx` directly. | + | `cssEntry` / `tokensPkg` / `tokensGlob` | stylesheet + token files | + | `docsDir` | directory (package-relative; may point outside, e.g. `../../apps/docs`) holding per-component `.md`/`.mdx` docs. Auto-detected as `docs/` or `documentation/` under the package. | + | `docsMap` | sparse `{Name: path \| null}` — explicit doc path per component (overrides discovery); `null` excludes | + | `guidelinesGlob` | string or string[] (package-relative) of design-guideline `.md` files to copy into `guidelines/`. Default `['docs/guides/**/*.md', 'docs/*.md', 'guides/**/*.md']`. | + | `extraFonts` | paths (package-relative; may point outside the package, e.g. a sibling typography package) to `@font-face` `.css` files or bare `.woff2`/`.ttf`/`.otf` for brand families the DS expects its host app to provide. CSS entries are parsed and their local font files copied to `fonts/`; bare font files are copied as-is. Use when validate prints `[FONT_MISSING]`. | + | `runtimeFontPrefixes` | string[] — family-name prefixes for fonts the host app serves at runtime from a font service (via a `