patch-diff-analyzer
FreeRuns bundled scriptsNot checkedSpecialized in reverse-engineering compiled binaries (JARs, DLLs). Use this when the user asks to compare versions, find security fixes, or analyze binary…
About this skill
Patch Diff Analyzer
IMPORTANT: Users may request analysis of security patches in compiled binaries (JARs, DLLs, etc.) to understand what vulnerabilities were fixed. This extension helps decompile binaries, generate diffs, and identify security-relevant changes.
Available scripts
The extension have these scripts:
- setup-workspace.sh
<workspace-name>
What it does:
- Creates workspace directory
- Initializes git repository for diff tracking
- Configures git user for commits
- Creates subdirectories:
decompiled/,output/
- decompile-jar.sh <app.jar>
/decompiled/
What it does:
- Creates decompiled directory in workspace dir
- Decompiles the jar file in the dir.
- decompile-dll.sh <app.dll>
/decompiled/
What it does:
- Creates decompiled directory in workspace dir
- Decompiles the dll file in the dir.
- analyze-diff.sh
What it does:
- Verifies git repository has 2+ commits
- Identifies
unpatchedandpatchedtags (or uses HEAD~1 and HEAD) - Generates diff statistics
- Creates
patch-analysis.difffile - Creates
changed-files.txtlist
Workflow Decision Tree
When a user requests patch analysis:
Identifying Binaries: Do you need to determine which file is patched vs unpatched?
- YES → Go to Binary Identification
- NO → User has specified versions, proceed to Setup & Decompilation
File Format: What type of binary are you analyzing?
- Java JAR → Use JAR Decompilation Workflow
- .NET DLL/EXE → Use .NET Decompilation Workflow
- Other → Consult user for appropriate decompiler
Analysis Context: Does the user provide vulnerability information?
- YES (CVE/Description provided) → Focus analysis on related changes
- NO (Blind analysis) → Perform comprehensive security change analysis
Binary Identification
CRITICAL: Before decompilation, correctly identify which binary is the patched version.
Identification Methods
Explicit Naming:
- Files named
patched.jar/unpatched.jar - Files named
vulnerable.jar/fixed.jar - → Use as specified
- Files named
Version Numbers:
app-1.2.3.jarvsapp-1.2.4.jar- → Higher version number is typically patched (1.2.4 > 1.2.3)
- For semantic versioning: major.minor.patch format
File Timestamps:
ls -lt *.jar- Newer timestamp typically indicates patched version
- Note: Not reliable if files were copied/moved
When Ambiguous:
- ALWAYS ask the user for clarification
- Do not guess if there's any uncertainty
Setup & Decompilation
Workspace Setup Script
Use the provided setup script.
Efficient Extraction (Skip Third-Party Libraries)
CRITICAL: For WAR files or large applications, extract ONLY proprietary code before decompiling. This saves significant time and storage.
Identify Proprietary Code Location
WAR file structure:
application.war
├── WEB-INF/
│ ├── classes/ ← Application code (DECOMPILE THIS)
│ │ └── com/
│ │ └── vendor/ ← Proprietary packages
│ └── lib/ ← Third-party JARs (SKIP THESE)
│ ├── jackson-*.jar
│ ├── spring-*.jar
│ └── hibernate-*.jar
└── META-INF/
Extract Proprietary Code Only
# 1. List WAR contents to identify proprietary packages
unzip -l unpatched.war | grep "WEB-INF/classes" | grep "\.class$" | head -30
# Look for company-specific packages:
# WEB-INF/classes/com/acme/
# WEB-INF/classes/com/vendor/
# WEB-INF/classes/org/internal/
# 2. Extract ONLY proprietary classes
mkdir -p temp-unpatched
unzip unpatched.war "WEB-INF/classes/com/vendor/*" -d temp-unpatched/
unzip unpatched.war "WEB-INF/classes/com/acme/*" -d temp-unpatched/
# 3. Create JAR from extracted classes
cd temp-unpatched/WEB-INF/classes
jar cf ../../../vendor-unpatched.jar .
cd ../../..
# 4. Repeat for patched version
mkdir -p temp-patched
unzip patched.war "WEB-INF/classes/com/vendor/*" -d temp-patched/
unzip patched.war "WEB-INF/classes/com/acme/*" -d temp-patched/
cd temp-patched/WEB-INF/classes
jar cf ../../../vendor-patched.jar .
cd ../../..
# Now decompile ONLY proprietary code (much faster!)
JAR Decompilation Workflow
Step 1: Decompile Unpatched Version (Proprietary Code)
- Use the JAR decompilation script provided with extension to decompile the JAR.
Step 2: Commit Unpatched Version
cd <workspace>
git add -A
git commit -m "Unpatched version"
git tag unpatched
CRITICAL: The unpatched tag is used by the diff analysis script.
Step 3: Decompile Patched Version
IMPORTANT: Clear the decompiled directory first to avoid mixing files.
rm -rf <workspace>/decompiled/*
Step 4: Commit Patched Version
cd <workspace>
git add -A
git
Install patch-diff-analyzer in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the patch-diff-analyzer skill do?
Specialized in reverse-engineering compiled binaries (JARs, DLLs). Use this when the user asks to compare versions, find security fixes, or analyze binary patches.
How do I install the patch-diff-analyzer skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the patch-diff-analyzer skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic