Skip to content
Skillpedia
Websites & UI (frontend)12k · #11517

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.md

Copy 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

Use this skill to help me: https://github.com/trycompai/crm/blob/release/.agents/skills/diffs/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

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

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills