maven-code-graph

作者 auver

Project-scoped Maven dependency indexer — like codegraph for your JARs

1
Stars
0
Forks
TypeScript
语言
2026/8/24
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/auver/maven-code-graph

快速入门

使用 maven-code-graph 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

maven-code-graph

The AI coding bottleneck isn't the AI — it's that the AI can't see your dependencies.

Give your AI coding assistant eyes into your Maven dependencies. It indexes every JAR in your pom.xml so the AI can read any dependency's method signatures, parameter names, and Javadoc in 0.2s — like Ctrl+Click in an IDE.

中文版 · Documentation

npm version license node platform

The Problem

Your AI is writing code and needs to call an external library:

// AI is writing OrderService.java
public List<OrderItemDTO> getOrderItems(Long orderId) {
    return paymentService.getOrderItems(orderId, ???);  // ← what's the second parameter?
}

paymentService comes from an external dependency payment-api, not in the project source. The AI can't see the method signature, so it either stops or guesses a type — and the build breaks.

If you're in an IDE, Ctrl+Click solves it instantly. But AI doesn't have an IDE. Its only option is:

grep -rn "PaymentService"   →  find the import
grep -A2 "payment-api" pom.xml  →  guess the artifact coordinate
find ~/.m2/.../payment-api  →  locate the JAR
unzip -p ...sources.jar ...PaymentService.java  →  extract source
# 30+ seconds later: Result<List<OrderItemDTO>> getOrderItems(Long, String)
# Parameter names lost, no Javadoc

Even that's the best case. Worse: package names and artifact coordinates have no reliable mapping. com.example.payment.core might come from payment-api, or core-lib, or anything else. The AI has to guess from dozens of pom.xml entries or scan 2000+ JARs in ~/.m2.

The AI coding bottleneck isn't the AI — it's that the AI can't see your dependencies.


What It Does

# Search for a class
$ maven-code-graph search PaymentService
com.example.payment.core.PaymentService  [interface]
  com.example:payment-api:2.3.1

# See full method signatures
$ maven-code-graph class com.example.payment.core.PaymentService

public interface PaymentService {
  Result<List<OrderItemDTO>> getOrderItems(Long orderId, String credential);
  Result<PaymentDTO> getPaymentById(Long paymentId, PaymentQueryParam param);
  ...
}

# Full source with Javadoc
$ maven-code-graph class com.example.payment.core.PaymentService --type source

# Just the Javadoc
$ maven-code-graph class com.example.payment.core.PaymentService --type docs

# Find implementations
$ maven-code-graph implementations com.example.payment.core.PaymentService

The AI goes from import statement to complete method signatures in 0.2 seconds.

Tip: The CLI is also available as the shorter alias mcgmcg search PaymentService, mcg class ....


Prerequisites

  • Node.js >= 18 — required to run the CLI
  • Maven (mvn) — required for dependency resolution; must be available on PATH
  • JDK 21+ — only needed for Fernflower decompilation, when a dependency JAR doesn't ship with -sources.jar. If you have IntelliJ IDEA installed, its bundled JDK is auto-detected

Install

npm install -g maven-code-graph
npx skills add auver/maven-code-graph

First command installs the CLI, second registers the AI skill.


How It Works

maven-code-graph init (first run)
  → reads pom.xml → mvn dependency:build-classpath → gets all JAR paths
  → Most JARs ship with -sources.jar → tree-sitter-java parses source → extracts classes/methods/inheritance
  → 5% have no source → Fernflower decompiles → tree-sitter-java parses
  → stores everything in SQLite (~/.maven-codegraph/artifacts.db)

Every AI lookup
  → checks .maven-codegraph/state.json for pom.xml changes
  → FTS5 full-text search → millisecond response
  → prefers sources.jar, then cached decompiled output, falls back to javap

The index is shared globally — the same JAR used by multiple projects is only parsed once.


With vs. Without

Without maven-code-graph, the AI's actual path:
  → grep import → grep pom.xml guess artifact → find .m2 locate JAR → unzip -p extract
  → parameter names lost, no Javadoc
  → 30+ seconds, breaks coding flow, version may be wrong

With maven-code-graph:
  → import gives the fully qualified name → maven-code-graph class com.example.PaymentService --type source
  → 0.2 seconds, complete source: parameter names, Javadoc, return types

maven-code-graph search is for exploratory browsing. For coding, the import statement IS the exact class name — just like Ctrl+Click in an IDE.


Decompilation (Fernflower)

Many Maven dependencies ship with -sources.jar, no decompilation needed. For those that don't, maven-code-graph uses Fernflower automatically.

Fernflower requires JDK 21+. maven-code-graph auto-detects in this order:

  1. FERNFLOWER_JAVA env variable
  2. IntelliJ IDEA's bundled JBR (if installed)
  3. System java (if JDK 21+)

Most developers already have IDEA installed — it works out of the box.


FAQ

Q: Do I need IntelliJ IDEA? A: No. Most dependencies have -sources.jar already. Those that don't need Fernflower (JDK 21+), which auto-detects IDEA's bundled JDK if you have it.

Q: How long does the first index take? A: ~2-3 minutes for a typical project. Subsequent runs skip unless pom.xml changes.

Q: What if a dependency JAR has no source? A: The class is skipped during indexing. Lookups fall back to javap method signatures.


What It Means for AI Coding

maven-code-graph isn't a tool for humans — IDEs already solved that. It's infrastructure for AI coding assistants, filling the gap they hit when doing backend work: the AI isn't dumb, it just can't see your dependency code.

Think of it as the mirror image of codegraph — codegraph lets the AI read your project source, maven-code-graph lets the AI read your project dependencies.


Links

MIT License.

常见问题

What is maven-code-graph?

maven-code-graph is an open-source cli tools skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by auver. Project-scoped Maven dependency indexer — like codegraph for your JARs. It has 1 GitHub star.

Is maven-code-graph safe to use?

maven-code-graph returned warnings in SkillsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.

How do I install maven-code-graph?

Clone the repository with "git clone https://github.com/auver/maven-code-graph" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is maven-code-graph written in?

maven-code-graph is primarily written in TypeScript. It is open-source under auver on GitHub, so you can review or fork the full source.

Are there alternatives to maven-code-graph?

Yes. SkillsLLM lists many other CLI Tools skills you can browse and compare side by side. Open the CLI Tools category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh maven-code-graph against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ui-ux-pro-max-skill

by nextlevelbuilder

12

An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.

119,92012,870Python
CLI 工具ai-skillsantigravity
查看详情

happy

by slopus

Mobile and Web client for Codex and Claude Code, with realtime voice, encryption and fully featured

23,4501,980TypeScript
CLI 工具
查看详情

claudecodeui

by siteboon

Use Claude Code, OpenCode, Cursor CLI, and Codex on mobile and web with CloudCLI (aka Claude Code UI). CloudCLI is a free open source webui/GUI that helps you manage your Claude Code session and projects remotely.

13,3941,866TypeScript
CLI 工具
查看详情

CRS-自建Claude Code镜像,一站式开源中转服务,让 Claude、OpenAI、Gemini、Droid 订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。

12,5471,869JavaScript
CLI 工具
查看详情

ccstatusline

by sirmalloc

🚀 Beautiful highly customizable statusline for Claude Code CLI with powerline support, themes, and more.

12,508545TypeScript
CLI 工具
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情