diffs
What it does
It guides the AI through using the @pierre/diffs library to render highlighted code, patches and review screens in React or plain JavaScript. It is for developers building code viewing features.
When to use it
- ✓When your web app needs to show code files or diffs with syntax highlighting.
- ✓When you build a code review screen or a merge conflict view.
- ✓When you use @pierre/diffs in React or in vanilla JavaScript.
Skill link
https://github.com/trycompai/crm/blob/release/.agents/skills/diffs/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you add a code diff viewer to my React app using the @pierre/diffs library?”
5 new skills a week. 1 minute to read.
How it works
The AI installs the package, picks the matching React or editor reference and renders the file or diff with the library's components.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
@pierre/diffs
Use @pierre/diffs to render syntax-highlighted files and diffs. Use its
optional editor, SSR, and worker entries for those capabilities.
Install
pnpm add @pierre/diffs
Install react and react-dom when the app uses the React entry.
Select an API reference
| Surface | Reference |
|---|---|
@pierre/diffs/react |
React API |
@pierre/diffs/edit |
Editor API |
Select a recipe
| Task | Recipe |
|---|---|
| Render a file or diff in React | Render with React |
| Build a virtualized review surface | Use CodeView |
| Edit a React surface or CodeView | Edit with React |
Not vendored here
These references were not copied into this skill. There is no local file for them. Read the package types and the upstream documentation instead.
- Core API: root components, parsing, and file extension APIs.
- Highlighting API: languages, themes, highlighter state, and streams.
- Low-level rendering API: renderers, managers, DOM helpers, and constants.
- Shared types: data, option, render, selection, and editor types.
- SSR API for
@pierre/diffs/ssr, and the recipe for preloading server markup. - Worker API for
@pierre/diffs/worker, and the recipe for a worker pool. - Recipes for vanilla JavaScript rendering and vanilla editing.
- Recipes for line annotations and selection.
- Recipe for registering a custom Shiki language or theme.
FAQ
Which frameworks does it support?
It covers React and vanilla JavaScript, and it mentions server rendering and workers.
Can users edit code with it?
Yes, it has an optional editor entry for editing surfaces.
Are all the reference docs included?
Not all. Some references were not copied into the skill, so the AI must read the package types and upstream docs for those.
Details
Original description by the author
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.
repo: trycompai/crm
Popularity
- GitHub stars
- 12k
- Ranking position
- #11517
- License
- MIT
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
ai-elements
12kHelps your agent build AI chat interfaces with ready-made components for conversations, messages, tool displays and prompt inputs.
ai-sdk
12kHelps your agent build AI features with the Vercel AI SDK, including text generation, streaming, tool calling and agents.
better-accessibility
12kHelps your agent make interfaces usable with a keyboard and screen readers, covering focus, labels, ARIA and forms.
better-auth-best-practices
12kHelps your agent set up Better Auth for login, sessions, OAuth and plugins in a TypeScript app, following its documented steps.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.