本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)12k · #11517

diffs

できること

AIが、@pierre/diffsライブラリを使い、ReactまたはプレーンなJavaScriptで、ハイライト付きのコード、パッチ、レビュー画面を表示する手順を案内します。コード表示機能を作る開発者向けです。

使う場面

  • ✓WebアプリでコードファイルやDiffをシンタックスハイライト付きで表示する必要があるとき。
  • ✓コードレビューの画面や、マージの競合を表示する画面を作るとき。
  • ✓ReactまたはバニラJavaScriptで@pierre/diffsを使うとき。

スキルのリンク

https://github.com/trycompai/crm/blob/release/.agents/skills/diffs/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/trycompai/crm/blob/release/.agents/skills/diffs/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“@pierre/diffsライブラリを使って、私のReactアプリにコードの差分ビューアーを追加してもらえますか。”

毎週5つの新しいスキル。1分で読めます。

仕組み

AIはパッケージを導入し、Reactまたはエディターのリファレンスから合うものを選び、ライブラリのコンポーネントでファイルや差分を表示します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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.
よくある質問

どのフレームワークに対応していますか?

ReactとバニラJavaScriptに対応し、サーバーサイドレンダリングとワーカーにも触れています。

ユーザーがコードを編集できますか?

はい。編集用の画面向けに、任意のエディターの入口があります。

参照文書はすべて含まれていますか?

すべてではありません。一部の参照はスキルにコピーされていないため、それらについてはAIがパッケージの型定義と上流の文書を読む必要があります。

詳細

作者による元の説明

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

人気

GitHubのスター
12k
ランキング
#11517
ライセンス
MIT
更新日
2026/11/1

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル