logic-diff

logic-diff is a skill for Claude Code, Codex from hyhmrright/logic-lens. It costs 192 tokens per session (799 once invoked), scanned A, original, MIT.

A detailed code-comparison skill that traces two implementations side by side to assess whether their behavior is equivalent.

In plain words
What is it for?
Use it when you have two code versions and want to compare their inputs, outputs, side effects, error paths, and any declared changes.
Why use it?
It helps find accidental behavior changes in refactors, rewrites, migrations, or alternative implementations.

Skill for Claude CodeCodex

Part of the logic-lens plugin — 11 skills, 6 commands, 3 agents, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hyhmrright/logic-lens/logic-diff
Any agent
npx skills add hyhmrright/logic-lens --skill logic-diff
Clone the repo
git clone --depth 1 https://github.com/hyhmrright/logic-lens

Made for: Claude Code, Codex.

Or install logic-lens, the plugin that ships this one along with the rest of its 11 skills, 6 commands, 3 agents, 2 hooks.

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 logic-diff

README.md
[![agentmods](https://agentmods.dev/badge/skills/hyhmrright/logic-lens/logic-diff.svg)](https://agentmods.dev/skills/hyhmrright/logic-lens/logic-diff)
Your own site
<a href="https://agentmods.dev/skills/hyhmrright/logic-lens/logic-diff"><img src="https://agentmods.dev/badge/skills/hyhmrright/logic-lens/logic-diff.svg" alt="Measured on agentmods" height="20"></a>
Per session 192 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 799 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00192 $0.00799
Opus 5 $0.00096 $0.00400
Sonnet 5 $0.00038 $0.00160
Haiku 4.5 $0.00019 $0.00080

Measured 4d ago against content hash b8094708c5a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

logic-diff 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 4d ago.

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/logic-diff/SKILL.md · 48 lines

How it starts

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

Logic-Lens — Semantic Diff

Setup

Use lazy loading per ../_shared/common.md §13:

  1. Read ../_shared/common.md only for language, Iron Law, Verdict header, scope routing, Remedy discipline, config fields, and loading budget.
  2. Read only the relevant step in logic-diff-guide.md as you reach it.
  3. Load ../_shared/logic-risks.md, ../_shared/semiformal-guide.md, ../_shared/semiformal-checklist.md, and ../_shared/report-template.md on demand when the current step needs them.

Process

Step 0. Language + scope routing. Detect language per common.md §1. Confirm two versions are provided. If only one version, switch to logic-review.

Step 1. Identify the shared specification (guide Step 1) — what inputs should both versions handle; what outputs/side effects are expected. If the user states the refactor intentionally changed behavior in a specific area (e.g., "I changed the error path to raise instead of returning None"), record that as a declared spec change and treat divergences within that area as expected. Flag only divergences outside the declared change as findings.

Step 2. Build independent premises for each version (guide Step 2) — apply the Premises Construction Checklist to Version A and Version B separately.

Step 3. Trace both versions for the common case (guide Step 3) — parallel trace, same input, note the first divergence if any.

Step 4. Trace boundary cases (guide Step 4) — empty/null/zero, max/min, error inputs, first/last of collections. Start with at most three highest-risk boundary scenarios unless the user asks for exhaustive equivalence or the shared specification requires more.

Step 5. Identify and classify semantic divergences (guide Step 5) — each divergence is a finding with Premises → Trace → Divergence → Trigger → Remedy and an L-code.

Step 6. Equivalence verdict (guide Step 6) — one of: ✅ Semantically Equivalent, ⚠️ Conditionally Equivalent (state the condition precisely), ❌ Semantically Divergent.

Read the full file on GitHub · 48 lines

Files

What ships with it

1 file 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. 4d ago First seen · 48 lines · 192 tokens per session scan A b8094708c5a4

Subscribe to this mod's changes

logic-diff is a skill published in the GitHub repository hyhmrright/logic-lens (22 stars, last pushed 5d ago), licensed MIT. It adds 192 tokens to every session and 799 once invoked, about $0.0010 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-30.

Related

Other skills, from other repositories

river-review-code

コードの可読性、保守性、型安全性を検証する。他の専門エージェントに該当しない場合のデフォルトフォールバック先。.

s977043/river-review · 51 tokens

review-loop

Cross-LLM iterative code review loop. Spawns a peer reviewer (Codex, Claude, or Gemini CLI) to review code changes, then iterates until both agents agree on the final code state. Code gets modified during the loop — the final output is improved code + consensus report. Use when: "review loop", "peer review", "cross…

stone16/harness-engineering-skills · 130 tokens

harness

Cybernetics-based multi-agent orchestration for complex tasks. Coordinates a Planner → Generator → Evaluator → Retro pipeline with clean-context sub-agents, per-checkpoint drift prevention, and persistent retro learning. Recommended workflow: Claude Code plans the spec (Session 1), Codex executes autonomously (Session…

stone16/harness-engineering-skills · 130 tokens

auto-verify

This skill suggests using /verify for software engineering tasks that would benefit from systematic verification.

vertti/se-cove-claude-plugin · 0 tokens

Standard Review Policy for Midstream

Applies standard AI review policy guidelines for midstream (implementation) phase reviews.

s977043/river-review · 23 tokens

meta-tags-optimizer

Optimize title tags, meta descriptions, Open Graph, and Twitter cards for maximum click-through rate. Generates multiple A/B test variations with character counting and SERP preview. Use when asked to "optimize title tag", "write meta description", "improve CTR", "Open Graph tags", "fix my meta tags", "social media…

nowork-studio/notfair-plugin · 91 tokens