eclipse-analyze
Skill171 starsChanged 3 months agoMITView on GitHub
Analyze Java code using Eclipse JDT tools — type hierarchy, find references, call hierarchy, compilation errors, quick fixes, and import suggestions. Use this to understand code structure before making changes.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- eclipse-debugSkill
- eclipse-editSkill
- eclipse-runSkill
- eclipse-testSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 79
After edits: getCompilationErrors to verify, then getQuickFixes or getImportSuggestions to resolve
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Eclipse Code Analysis
Analyze Java code using Eclipse's JDT (Java Development Tools) infrastructure. These tools provide accurate, compiler-level analysis — not text-based guessing.
Reading Code Efficiently
These tools are designed to minimize context window usage. Follow the outline-first pattern:
- getClassOutline — Start here. Returns class declaration, field declarations, method signatures (no bodies), and inner types — all with line numbers and the first sentence of each member's Javadoc (an undocumented override reports its supertype's text, flagged
javadocInherited). A 500-line class becomes ~30 lines. ProvidefullyQualifiedClassName. SetincludeFields=falseto omit fields;javadoc=FULLrenders whole comments,javadoc=NONEleaves them out. - getMethodSource — After seeing the outline, read only the methods you need. Accepts comma-separated
methodNames(e.g.,"save,findById,delete"). Returns source with line numbers. SetincludeJavadoc=falseto skip doc comments. UsemethodSignatureto disambiguate overloads (e.g.,"String"matches methods with a String parameter). - getFilteredSource — Middle ground: returns the full source but collapses methods you don't need to their signatures. Provide
methodNamesto expand specific methods; all others are shown as one-line signatures with line ranges. SetexcludeImports=true(the default) to collapse the import block. Line numbers always match the original file for accurate editing. - getSource — Full source dump. Use only for small classes or when you need everything. Prefer the tools above to save context.
- readProjectResource — Read any file by path. Supports
startLine/endLinefor ranges,showLineNumbers=truefor editing, andexcludeImports=trueto collapse Java import blocks.
Choosing the Right Tool
| Scenario | Tool | Why |
| Understand class structure | getClassOutline | Signatures only, ~90% smaller |
| Read 1-3 specific methods | getMethodSource | Surgical reads with line numbers |
| Read class but focus on 2 methods | getFilteredSource | Full context, collapsed noise |
| Small class (<100 lines) | getSource | Overhead not worth optimizing |
| Referenced-library class | getSource | Uses attached source or decompiles the class |
| Diagnose which JAR/root won | explainTypeResolution | Shows the project-specific JDT classpath decision |
| Compare a historical file | gitReadFile | Reads a revision or staged index without checkout |
| Non-Java file or specific line range | readProjectResource | Works with any file type |
Navigation & Understanding
- getTypeHierarchy — Show supertypes, implemented interfaces, and subtypes for a class.
- findReferences — Find all usages of a type, method, or field across the workspace. Essential before renaming or deleting.
- getMethodCallHierarchy — Show callers and callees of a method. Use
methodSignaturefor overloaded methods. - getJavaDoc — Rendered Javadoc (Markdown) of a type and each of its members, as the IDE hover shows it, inherited text included.
memberNamenarrows it to one member's overloads;javadoc=SUMMARYgives first sentences only.getTypeHierarchy,searchTypes,searchMethodsandgetPackageSummarytake the samejavadocparameter. - explainTypeResolution — Explain source-vs-binary resolution in one project, including classpath root/entry, source attachment, class file, and whether
getSourcewill decompile. - gitReadFile — Read a project-relative text file at a Git revision or from
INDEXwithout modifying the working tree. - gitDiff — Limit diffs with project-relative
pathFiltervalues and optionally setignoreWhitespace=true.
Error Analysis
- getCompilationErrors — Get all compilation errors/warnings. Filter by
projectNameandseverity(ERROR, WARNING, ALL). - getQuickFixes — Get available quick fixes for errors in a file. Optionally filter by
lineNumber. - getImportSuggestions — Find import candidates for unresolved types.
Project Navigation
- getProjectLayout — File/folder structure. Use
scopePathandmaxDepthfor large projects. - getProjectProperties — Java version, source folders, output location, natures.
- listProjects — All workspace projects with their natures.
- getProjectDependencies — Maven dependencies for a project.
Search
- fileSearch — Plain text search across workspace files. Filter with
fileNamePatterns. - fileSearchRegExp — Regex search across workspace files.
- findFiles — Find files by glob patterns (e.g.,
*.xml,pom.xml).
Editor Context
- getCurrentlyOpenedFile — Get the file currently active in the Eclipse editor.
- getEditorSelection — Get the currently selected text/lines in the active editor.
Recommended Workflow
- Orient:
listProjectsorgetProjectLayoutto find what you need - Outline:
getClassOutlineto understand class structure - Focus:
getMethodSourceto read specific methods, orgetFilteredSourcefor full-but-collapsed view - Analyze:
getTypeHierarchy,findReferences,getMethodCallHierarchyas needed - After edits:
getCompilationErrorsto verify, thengetQuickFixesorgetImportSuggestionsto resolve
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

