doc-compare

doc-compare is a skill for Claude Code from bestdeejay-design/agent-skills. It costs 264 tokens per session (1,152 once invoked), scanned A, original, MIT.

A tool for comparing two Markdown documents side by side, with deleted or changed sections marked on the left and added or changed sections marked on the right.

In plain words
What is it for?
Use it to compare local and repository documents, view only changed sections, or produce a line-based diff.
Why use it?
It makes document differences easier to find than reading two full versions manually, especially when checking a draft against a published file.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: mentions OpenCode.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is --pair "Опубликовано|gh:axiiom-ru/lovii@main:docs/Публичная_оферта.md|Драфт|./docs/Публичная_оферта.md" \.

Good fit Use it to compare local and repository documents, view only changed sections, or produce a line-based diff.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/bestdeejay-design/agent-skills
agentmods
npx agentmods add skills/bestdeejay-design/agent-skills/doc-compare

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doc-compare

README.md
[![agentmods](https://agentmods.dev/badge/skills/bestdeejay-design/agent-skills/doc-compare/github.svg)](https://agentmods.dev/skills/bestdeejay-design/agent-skills/doc-compare)
Your own site
<a href="https://agentmods.dev/skills/bestdeejay-design/agent-skills/doc-compare"><img src="https://agentmods.dev/badge/skills/bestdeejay-design/agent-skills/doc-compare/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for doc-compare

Your own site · 80×15
<a href="https://agentmods.dev/skills/bestdeejay-design/agent-skills/doc-compare"><img src="https://agentmods.dev/badge/skills/bestdeejay-design/agent-skills/doc-compare.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 264 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,152 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00264 $0.01152
Opus 5 $0.00132 $0.00576
Sonnet 5 $0.00053 $0.00230
Haiku 4.5 $0.00026 $0.00115

Measured 8d ago against content hash 834f980c0f75, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

doc-compare scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/compare_docs.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/doc-compare/SKILL.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Doc Compare

Визуальное сравнение markdown-документов с подсветкой правок: две колонки (слева/справа) в одном окне браузера, вкладки на каждую пару, изменённые места подсвечены, кнопка «Только изменения».

🎯 When to use

  • Нужно визуально сравнить локальный драфт с опубликованной версией (оферты lovii_docs vs axiiom-ru/lovii).
  • Сразу видеть, ГДЕ были правки: изменённые блоки подсвечены, внутри — пословно.
  • Свернуть всё лишнее кнопкой «Только изменения» и смотреть только затронутые места.

📦 Files

  • SKILL.md — этот файл
  • scripts/compare_docs.py — сборщик side-by-side с подсветкой правок

🧰 Usage

# Локальный драфт vs опубликованное в публичном репо (gh: подтягивает через gh api)
python3 ~/.config/opencode/skills/doc-compare/scripts/compare_docs.py \
  --pair "Опубликовано|gh:axiiom-ru/lovii@main:docs/Публичная_оферта.md|Драфт|./docs/Публичная_оферта.md" \
  --pair "Опубликовано|gh:axiiom-ru/lovii@main:docs/Оферта_присоединения.md|Драфт|./docs/Оферта_присоединения.md"

# Построчная таблица difflib (альтернатива бок-о-бок)
python3 ~/.config/opencode/skills/doc-compare/scripts/compare_docs.py \
  --diff --pair "Старая|a.md|Новая|b.md"

# Не открывать браузер, только сгенерировать файл
python3 ~/.config/opencode/skills/doc-compare/scripts/compare_docs.py --no-open --pair "L|l.md|R|r.md" --out /tmp/cmp.html

Формат --pair: "ЛеваяМетка|левый_файл|ПраваяМетка|правый_файл". Префикс gh:owner/repo@ref:path у любого из файлов = подтянуть из GitHub через gh api (ветка ref необязательна, по умолчанию main).

🔬 Как читать результат

  • Без --diff: две колонки. Слева = первая версия (обычно опубликованная/старая), справа = вторая (драфт/новая).
    • 🟥 красная полоса слева — блок удалён или изменён (старое слово зачёркнуто).
    • 🟩 зелёная полоса справа — блок добавлен или изменён (новое слово подсвечено).
    • Внутри изменённого блока слова подсвечены пословно.
    • Кнопка «Только изменения» (в шапке) прячет всё неизменённое — остаются только затронутые места.
  • С --diff: классическая таблица difflib — добавленные строки зелёные, удалённые красные, изменённые жёлтые.

Read the full file on GitHub · 54 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 54 lines · 264 tokens per session scan A 834f980c0f75

Subscribe to this mod's changes

doc-compare is a skill published in the GitHub repository bestdeejay-design/agent-skills (5 stars, last pushed yesterday), licensed MIT. It adds 264 tokens to every session and 1,152 once invoked, about $0.0013 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.