AgentSkillsCN

diff-parsing-and-rendering

@pierre/diffs代码/文件差异渲染库的参考手册(适用于React、原生JS、SSR、Worker Pool、缓存机制)。当您需要了解API的使用方法、安装步骤,或获取解析差异、渲染文件、调整选项的详细配置信息时,可使用此手册。

SKILL.md
--- frontmatter
name: diff-parsing-and-rendering
description: Reference for the @pierre/diffs code/file diff rendering library (React, vanilla JS, SSR, worker pool, caching). Use when you need API usage, setup, or configuration details for parsing diffs, rendering files, or tuning options.

Pierre Diffs Docs

Use this skill to navigate the Pierre Diffs documentation and pull exact API patterns, types, and options.

How to use

Open pierre-diffs-docs.md to pick the right file, then jump to the relevant section using search. Prefer targeted searches (e.g., "MultiFileDiff", "parsePatchFiles", "WorkerPool", "preload").

Section map

Usage reminders

  • Keep FileContents and FileDiffMetadata objects stable; components use reference equality.
  • Use cacheKey consistently when enabling worker pool caching; change the key whenever content changes.
  • expandUnchanged requires oldLines/newLines (available when using parseDiffFromFile).