Agent skill

@pierre/diffs Code Rendering

by pierrecomputer in pierrecomputer/pierre

Guides an agent through using @pierre/diffs to render syntax-highlighted files and diffs, and to build editing and review surfaces in React or plain JavaScript.

Apache-2.0Auto-check passedDevelopment

Install @pierre/diffs Code Rendering

skills CLI
$ npx skills add pierrecomputer/pierre --skill diffs -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pierrecomputer/pierre diffs --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pierrecomputer/pierre.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/diffs .claude/skills/diffs && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
diffs
GitHub stars
6.2k
Used in
2 other repos
Token cost
~803 tokens
SKILL.md length
186 words
Files
18 (incl. references)
Skills in repo
10
Repo updated
First seen
Licence
Apache-2.0

At a glance

Guides an agent through using @pierre/diffs to render syntax-highlighted files and diffs, and to build editing and review surfaces in React or plain JavaScript.

  • Adding a syntax-highlighted diff viewer to a React app
  • SKILL.md covers Install, Select an API reference and Select a recipe
  • Calls pnpm
  • Building a code review surface with annotations and selection

What it does

The skill acts as a router into the @pierre/diffs library. It gives the install command for pnpm, adds react and react-dom when the React entry is used, and then points to an API reference for each surface: core components and parsing, highlighting, low-level rendering, shared types, and the react, edit, ssr and worker entry points.

A second table maps tasks to recipes: rendering a file or diff in React or without it, building a virtualized CodeView review surface, editing in either style, adding annotations, custom highlighting with Shiki languages or themes, server-side rendering and worker setups. Standalone HTML or token generation with @pierre/highlights is left to a separate highlights skill.

When your agent uses it

  • Adding a syntax-highlighted diff viewer to a React app
  • Building a code review surface with annotations and selection
  • Rendering diffs on the server or moving highlighting into a worker
  • Applying a custom Shiki theme or language to a diff view

Example prompts

  • “Render the patch in ./changes.diff inside our React dashboard with @pierre/diffs.”
  • “Add inline annotations to the diff view on the review page.”
  • “Move syntax highlighting into a Web Worker so large diffs do not freeze the page.”

Requirements

  • The @pierre/diffs package, installed with pnpm
  • react and react-dom for the React entry

What it can do on your machine

Read from SKILL.md and the folder at commit d302ea0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

@pierre/diffs Code Rendering loads about 803 tokens when it runs, and up to ~28k if it reads all its reference files. Until then it costs about 61 tokens; SKILL.md has 186 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~803
With references · SKILL.md plus every file in references/, read only if the agent opens them
~28k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pierrecomputer/pierre at commit d302ea0, republished under its Apache-2.0 licence (© pierrecomputer). 186 words, ~803 tokens.

Download SKILL.mdSave it as .claude/skills/diffs/SKILL.md (or your agent's skills folder). This skill also uses 17 other files; get the full folder from GitHub.
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.

@pierre/diffs

Use @pierre/diffs to render syntax-highlighted files and diffs. Use its optional editor, SSR, and worker entries for those capabilities.

For standalone HTML or token generation with @pierre/highlights, read the highlights skill.

Install

bash
pnpm add @pierre/diffs

Install react and react-dom when the app uses the React entry.

Select an API reference

SurfaceReference
Root components, parsing, and file extension APIsCore API
Languages, themes, highlighter state, and streamsHighlighting API
Renderers, managers, DOM helpers, comparisons, and constantsLow-level rendering API
Shared data, option, render, selection, and editor typesShared types
@pierre/diffs/reactReact API
@pierre/diffs/editEditor API
@pierre/diffs/ssrSSR API
@pierre/diffs/worker and worker scriptsWorker API

Select a recipe

TaskRecipe
Render a file or diff in ReactRender with React
Render a file or diff without ReactRender with vanilla JavaScript
Build a virtualized review surfaceUse CodeView
Edit a React surface or CodeViewEdit with React
Edit a vanilla surface or CodeViewEdit with vanilla JavaScript
Preload markup on the serverUse SSR
Highlight through a worker poolUse workers
Add line annotations and selectionAdd annotations and selection
Register a Shiki language or themeRegister custom highlighting

© pierrecomputer, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 17 other files (references) in skills/diffs of pierrecomputer/pierre.

  • SKILL.md
  • references/api-core.md
  • references/api-editor.md
  • references/api-highlighting.md
  • references/api-react.md
  • references/api-rendering.md
  • references/api-ssr.md
  • references/api-types.md
  • references/api-worker.md
  • references/recipe-annotations.md
  • references/recipe-code-view.md
  • references/recipe-custom-highlighting.md
  • references/recipe-edit-react.md
  • references/recipe-edit-vanilla.md
  • references/recipe-react.md
  • references/recipe-ssr.md
  • references/recipe-vanilla.md
  • references/recipe-workers.md

Open the folder on GitHubat commit d302ea0

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in pierrecomputer/pierre, which our catalogue first saw on October 7, 2026.

Compare with similar skills

@pierre/diffs Code Rendering next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

@pierre/diffs Code Rendering compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
@pierre/diffs Code Rendering this skillpierrecomputer/pierre6.2k2 repos~803Automated safety check: PassApache-2.0
React Best Practicesshapeshift/web2061 repos~2kAutomated safety check: PassMIT
Frontend Code Reviewlangflow-ai/langflow156k—~1.6kAutomated safety check: PassMIT
Creating Docs Code Exampleshandsontable/handsontable22k—~2.2kAutomated safety check: PassCustom licence
Moai Ref React Patternsmodu-ai/moai-adk1.2k—~1.8kAutomated safety check: PassApache-2.0
Typescript Rulesshinpr/claude-code-workflows691—~1.8kAutomated safety check: PassMIT

Similar skills

  • React Best Practices

    shapeshift/web

    Comprehensive React and Next.js performance optimization guide with 40+ rules for eliminating waterfalls, optimizing bundles, and improving rendering.

    206 GitHub starsUsed in 1 repo~2k tokens
    DevelopmentAuto-check passed
  • Frontend Code Review

    langflow-ai/langflow

    Review frontend code (.tsx, .ts, .js files) for quality, performance, and correctness against Langflow's frontend conventions.

    156k GitHub stars~1.6k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Creating Docs Code Examples

    handsontable/handsontable

    Sets the rules for writing Handsontable documentation examples in JavaScript, TypeScript, React, Angular and Vue, with the imports, registration and licence key each needs.

    22k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Moai Ref React Patterns

    modu-ai/moai-adk

    React/Next.js component design patterns, state management strategies, and project structure reference for frontend development.

    1.2k GitHub stars~1.8k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Typescript Rules

    shinpr/claude-code-workflows

    React/TypeScript frontend development rules including type safety, component design, state management, and error handling.

    691 GitHub stars~1.8k tokensUpdated 6 days ago
    Frontend & DesignAuto-check passed
  • Wp Block Development

    jorgerosal/wordpress-skills

    WordPress block editor code review and Gutenberg block development patterns for WordPress 6.x+.

    101 GitHub stars~12k tokensUpdated 4 mo ago
    Frontend & DesignAuto-check passed

More from pierrecomputer/pierre

All 10 skills in this repo
  • Pierre Theming Library

    pierrecomputer/pierre

    Explains how to use the @pierre/theming package to list, resolve, select, switch and persist themes, with controller, color and React references.

    6.2k GitHub stars~661 tokensUpdated today
    Auto-check passed
  • Pierre Trees File Tree

    pierrecomputer/pierre

    Use when an app uses @pierre/trees to render or control a file tree, including React, vanilla JavaScript, SSR, web components, selection, search, rename, drag…

    6.2k GitHub stars~473 tokensUpdated today
    Auto-check passed
  • Pierre Highlights

    pierrecomputer/pierre

    Shows how to use @pierre/highlights for syntax-highlighted HTML or tokens, streaming and incremental tokenizing, and Zed-compatible themes with CSS variables.

    6.2k GitHub stars~409 tokensUpdated today
    Auto-check passed
  • Chooses the right verification step after a code change in Pierre's monorepo: format and lint, a typecheck, Bun unit tests, snapshots, or Playwright E2E.

    6.2k GitHub stars~608 tokensUpdated today
    Auto-check passed
  • Pierre Theme Package

    pierrecomputer/pierre

    Shows an agent how to install and use the @pierre/theme package, which ships ten Pierre light and dark color themes for Shiki and VS Code.

    6.2k GitHub stars~352 tokensUpdated today
    Auto-check passed
  • Sets one monorepo's rules for toolchain pins, pnpm package operations, the shared dependency catalog and moon tasks, so the agent adds versions and scripts the right way.

    6.2k GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Questions about @pierre/diffs Code Rendering

What does @pierre/diffs Code Rendering do?

Guides an agent through using @pierre/diffs to render syntax-highlighted files and diffs, and to build editing and review surfaces in React or plain JavaScript. The skill acts as a router into the @pierre/diffs library. It gives the install command for pnpm, adds react and react-dom when the React entry is used, and then points to an API reference for each surface: core components and parsing, highlighting, low-level rendering, shared types, and the react, edit, ssr and worker entry points.

When should I use @pierre/diffs Code Rendering?

@pierre/diffs Code Rendering fits situations like: adding a syntax-highlighted diff viewer to a React app; building a code review surface with annotations and selection; rendering diffs on the server or moving highlighting into a worker; applying a custom Shiki theme or language to a diff view.

How do I install @pierre/diffs Code Rendering in Claude Code?

Run `npx skills add pierrecomputer/pierre --skill diffs -a claude-code`. Or copy the skill folder (skills/diffs in pierrecomputer/pierre) into .claude/skills/diffs in your project. Claude Code loads it when a task matches its description.

How do I install @pierre/diffs Code Rendering in Codex?

Run `npx skills add pierrecomputer/pierre --skill diffs -a codex`. Or copy the skill folder (skills/diffs in pierrecomputer/pierre) into .agents/skills/diffs in your project. Codex loads it when a task matches its description.

Can I use @pierre/diffs Code Rendering in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pierrecomputer/pierre --skill diffs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/diffs, .gemini/skills/diffs, .github/skills/diffs and .opencode/skills/diffs in your project.

What does @pierre/diffs Code Rendering need to run?

Going by SKILL.md and its folder, @pierre/diffs Code Rendering needs the command-line tools its instructions call (pnpm). Our summary lists: The @pierre/diffs package, installed with pnpm; react and react-dom for the React entry.

Does @pierre/diffs Code Rendering access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is @pierre/diffs Code Rendering safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does @pierre/diffs Code Rendering use?

@pierre/diffs Code Rendering is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does @pierre/diffs Code Rendering use?

About 803 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 28k tokens, read only when the agent opens those files.

What are the alternatives to @pierre/diffs Code Rendering?

Skills that share tags, products or a category with @pierre/diffs Code Rendering: React Best Practices (shapeshift/web, 206 stars), Frontend Code Review (langflow-ai/langflow, 156k stars), Creating Docs Code Examples (handsontable/handsontable, 22k stars) and Moai Ref React Patterns (modu-ai/moai-adk, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains @pierre/diffs Code Rendering?

pierrecomputer (a GitHub organization) maintains it in pierrecomputer/pierre, which has 6,244 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 8, 2026.

Source: pierrecomputer/pierre on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.