Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Differential Review

ASecurity

Compare two versions of a codebase to identify security implications of changes. Use when reviewing protocol upgrades, verifying bug fixes, auditing dependency updates, or when only a subset of code has changed since the last audit.

61 stars
0 votes
0 copies
0 views
Added 9/19/2026
documentationgobashgitsecurity

Security Analysis

A100/100

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add 0x-Shashi/WEB3-AUDIT-SKILLS --skill differential-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Differential Review?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Differential Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/0x-shashi-differential-review/badge)](https://www.skillsdirectory.com/skills/0x-shashi-differential-review)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
id: differential-review
title: Differential Review Skill
category: methodology
difficulty: intermediate
triggers:
  - diff review
  - upgrade review
  - compare versions
  - code changes
  - contract upgrade
  - version diff
related_skills:
  - fix-review/SKILL.md
  - methodology/SKILL.md
tags:
  - differential
  - upgrade
  - comparison
  - versioning
last_updated: 2026-02-26
description: >-
  Compare two versions of a codebase to identify security implications
  of changes. Use when reviewing protocol upgrades, verifying bug fixes,
  auditing dependency updates, or when only a subset of code has changed
  since the last audit.
---

# Differential Review Skill

Compare two versions of a codebase to identify security implications of changes. Essential for protocol upgrades, bug fix verification, and dependency updates.

---

## Why Differential Review?

A full audit of an already-audited codebase is wasteful if only 5% of the code changed. Differential review focuses effort on:

| Change Type | Risk Level | Examples |
|-------------|------------|----------|
| Logic changes | HIGH | Modified calculation, new branching, changed access control |
| State variable changes | HIGH | New storage, modified types, reordered variables |
| Dependency updates | MEDIUM-HIGH | OpenZeppelin upgrade, Solidity version change |
| Configuration changes | MEDIUM | Changed thresholds, updated addresses, new roles |
| Formatting only | NONE | Whitespace, comments, variable renames |
| New code | HIGH | Entirely new functions/contracts |
| Removed code | MEDIUM | Deleted security checks, removed functionality |

---

## Change Classification Matrix

| Change | Security Relevant? | Needs Review? |
|--------|-------------------|---------------|
| Function body modified | YES | ALWAYS |
| New function added | YES | FULL AUDIT |
| Function removed | MAYBE | Check if security-critical |
| Access control modified | YES | ALWAYS |
| Storage variable added | YES (upgrade compat) | ALWAYS |
| Storage variable removed | YES (dangerous) | ALWAYS |
| Storage variable reordered | YES (proxy breakage) | ALWAYS |
| Import changed | MAYBE | Check changelog |
| Compiler version changed | MAYBE | Check breaking changes |
| Comment changed | NO | Skip |
| Whitespace changed | NO | Skip |
| Event added/modified | LOW | Quick review |
| Error message changed | NO | Skip |
| Constant changed | MAYBE | Verify new value |

---

## Differential Review Strategy

### Step 1: Generate the Diff

```bash
# Between two git tags/commits
git diff v1.0..v2.0 -- '*.sol'
git diff v1.0..v2.0 --stat  # Summary of changed files

# Between two branches
git diff main..feature-branch -- 'contracts/'

# Exclude non-code changes
git diff v1..v2 -- '*.sol' ':!test/' ':!script/'
```

### Step 2: Categorize Changes

Sort the diff output into categories:

1. **Modified contracts** → Primary review target
2. **New contracts** → Full audit required
3. **Deleted contracts** → Check for orphaned references
4. **Modified tests** → Understand what changed and why
5. **Config changes** → Deployment parameter review

### Step 3: Impact Analysis

For each modified function:
- What did it do before?
- What does it do now?
- What invariants could break?
- Does the change affect other functions?
- Are existing tests still valid?

---

## Common Upgrade Pitfalls

| Pitfall | Example | Impact |
|---------|---------|--------|
| Storage slot collision | Adding variable before existing ones in upgradeable proxy | Critical — corrupted state |
| Initializer re-callable | `initialize()` without `initializer` guard after upgrade | Critical — protocol takeover |
| `selfdestruct` in new impl | Attacker calls `selfdestruct` on implementation | Critical — proxy bricked |
| Removed security check | Deleted `onlyOwner` modifier in upgrade | Critical — access control loss |
| Changed function selector | Renamed function breaks integrations | High — broken integrations |
| Immutable value changed | Constructor value differs in new deployment | Medium — unexpected behavior |

---

## Resources
- [Upgrade Safety](resources/upgrade-safety.md)

## Workflows
- [Differential Audit](workflows/differential-audit.md)

Attribution

0x-Shashi0x-Shashi
View sourceMore from 0x-Shashi →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Context Fundamentals

Understand the components, mechanics, and constraints of context in agent systems. Use when designing agent architectures, debugging context-related failures, or optimizing context usage.

179001 votes

release-notes

Draft release notes and changelog entries from git history or merged PRs between two refs (tags/SHAs/branches), including breaking changes, migrations, and upgrade steps. Use when the user asks for release notes, changelog updates, or a GitHub Release draft.

1301 votes

docs-style-guide

Documentation style guide enforcer by @planetabhi. Applies and reviews the writing style guide when authoring or editing product documentation and tutorials. Use to check prose for voice, tense, word choice, inclusive language, formatting, code block, UI, Markdown, and number/date conventions.

11 votes

Caveman Help

Quick-reference card for all caveman modes, skills, and commands. One-shot display, not a persistent mode. Trigger: /caveman-help, "caveman help", "what caveman commands", "how do I use caveman".

1023330 votes

How It Works

Explain how claude-mem captures observations, when memory injection kicks in, and where data lives. Use when the user asks "how does claude-mem work?" or "what is this thing doing?".

929660 votes
View all in documentation →