From codelens
Use this skill to fetch and display the real source code of a named JVM type — a Java or Kotlin class, interface, or method referenced by name or fully-qualified name. Crucially, it works even when no source file exists in the project: it is the way to read the actual implementation of compiled third-party dependencies, library internals, and JDK classes by auto-downloading source JARs or decompiling bytecode. Reach for it whenever the goal is to SEE actual code: read a method's implementation body, view an entire class, inspect library or JDK internals, extract signatures or javadoc, or generate an interface stub/skeleton. Fits asks like "show me the source of X," "what does the body of X.foo do," "how does library Y implement Z," "I don't have the sources jar — pull up class W," or "stub out interface V." Do NOT use it to grep/search the repo, find callers or implementers of an interface, locate documentation pages, format or restyle code, or explain language concepts in the abstract.
How this skill is triggered — by the user, by Claude, or both
Slash command
/codelens:codelens-source-lookupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill enables viewing source code for any JVM class accessible to the project.
This skill enables viewing source code for any JVM class accessible to the project.
Ensure the CodeLens server is running for your project:
codelens start --project /path/to/project
To look up project class source, the project must be compiled — CodeLens
discovers project classes by scanning compiled bytecode (build/classes), so
build it first (./gradlew build -x test). Library and JDK source lookups work
regardless. If project classes aren't found, check codelens classes stats --json
(a projectClassCount of 0, also flagged by a warning: from start, means
rebuild then codelens refresh).
Output: in a terminal these commands print the source code directly. Pass
--json for the structured envelope documented in
FORMATS.md (source.content, filePath, language,
…) — that JSON shape is also auto-selected when output is piped or captured.
codelens source show <fully-qualified-class-name>
Examples:
# Project class
codelens source show com.example.MyHandler
# Library class (auto-downloads source JAR if available)
codelens source show com.google.common.collect.ImmutableList
# JDK class
codelens source show java.util.concurrent.CompletableFuture
Extract a specific method from a class:
codelens source method <class-fqn> <method-name>
Options:
--param-types <types> - Disambiguate overloaded methods (comma-separated parameter types)--context <n> - Include n lines before/after the methodExamples:
# Simple method
codelens source method com.example.UserService getUser
# Overloaded method - specify parameter types
codelens source method com.example.UserService findUsers --param-types "String,int"
# With surrounding context
codelens source method com.example.MyHandler handle --context 5
codelens source show <fqn> returns the full resolved source for the class
(default behavior). Richer output modes — stub generation, signatures-only,
javadoc extraction, visibility filtering, and Java/Kotlin language
switching — exist on the server endpoint but are not yet exposed on the CLI.
They are queued as a follow-up Go-CLI enhancement; once landed, this section
will be expanded with --format, --visibility, and --lang examples.
CodeLens resolves source in this order:
src.zip or JDK modulesThe server endpoint accepts query parameters to disable decompilation fallback or force a fresh source-JAR download, but those toggles are not yet exposed on the CLI. They are queued alongside the format/visibility flags in the follow-up Go-CLI enhancement noted above.
codelens-jvm-analysis skill to find classes first, then view their sourcecodelens-jvm-analysis - Find classes and methods to viewcodelens-ratpack-analysis - Analyze Ratpack-specific handler sourceProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub charliek/codelens --plugin codelens