You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/library-insight/SKILL.template.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,18 @@
1
1
---
2
2
name: library-insight
3
-
description: JVM API Explorer & MCP Server that indexes public APIs from compiled libraries (JAR/AAR) or local Java/Kotlin source code, enabling API exploration, dependency analysis, migration reports, and AI-ready context generation.
3
+
description: API Explorer & MCP Server for Java, Kotlin & KMP that indexes public APIs from compiled libraries (JAR/AAR), Kotlin Multiplatform libraries (KLib), or local Java/Kotlin source code, enabling API exploration, dependency analysis, migration reports, and AI-ready context generation.
4
4
---
5
5
6
6
# Library Insight Agent Skill
7
7
8
8
Use this skill when you need to understand, inspect, or build AI prompts for:
9
9
10
-
- External JVM libraries (Java/Kotlin JAR or AAR files)
10
+
- Java and Kotlin libraries (JAR/AAR files)
11
+
- Kotlin Multiplatform libraries (KLib files)
11
12
- Maven Central dependencies
12
13
- Local Java or Kotlin source code projects
13
14
14
-
Library Insight analyzes both compiled JVM libraries and local source code to build a searchable API index. It extracts public APIs, type information, documentation, source metadata, and Kotlin-specific language features, allowing AI agents to work with the exact code being used instead of relying on outdated documentation or web examples.
15
+
Library Insight analyzes compiled libraries (JVM artifacts and Kotlin Multiplatform libraries) and local source code to build a searchable API index. It extracts public APIs, type information, documentation, source metadata, and Kotlin-specific language features, allowing AI agents to work with the exact code being used instead of relying on outdated documentation or web examples.
15
16
16
17
> [!IMPORTANT]
17
18
> **AI Agent Token Optimization Rule:**
@@ -22,7 +23,7 @@ Library Insight analyzes both compiled JVM libraries and local source code to bu
22
23
>
23
24
> **Indexing**
24
25
>
25
-
> - Use **`library-insight scan <jar|aar|directory|maven-coordinate>`** to index compiled JVM libraries.
26
+
> - Use **`library-insight scan <jar|aar|klib|directory|maven-coordinate>`** to index compiled libraries.
26
27
> - Use **`library-insight scan-source <directory>`** to index a local Java/Kotlin source project without compilation.
Copy file name to clipboardExpand all lines: README.md
+6-19Lines changed: 6 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
# Library Insight 🔍
4
4
5
-
### JVM API Explorer & MCP Server
5
+
### API Explorer & MCP Server for Java, Kotlin & KMP
6
6
7
-
Analyze Java & Kotlin librariesand source code with a standalone CLI or integrate directly into AI IDEs via MCP.
7
+
Analyze Java and Kotlin libraries, JVM artifacts, Kotlin Multiplatform libraries, and local source code with a standalone CLI or integrate directly into AI IDEs via MCP.
8
8
9
9
AI coding assistants often guess Java/Kotlin APIs from outdated documentation, web examples, or a different version than the one used in your project. That leads to missing methods, deprecated usage, incorrect signatures, and wasted debugging time.
10
10
@@ -26,6 +26,7 @@ The complete documentation, architecture diagrams, command reference, and integr
26
26
<!-- --8<-- [start:features] -->
27
27
28
28
-**MCP Server**: Connect Cursor, Claude Desktop, or any MCP-compatible IDE to query APIs directly.
29
+
-**Kotlin Multiplatform (KMP) Support**: Resolve coordinates from Gradle Module Metadata (`.module` JSON), parse Native `.klib` metadata files, and merge platform variant API targets (`common`, `jvm`, `ios`, `js`, `wasm`).
29
30
-**Local Source Code Scanner (`scan-source`)**: Analyze Kotlin and Java source projects without compilation, preserving KDoc/Javadoc, imports, and declaration source locations (`file:line`).
30
31
-**Version-Correct API Lookup**: Build an API index from the exact JAR, AAR, Maven dependency, Gradle output, or source code used by your project to prevent AI hallucinations.
@@ -85,28 +86,14 @@ For setup instructions in Cursor or Claude Desktop, see the [MCP Integration Gui
85
86
86
87
<!-- --8<-- [start:roadmap] -->
87
88
88
-
We plan to expand Library Insight with deep source-level analysis capabilities, a three-layer clean architecture, and unified Kotlin Multiplatform (KMP) support:
89
+
We plan to expand Library Insight with deep source-level analysis capabilities:
89
90
90
91
### 🔍 Source Analysis Engine (Planned)
91
92
92
93
-**References Engine**: Build a symbol-to-usage index to locate references for any class, method, or property across the codebase (e.g. `library-insight references LoginRepository`).
93
94
-**Implementations**: Query all interface implementations or subclass declarations (e.g. `library-insight implementations Repository` -> `RoomRepository`, `NetworkRepository`).
94
95
-**Hierarchy**: Render the visual inheritance tree for any base class or interface (e.g. `library-insight hierarchy BaseViewModel`).
95
96
-**Source Call Graph**: Trace internal method execution paths using raw source file declaration locations.
96
-
97
-
### 🏗️ Clean Architectural Layers
98
-
99
-
To simplify maintenance, we are partitioning the codebase into three clean layers:
100
-
101
-
1.**Scanner Layer** (`scan`, `scan-source`) — Processes raw inputs (bytecode, sources, metadata) and compiles them.
102
-
2.**Unified Database** — Serves as the single serialization schema and repository index.
Copy file name to clipboardExpand all lines: docs/ai-agents.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,20 +10,20 @@ The skill is designed around one core rule: **do not guess from web examples whe
10
10
11
11
When you install the CLI globally via the recommended shell installer (`install.sh`), the script automatically copies the agent skill file into your user profile configurations:
12
12
13
-
*`~/.cursor/skills/library-insight`
14
-
*`~/.gemini/config/skills/library-insight`
15
-
*`~/.claude/skills/library-insight`
16
-
*`~/.agents/skills/library-insight`
17
-
*`~/.copilot/skills/library-insight`
18
-
*`~/.junie/skills/library-insight`
13
+
-`~/.cursor/skills/library-insight`
14
+
-`~/.gemini/config/skills/library-insight`
15
+
-`~/.claude/skills/library-insight`
16
+
-`~/.agents/skills/library-insight`
17
+
-`~/.copilot/skills/library-insight`
18
+
-`~/.junie/skills/library-insight`
19
19
20
20
Any active AI agent running on your computer will instantly discover and utilize the `library-insight` command tree when you ask a question.
21
21
22
22
---
23
23
24
24
## 2. Project Workspace Scoping
25
25
26
-
If you want to install the skill scoped *only* to your current project directory (so that any developer working in the repository gets the skill context), run the following command in the project root:
26
+
If you want to install the skill scoped _only_ to your current project directory (so that any developer working in the repository gets the skill context), run the following command in the project root:
Copy file name to clipboardExpand all lines: docs/architecture.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,21 +50,22 @@ graph TD
50
50
51
51
### Module Responsibilities
52
52
53
-
*`library-insight-common`: Low-level utility classes for ZIP/JAR/AAR archives extraction, Ktor asynchronous HTTP engines, and directory operations.
54
-
*`library-insight-model`: Contains immutable Kotlin serialization structures representing the public API schema (`LibraryApiIndex`).
55
-
*`library-insight-parser`: Performs raw Java bytecode parsing using the **ASM** library, extracting class fields, methods, generic signatures, and structures.
56
-
*`library-insight-kotlin`: Reads and parses compiled Kotlin Metadata header annotations (`@Metadata` via `kotlin-metadata-jvm`) to enrich signatures with Kotlin properties, nullability flags, and suspend keywords.
57
-
*`library-insight-search`: The query/search engine that matches search keywords against compiled packages, classes, constructors, methods, and variables.
58
-
*`library-insight-export`: Exporters that format API indices into target representations: **JSON**, **Markdown** reference documentation, and token-optimized **AI Context** pages.
59
-
*`library-insight-core`: The main orchestration hub. It coordinates the parsing, metadata enrichment, search routines, and calculates API differences/compatibility alerts.
60
-
*`library-insight-cli`: Command Line Interface definitions using **Clikt** mapping option/argument configurations.
53
+
-`library-insight-common`: Low-level utility classes for ZIP/JAR/AAR archives extraction, Ktor asynchronous HTTP engines, and directory operations.
54
+
-`library-insight-model`: Contains immutable Kotlin serialization structures representing the public API schema (`LibraryApiIndex`).
55
+
-`library-insight-parser`: Performs raw Java bytecode parsing using the **ASM** library, extracting class fields, methods, generic signatures, and structures.
56
+
-`library-insight-kotlin`: Reads and parses compiled Kotlin Metadata header annotations (`@Metadata` via `kotlin-metadata-jvm`) to enrich signatures with Kotlin properties, nullability flags, and suspend keywords.
57
+
-`library-insight-search`: The query/search engine that matches search keywords against compiled packages, classes, constructors, methods, and variables.
58
+
-`library-insight-export`: Exporters that format API indices into target representations: **JSON**, **Markdown** reference documentation, and token-optimized **AI Context** pages.
59
+
-`library-insight-core`: The main orchestration hub. It coordinates the parsing, metadata enrichment, search routines, and calculates API differences/compatibility alerts.
60
+
-`library-insight-cli`: Command Line Interface definitions using **Clikt** mapping option/argument configurations.
61
61
62
62
## Unified API Indexing Pipelines
63
63
64
-
Library Insight exposes two different parsing pipelines depending on the target input:
64
+
Library Insight exposes three different parsing pipelines depending on the target input:
65
65
66
66
1.**Bytecode Scan Pipeline (`scan` command)**: Extracts signatures from compiled `.class` files (inside JAR/AAR/Maven artifacts) using the ASM library, enriched by `kotlin-metadata-jvm`.
67
-
2.**Source Scan Pipeline (`scan-source` command)**: Extracts signatures directly from raw Java (`.java`) and Kotlin (`.kt`) source project files using JavaParser and Kotlin PSI compiler APIs.
67
+
2.**Kotlin Multiplatform (KMP) Scan Pipeline (`scan` command)**: Resolves Maven coordinates, inspects Gradle Module Metadata (`.module` JSON), extracts platform targets from Kotlin Native `.klib` metadata files, and merges platform variants (`common`, `jvm`, `ios`, `js`, `wasm`) into a unified index.
68
+
3.**Source Scan Pipeline (`scan-source` command)**: Extracts signatures directly from raw Java (`.java`) and Kotlin (`.kt`) source project files using JavaParser and Kotlin PSI compiler APIs.
68
69
69
70
Both pipelines converge into the same unified `LibraryApiIndex` schema, allowing existing downstream search, explain, and export subcommands to function identically without separate workflows.
0 commit comments