diffs
Use when an app uses @pierre/diffs to render or edit code files, diffs, patches, merge conflicts, or CodeView review surfaces, including React, vanilla JavaScript, SSR, workers, annotations, selection, and custom Shiki languages or themes.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 12
- Forks
- 7
01 前言 Front Matter
- name
- diffs
- description
- Use when an app uses @pierre/diffs to render or edit code files, diffs, patches, merge conflicts, or CodeView review surfaces, including React, vanilla JavaScript, SSR, workers, annotations, selection, and custom Shiki languages or themes.
02 资源文件 17
- 参考文档references/api-core.md14.7 KB
- 参考文档references/api-editor.md17.6 KB
- 参考文档references/api-highlighting.md7.8 KB
- 参考文档references/api-react.md5.3 KB
- 参考文档references/api-rendering.md15.9 KB
- 参考文档references/api-ssr.md2.5 KB
- 参考文档references/api-types.md13.4 KB
- 参考文档references/api-worker.md7.5 KB
- 参考文档references/recipe-annotations.md814 B
- 参考文档references/recipe-code-view.md6.9 KB
- 参考文档references/recipe-custom-highlighting.md529 B
- 参考文档references/recipe-edit-react.md5.6 KB
- 参考文档references/recipe-edit-vanilla.md5.1 KB
- 参考文档references/recipe-react.md1.4 KB
- 参考文档references/recipe-ssr.md661 B
- 参考文档references/recipe-vanilla.md1.5 KB
- 参考文档references/recipe-workers.md744 B
03 SKILL.md 正文
@pierre/diffs
Use @pierre/diffs to render syntax-highlighted files and diffs. Use its optional editor, SSR, and worker entries for those capabilities.
Install
bun add @pierre/diffs
Install react and react-dom when the app uses the React entry.
Select an API reference
| Surface | Reference |
|---|---|
| Root components, parsing, and file extension APIs | Core API |
| Languages, themes, highlighter state, and streams | Highlighting API |
| Renderers, managers, DOM helpers, comparisons, and constants | Low-level rendering API |
| Shared data, option, render, selection, and editor types | Shared types |
@pierre/diffs/react |
React API |
@pierre/diffs/edit |
Editor API |
@pierre/diffs/ssr |
SSR API |
@pierre/diffs/worker and worker scripts |
Worker API |
Select a recipe
| Task | Recipe |
|---|---|
| Render a file or diff in React | Render with React |
| Render a file or diff without React | Render with vanilla JavaScript |
| Build a virtualized review surface | Use CodeView |
| Edit a React surface or CodeView | Edit with React |
| Edit a vanilla surface or CodeView | Edit with vanilla JavaScript |
| Preload markup on the server | Use SSR |
| Highlight through a worker pool | Use workers |
| Add line annotations and selection | Add annotations and selection |
| Register a Shiki language or theme | Register custom highlighting |
04 同仓库更多 Skills
shadcn
Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", "switch to --preset", and for building a design system or applying a DESIGN.md or brand spec to shadcn/ui.
request-review
Request an independent review from the opposite provider (Claude or Codex) of current local agent-session work, including local committed changes or a session proposal, then fix accepted findings and verify.
babysit-pr
Monitor a pull request through review and CI. Use when the user asks to monitor, watch, or babysit a PR.
slopcop
Configure automated GitHub issue and PR rules with the `bb slopcop` CLI. Use for new-issue listeners, pull-request reviews, rule changes, author restrictions, match checks, and shadow results.
tasks
Work on or manage records in BB Tasks, including task keys such as ABC-12.
secrets
Request user-supplied credentials securely into a dotenv file, or run a command with sudo after the user approves it, without exposing values to the agent.