quarkusio/quarkusdev-skills/java-classpath-search

Claude Code and agent skill by quarkusio/quarkusdev-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when you need to find which JAR contains a Java class, resolve import statements, identify classpath conflicts, or discover which dependency provides a class. Accepts fully qualified class names, simple class names, or partial patterns.

Install

npx vskill@latest install quarkusio/quarkusdev-skills/java-classpath-search

SKILL.md

Java Classpath Search

Fast search across all Maven dependencies to find which JARs contain a Java class.

Overview

This skill searches a pre-built index of all classes in your Maven local repository, providing instant results for classpath queries. It's essential for resolving imports, debugging classpath conflicts, and discovering dependency sources.

When to Use

  • Finding which dependency provides a class
  • Resolving "class not found" errors
  • Checking for version conflicts (multiple JARs with same class)
  • Discovering available implementations of an interface
  • Understanding your project's dependency tree
  • Verifying a dependency is in your local Maven repo

Quick Reference

Search patterns:

  • Fully qualified: com.fasterxml.jackson.databind.ObjectMapper
  • Simple name: ObjectMapper
  • Partial pattern: jackson.ObjectMapper

Index location: $HOME/.cache/quarkusdev-skills/class-index.txt

Index refresh: Automatic if missing or older than 7 days

Implementation

Step 1: Determine Search Pattern

Parse the user input (available as $ARGUMENTS):

InputPattern Conversion
com.fasterxml.jackson.databind.ObjectMappercom/fasterxml/jackson/databind/ObjectMapper.class
ObjectMapper/ObjectMapper.class (any path ending with this)
jackson.ObjectMapperjackson/ObjectMapper.class
Step 2: Ensure Index is Available

The class index is a tab-separated file mapping class paths to JAR paths.

bash
INDEX="$HOME/.cache/quarkusdev-skills/class-index.txt"
# Check if index needs rebuilding (missing or older than 7 days)
if [ ! -f "$INDEX" ] || [ $(find "$INDEX" -mtime +7 2>/dev/null | wc -l) -gt 0 ]; then
# Dispatch index rebuild as subagent (can take 30-60 seconds)
# Use Agent tool with prompt:
# "Run the build-class-index.sh script from this skill directory
# Report when indexing is complete."
# Wait for subagent to complete before continuing
fi

Note: Index building is dispatched to a subagent to keep the main conversation responsive. The script uses 8 parallel workers and typically completes in under 60 seconds.

Step 3: Search the Index

Search is instant (just grep on a text file):

For fully qualified class name:

bash
grep "com/fasterxml/jackson/databind/ObjectMapper\.class" "$INDEX"

For simple class name:

bash
grep -i "/ObjectMapper\.class" "$INDEX"

For partial pattern:

bash
grep -i "jackson.*ObjectMapper\.class" "$INDEX"
Step 4: Check Local Build Output

Also search project build directories for classes:

bash
find . -path "*/target/classes/*ClassName.class" 2>/dev/null
Step 5: Present Results

Format output to show:

  1. Class path within JAR - The full package path
  2. JAR file path - Highlight groupId, artifactId, version from path
  3. Maven coordinates - Extract from JAR path:

`` ~/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.15.0/jackson-databind-2.15.0.jar ` Becomes: com.fasterxml.jackson.core:jackson-databind:2.15.0`

  1. Conflict warnings - If multiple versions exist, flag as potential classpath issue

Example output format:

Found in 2 locations:
1. com/fasterxml/jackson/databind/ObjectMapper.class
JAR: com.fasterxml.jackson.core:jackson-databind:2.15.0
Path: ~/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.15.0/jackson-databind-2.15.0.jar
2. com/fasterxml/jackson/databind/ObjectMapper.class
JAR: com.fasterxml.jackson.core:jackson-databind:2.14.2
Path: ~/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.14.2/jackson-databind-2.14.2.jar
⚠️ WARNING: Multiple versions detected - potential classpath conflict
Step 6: Handle No Results

If search returns nothing:

  1. Rebuild index - Run the build-class-index.sh script from this skill directory
  2. Check spelling - Suggest corrected class name
  3. Verify dependency - Class might not be in local repo, suggest mvn dependency:resolve
  4. Broaden search - Try searching for just the class name without package

Index Details

What's indexed:

  • All .class files in ~/.m2/repository/**/*.jar
  • Excludes: -sources.jar, -javadoc.jar, -tests.jar, -test-*.jar
  • Excludes: Inner classes ($), module-info, package-info

Index format:

com/example/MyClass.class\t/path/to/artifact-1.0.0.jar

Build time: ~30-60 seconds with 8 parallel workers

Size: Varies by repository size (typically 5-20 MB)

Tips

  • Index is automatically refreshed every 7 days
  • For inner classes, search JAR directly: jar tf /path/to.jar | grep ClassName
  • Use -i flag for case-insensitive searches
  • The index uses 8 parallel workers for fast building
  • Subagent dispatch keeps main conversation responsive during index builds

Supporting Tool

The index is built by build-class-index.sh (included in this skill directory):

bash
#!/bin/bash
INDEX_FILE="${1:-$HOME/.cache/quarkusdev-skills/class-index.txt}"
REPO_DIR="${2:-$HOME/.m2/repository}"
find "$REPO_DIR" -name "*.jar" \
-not -name "*-sources*" \
-not -name "*-javadoc*" \
-not -name "*-tests*" \
-not -name "*-test-*" | \
xargs -P 8 -I{} sh -c '
jar tf "$1" 2>/dev/null | grep "\.class$" | grep -v "module-info\|package-info" | while read cls; do
printf "%s\t%s\n" "$cls" "$1"
done
' _ {} > "$INDEX_FILE"

Platform Notes

This skill works with:

  • Claude Code: Direct execution via Bash/Agent tools
  • Gemini CLI: Use equivalent bash/file tools
  • Codex: Use RunBash/SubAgent equivalents

The build-class-index.sh script is platform-independent (standard bash).

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
4
Repository forks
2
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/quarkusio/quarkusdev-skills/java-classpath-search/badge)](https://verified-skill.com/skills/quarkusio/quarkusdev-skills/java-classpath-search)

Something wrong with this skill or its page? Tell us.