java-decompile
A Java decompiler for exploring dependency internals and method signatures directly in your workflow.
Install
mkdir -p .claude/skills/java-decompile && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11088" && unzip -o skill.zip -d .claude/skills/java-decompile && rm skill.zipInstalls to .claude/skills/java-decompile
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when you need to view the source code of a Java class from project dependencies, understand a library's API implementation, find method signatures, or explore how a dependency works internally. Accepts fully qualified or simple class names.Key capabilities
- →Decompile Java classes
- →Inspect library internals
- →Find method signatures
- →Explore dependency code
How it works
It uses Vineflower via jbang to decompile bytecode from JARs into readable Java source code.
Inputs & outputs
When to use java-decompile
- →Inspecting library internals
- →Checking method signatures
- →Debugging third-party code
About this skill
Java Class Decompiler
Decompile and view the source code for Java classes from project dependencies.
Overview
This skill decompiles Java classes from Maven dependencies using Vineflower (a modern Java decompiler) via jbang, allowing you to inspect library internals, understand API implementations, and find method signatures without leaving your workflow.
When to Use
- Need to understand how a library method is implemented
- Looking for exact method signatures or parameter types
- Exploring the internals of a dependency
- Debugging issues related to third-party libraries
- Finding which overloads are available for a class
Quick Reference
Input formats:
- Fully qualified:
com.fasterxml.jackson.databind.ObjectMapper - Simple name:
ObjectMapper(will search for matches)
Tools used:
- Vineflower decompiler (via jbang)
- Maven classpath
- Fallback: javap for bytecode disassembly
Requirements:
- jbang installed (https://www.jbang.dev/)
Implementation
Step 1: Determine the Class Name
Parse the user's input (available as $ARGUMENTS in command context):
- If it contains dots (
.), treat as fully qualified name - If it's a simple name, you'll need to search for it first
Step 2: Find the JAR Containing the Class
Convert class name to file path: replace . with /, append .class
Option A: Use Maven classpath file (fast for first search)
# Build classpath file if missing
if [ ! -f /tmp/quarkus-classpath.txt ]; then
mvn dependency:build-classpath -Dmdep.outputFile=/tmp/quarkus-classpath.txt -q 2>/dev/null
fi
# Search for the class in classpath JARs
CLASSPATH=$(cat /tmp/quarkus-classpath.txt)
Option B: Search Maven local repository directly
find ~/.m2/repository -name "*.jar" | while read jar; do
if jar tf "$jar" 2>/dev/null | grep -q "com/example/ClassName.class"; then
echo "$jar"
break
fi
done
Option C: Check local build output (for project classes)
find . -path "*/target/classes/com/example/ClassName.class" 2>/dev/null
Step 3: Decompile the Class
Primary method: Vineflower via jbang
Vineflower works on JAR files, so extract the specific class or decompile the entire JAR:
# Option A: Decompile specific class from JAR
# Create temp directory for output
TEMP_DIR=$(mktemp -d)
# Decompile the JAR containing the class
jbang org.vineflower:vineflower:RELEASE "/path/to/the.jar" "$TEMP_DIR"
# Find and display the decompiled class
find "$TEMP_DIR" -name "ClassName.java" -exec cat {} \;
# Cleanup
rm -rf "$TEMP_DIR"
# Option B: For single class extraction (faster)
# Extract the class file first
CLASS_FILE="com/example/ClassName.class"
jar xf "/path/to/the.jar" "$CLASS_FILE"
# Decompile just that class
TEMP_DIR=$(mktemp -d)
jbang org.vineflower:vineflower:RELEASE "$CLASS_FILE" "$TEMP_DIR"
cat "$TEMP_DIR/com/example/ClassName.java"
# Cleanup
rm -rf "$CLASS_FILE" "$TEMP_DIR"
Fallback method: javap (if jbang/Vineflower unavailable)
javap -p -c -cp "/path/to/the.jar" "fully.qualified.ClassName"
Note: jbang automatically downloads and caches Vineflower on first use.
Step 4: Present Decompiled Source
Show the decompiled code with syntax highlighting. Highlight key elements:
- Public API methods and their signatures
- Constructor parameters
- Important fields
- Annotations
- Package and imports
Step 5: Handle Multiple Matches
If the user provided a simple class name and multiple matches exist:
- List all matching classes with their packages
- Show which JAR each comes from
- Ask which one to decompile
Common Patterns
Searching within a specific JAR:
jar tf /path/to/some.jar | grep -i ClassName
Finding all classes with a name pattern:
# Use the class-index if available
grep -i "ClassName" "$HOME/.cache/quarkusdev-skills/class-index.txt"
Tips
- Quarkus internal classes may be in
target/classes/rather than.m2 - Vineflower produces more readable output than javap
- jbang automatically manages Vineflower versions and dependencies
- Use
-pflag with javap to show private members - For inner classes, include the
$in the class name - Vineflower decompiles entire JARs - for single classes, extract first for faster results
Platform Notes
This skill works with:
- Claude Code: Direct execution
- Gemini CLI: Use equivalent file/bash tools
- Codex: Use RunBash/ReadFile equivalents
Tool scripts are platform-independent (bash/python).
When not to use it
- →Source code is available
- →Non-Java projects
Prerequisites
Limitations
- →Requires jbang
- →Decompiled code may not perfectly match original source
How it compares
It provides readable source code from bytecode rather than just disassembly.
Compared to similar skills
java-decompile side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| java-decompile (this skill) | 0 | 4mo | Review | Intermediate |
| backend-bugfix | 0 | 4mo | No flags | Intermediate |
| minecraft-bukkit-pro | 90 | 4mo | No flags | Advanced |
| workflow-orchestration-patterns | 10 | 2mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
backend-bugfix
u1219437219-cmyk
Investigate and fix backend bugs involving APIs, data flow, jobs, logs, or intermittent server behavior.
minecraft-bukkit-pro
sickn33
Master Minecraft server plugin development with Bukkit, Spigot, and Paper APIs. Specializes in event-driven architecture, command systems, world manipulation, player management, and performance optimization. Use PROACTIVELY for plugin architecture, gameplay mechanics, server-side features, or cross-version compatibility.
workflow-orchestration-patterns
wshobson
Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.
java-pro
sickn33
Master Java 21+ with modern features like virtual threads, pattern matching, and Spring Boot 3.x. Expert in the latest Java ecosystem including GraalVM, Project Loom, and cloud-native patterns. Use PROACTIVELY for Java development, microservices architecture, or performance optimization.
java-coding-standards
affaan-m
Java coding standards for Spring Boot services: naming, immutability, Optional usage, streams, exceptions, generics, and project layout.
springboot-patterns
affaan-m
Spring Boot 架构模式、REST API 设计、分层服务、数据访问、缓存、异步处理和日志记录。适用于 Java Spring Boot 后端工作。