building-java-knowledge-graph
OfficialGenerate JVM project knowledge graphs from code.
Authormicrosoft
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Analyzes JVM projects (Java/Kotlin/Scala/Groovy) and generates knowledge graphs with tree-sitter parsing. Requires Python 3 on the host and a JVM project with Maven/Gradle/Ant/Ivy build files. Skips gracefully if prerequisites are missing. Triggers when asked to "build knowledge graph", "analyze project structure", "parse Java codebase", or "generate dependency graph".
Core Features & Use Cases
- Detects and analyzes JVM projects (Maven/Gradle/Ant/Ivy) and extracts modules, dependencies, and source structure.
- Parses Java-based languages (Java/Kotlin/Scala/Groovy) to discover classes, packages, inheritance, interfaces, and annotations.
- Generates a machine-readable knowledge graph (knowledge-graph.json) for downstream agents or visualization.
- Use Case: Given a Java monolith with multiple modules, generate a graph showing module dependencies and package structures to guide modernization.
Quick Start
Run python3 scripts/build_knowledge_graph.py /path/to/project /path/to/output to generate knowledge-graph.json.
Dependency Matrix
Required Modules
tree-sitterpyyaml
Components
scripts
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: building-java-knowledge-graph Download link: https://github.com/microsoft/github-copilot-modernization/archive/main.zip#building-java-knowledge-graph Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 510,000+ vetted skills library on demand.