Diffs
openclaw/openclaw
Use the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
Step-by-step guide for adding a new diff output renderer to diffsitter.
$ npx skills add afnanenayet/diffsitter --skill add-renderer -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install afnanenayet/diffsitter add-renderer --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/afnanenayet/diffsitter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-renderer .claude/skills/add-renderer && rm -rf skills-srcUse ~/.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/
Install the "add-renderer" agent skill from https://github.com/afnanenayet/diffsitter/tree/main/.claude/skills/add-renderer into .claude/skills/add-renderer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-renderer", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/afnanenayet/diffsitter/tree/main/.claude/skills/add-rendererType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add afnanenayet/diffsitter --skill add-renderer -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install afnanenayet/diffsitter add-renderer --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/afnanenayet/diffsitter.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/add-renderer .agents/skills/add-renderer && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "add-renderer" agent skill from https://github.com/afnanenayet/diffsitter/tree/main/.claude/skills/add-renderer into .agents/skills/add-renderer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-renderer", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add afnanenayet/diffsitter --skill add-renderer -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install afnanenayet/diffsitter add-renderer --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/afnanenayet/diffsitter.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/add-renderer .cursor/skills/add-renderer && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "add-renderer" agent skill from https://github.com/afnanenayet/diffsitter/tree/main/.claude/skills/add-renderer into .cursor/skills/add-renderer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-renderer", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/afnanenayet/diffsitter.git --path .claude/skills/add-renderer--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add afnanenayet/diffsitter --skill add-renderer -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install afnanenayet/diffsitter add-renderer --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/afnanenayet/diffsitter.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/add-renderer .gemini/skills/add-renderer && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "add-renderer" agent skill from https://github.com/afnanenayet/diffsitter/tree/main/.claude/skills/add-renderer into .gemini/skills/add-renderer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-renderer", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install afnanenayet/diffsitter add-rendererInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add afnanenayet/diffsitter --skill add-renderer -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/afnanenayet/diffsitter.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/add-renderer .github/skills/add-renderer && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "add-renderer" agent skill from https://github.com/afnanenayet/diffsitter/tree/main/.claude/skills/add-renderer into .github/skills/add-renderer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-renderer", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add afnanenayet/diffsitter --skill add-renderer -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install afnanenayet/diffsitter add-renderer --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/afnanenayet/diffsitter.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/add-renderer .opencode/skills/add-renderer && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "add-renderer" agent skill from https://github.com/afnanenayet/diffsitter/tree/main/.claude/skills/add-renderer into .opencode/skills/add-renderer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-renderer", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
add-rendererStep-by-step guide for adding a new diff output renderer to diffsitter.
Add Renderer is an agent skill from afnanenayet/diffsitter. Step-by-step guide for adding a new diff output renderer to diffsitter. Use when adding a new output format.
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: A tree-sitter based AST difftool to get meaningful semantic diffs. The licence is MIT.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit a5a6681. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadGrepGlobBashEditWriteFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
cargoFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Add Renderer loads about 1.4k tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 411 words of instructions outside code blocks.
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.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Read, Grep, Glob, Bash, Edit, WriteAutomated 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.
The full file from afnanenayet/diffsitter at commit a5a6681, republished under its MIT licence (© afnanenayet). 411 words, ~1,438 tokens.
.claude/skills/add-renderer/SKILL.md (or your agent's skills folder).Follow this checklist to add a new diff output renderer named $ARGUMENTS. If the user did not provide a name, ask for one before proceeding.
Read these files first to understand the existing patterns:
src/render/mod.rs -- trait definition, enum, configsrc/render/json.rs -- minimal renderer examplesrc/render/unified.rs -- full-featured renderer examplesrc/config.rs -- top-level config structassets/sample_config.json5 -- sample config (CI parses this as a test)Create src/render/$ARGUMENTS.rs with a struct that derives the required traits:
use super::DisplayData;
use crate::render::Renderer;
use console::Term;
use serde::{Deserialize, Serialize};
use std::io::Write;
/// A renderer that outputs diffs in $ARGUMENTS format.
#[derive(Serialize, Deserialize, Clone, Eq, PartialEq, Debug, Default)]
pub struct $ARGUMENTS_PASCAL_CASE {
// Add configuration fields here.
// Each field should be serializable for the config system.
}
impl Renderer for $ARGUMENTS_PASCAL_CASE {
fn render(
&self,
writer: &mut dyn Write,
data: &DisplayData,
term_info: Option<&Term>,
) -> anyhow::Result<()> {
// Implementation goes here.
// `data.hunks` contains `RichHunks` (Vec<RichHunk> where RichHunk = DocumentType<Hunk>)
// `data.old` and `data.new` contain DocumentDiffData { filename, text }
// `term_info` provides terminal dimensions if the output is a TTY
todo!()
}
}Key types available in DisplayData:
data.hunks.0 -- Vec<RichHunk<'a>> where RichHunk is DocumentType<Hunk>Hunk contains Vec<Line>, each Line has line_index: usize and entries: Vec<&Entry>Entry has text: Cow<str>, start_position: Point, end_position: Point, kind_id: u16DocumentType::Old(hunk) / DocumentType::New(hunk) distinguishes old vs new document hunksUse src/render/json.rs as a minimal reference (just serializes DisplayData to JSON). Use src/render/unified.rs for a full-featured example with terminal colors, hunk titles, and line-by-line rendering.
src/render/mod.rsAdd the module declaration and use statement near the top:
mod $ARGUMENTS;
use self::$ARGUMENTS::$ARGUMENTS_PASCAL_CASE;These go alongside the existing:
mod json;
mod unified;
use self::json::Json;
use unified::Unified;Renderers enumAdd your variant to the Renderers enum in src/render/mod.rs:
#[enum_dispatch]
#[derive(Clone, Eq, PartialEq, Debug, Serialize, Deserialize, Display, EnumIter, EnumString)]
#[strum(serialize_all = "snake_case")]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum Renderers {
Unified,
Json,
$ARGUMENTS_PASCAL_CASE, // <-- add this
}The enum_dispatch attribute automatically generates the Renderer trait dispatch for the new variant. The strum and serde derives handle string conversion and serialization using the snake_case name.
RenderConfigIn src/render/mod.rs, add a field to RenderConfig:
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Clone)]
#[serde(rename_all = "snake_case", default)]
pub struct RenderConfig {
default: String,
unified: unified::Unified,
json: json::Json,
$ARGUMENTS: $ARGUMENTS::$ARGUMENTS_PASCAL_CASE, // <-- add this
}Update the Default impl for RenderConfig:
impl Default for RenderConfig {
fn default() -> Self {
let default_renderer = Renderers::default();
RenderConfig {
default: default_renderer.to_string(),
unified: Unified::default(),
json: Json::default(),
$ARGUMENTS: $ARGUMENTS_PASCAL_CASE::default(), // <-- add this
}
}
}assets/sample_config.json5Add a section for the new renderer's configuration under the "formatting" key. CI parses this file as a test (test_sample_config in src/config.rs), so it must be valid.
At minimum:
#[test_case("$ARGUMENTS")] line to the test_get_renderer_custom_tag test in src/render/mod.rs:#[test_case("unified")]
#[test_case("json")]
#[test_case("$ARGUMENTS")] // <-- add this
fn test_get_renderer_custom_tag(tag: &str) {Add unit tests in your renderer module for any non-trivial logic.
Consider adding snapshot tests with insta if the output format is complex.
cargo build
cargo test --allIf you updated sample_config.json5, the test_sample_config test will verify it parses correctly.
Default derive/impl: The RenderConfig uses #[serde(default)], so your struct must implement Default.Renderers enum uses snake_case serialization via strum/serde. Your variant MyRenderer becomes "my_renderer" as a string tag.writer is generic: Don't assume stdout. The renderer receives &mut dyn Write which could be a buffered terminal, a pager, or a file.term_info may be None: If the output is piped or redirected, there is no terminal. Handle gracefully (see how unified.rs handles missing terminal width).© afnanenayet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/add-renderer of afnanenayet/diffsitter.
Open the folder on GitHubat commit a5a6681
Add Renderer 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Add Renderer this skillafnanenayet/diffsitter | 2.4k | — | ~1.4k | Automated safety check: Notes | MIT | |
| Diffsopenclaw/openclaw | 392k | 4 repos | ~461 | Automated safety check: Pass | MIT | |
| @pierre/diffs Code Renderingpierrecomputer/pierre | 6.3k | 2 repos | ~803 | Automated safety check: Pass | Apache-2.0 | |
| Diff Reviewnexu-io/open-design | 100k | — | ~508 | Automated safety check: Pass | Apache-2.0 | |
| Render Blockingthedaviddias/Front-End-Checklist | 74k | — | ~430 | Automated safety check: Pass | MIT | |
| Accesslint Diffsickn33/agentic-awesome-skills | 47k | 1 repos | ~1.2k | Automated safety check: Pass | MIT |
openclaw/openclaw
Use the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
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.
nexu-io/open-design
Render the patch-edit run's accumulated changes as a reviewable diff, surface it through a GenUI choice surface, and persist the user's accept / reject decision into the artifact manifest.
thedaviddias/Front-End-Checklist
A skill your agent uses when auditing slow page loads, heavy assets, or rendering delays related to Eliminate render-blocking resources.
sickn33/agentic-awesome-skills
Diff a live page's accessibility violations against a baseline — by default compares uncommitted changes (stash-based), or pass --branch [<name] to diff against a branch.
LeoYeAI/openclaw-master-skills
Deploy and operate apps on Render (Blueprint + one-click Dashboard deeplink, same flow as Codex render-deploy).
afnanenayet/diffsitter
Step-by-step guide for adding a new tree-sitter language grammar to diffsitter.
afnanenayet/diffsitter
Diagnose unexpected diff output by tracing the pipeline from parsing through AST processing to hunk generation.
afnanenayet/diffsitter
Expert Rust guidance for diffsitter: tree-sitter FFI patterns, lifetime management, unsafe optimization, edition 2024 idioms.
Step-by-step guide for adding a new diff output renderer to diffsitter. Add Renderer is an agent skill from afnanenayet/diffsitter. Step-by-step guide for adding a new diff output renderer to diffsitter.
Add Renderer fits situations like: adding a new output format.
Run `npx skills add afnanenayet/diffsitter --skill add-renderer -a claude-code`. Or copy the skill folder (.claude/skills/add-renderer in afnanenayet/diffsitter) into .claude/skills/add-renderer in your project. Claude Code loads it when a task matches its description.
Run `npx skills add afnanenayet/diffsitter --skill add-renderer -a codex`. Or copy the skill folder (.claude/skills/add-renderer in afnanenayet/diffsitter) into .agents/skills/add-renderer in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add afnanenayet/diffsitter --skill add-renderer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-renderer, .gemini/skills/add-renderer, .github/skills/add-renderer and .opencode/skills/add-renderer in your project.
Going by SKILL.md and its folder, Add Renderer needs the command-line tools its instructions call (cargo). Its frontmatter pre-approves these tools: Read, Grep, Glob, Bash, Edit, Write.
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.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Add Renderer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Add Renderer: Diffs (openclaw/openclaw, 392k stars), @pierre/diffs Code Rendering (pierrecomputer/pierre, 6.3k stars), Diff Review (nexu-io/open-design, 100k stars) and Render Blocking (thedaviddias/Front-End-Checklist, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
afnanenayet (a GitHub user) maintains it in afnanenayet/diffsitter, which has 2,405 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 9, 2026.
Source: afnanenayet/diffsitter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.