/onelens:onelensfrom onelens
Queries a code knowledge graph for Java/Kotlin/Spring Boot backends and Vue 3 frontends. Traces call chains, dependencies, Spring bean wiring, REST endpoints, SQL-to-entity mappings, test coverage, and cross-stack impact analysis.
Ships in onelens. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The graph lives in FalkorDB (embedded falkordblite by default — no Docker needed — or FalkorDB server on port 17532). Each project is a named graph.
You have exactly 2 query tools plus a mandatory wake-up:
onelens_search — Full-text search (RediSearch syntax) across all node
types. Fuzzy, prefix, phrase, union. Weighted by field (name > body).
Use for "find me X by name or content."
onelens_query — Raw Cypher against the graph. Use for traversal:
impact analysis, execution traces, dependency chains, dead code, cross-stack.
onelens_status — MANDATORY first call. Returns what's indexed.
<wake_up>
onelens_status(graph="<project-name>")
Returns node counts, edge counts, and capability flags. If total_nodes == 0,
the response includes available_graphs — switch to the populated one
automatically. Do NOT ask the user. Do NOT invent graph names.
Parse the response to learn:
This tells you which Cypher patterns work and which node_types are valid for search. </wake_up>
<decision_tree>
| User asks | Tool | Why |
|---|---|---|
| "Find UserService" / "is there a class called X" | onelens_search | Name lookup = FTS |
| "Find all auth methods" | onelens_search | Prefix wildcard: auth* |
| "Where is password encryption?" | onelens_search | Body search: password encryption |
| "Find Vue components for tickets" | onelens_search | ticket* + node_type="component" |
| "What calls UserService?" / "impact of X" | onelens_query | Traverse CALLS edges |
| "Trace /api/users endpoint" | onelens_query | Traverse HANDLES → CALLS chain |
| "Who injects AuthService?" | onelens_query | Traverse INJECTS edges |
| "Is this method dead code?" | onelens_query | Check for inbound CALLS |
| "What REST endpoints exist?" | onelens_query | MATCH (e:Endpoint) |
| "What breaks on frontend?" | onelens_query | Cross-stack HITS traversal |
| "How many classes?" | onelens_status | Already in wake-up response |
Naming questions (find X) → search. Relationship questions (X connects to Y) → query. </decision_tree>
<search_tool>
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | YES | — | Search terms (RediSearch syntax) |
graph | string | no | "onelens" | Graph name |
node_type | string | no | "" (all) | Filter to one type |
n_results | int | no | 20 | Max results |
| Syntax | Example | What it matches |
|---|---|---|
| Prefix | auth* | authenticate, authorize, authentication |
| Fuzzy | %passwor% | password, passwd, passw0rd (edit-distance) |
| Union (OR) | login|signin|authenticate | Any of the terms |
| Phrase | "password encryption" | Exact contiguous phrase |
| Intersection | password encryption | Both terms anywhere (AND) |
| Exact | BCrypt | Exact term |
When node_type is empty (default), searches ALL types simultaneously.
Java / Spring backend:
| Value | Node label | Key fields |
|---|---|---|
"class" | Class | fqn, name, kind (CLASS/INTERFACE/ENUM/ABSTRACT_CLASS/RECORD), filePath, superClass, packageName |
"method" | Method | fqn (format: com.example.Foo#bar(String,int)), name, classFqn, body, javadoc, returnType, visibility, isStatic, isConstructor, isAbstract |
"endpoint" | Endpoint | path (e.g. /api/users/{id}), httpMethod (GET/POST/PATCH/DELETE), consumes, produces |
"springbean" | SpringBean | name, classFqn, scope, primary |
"field" | Field | fqn (format: com.example.Foo#bar), name, type |
Vue 3 frontend:
| Value | Node label | Key fields |
|---|---|---|
"component" | Component | fqn (format: src/views/X.vue::X), name, filePath, props, emits, scriptSetup, body, isTest |
"store" | Store | fqn, name, id (Pinia store id like "user"), state, getters, actions, style (options/setup), isTest |
"composable" | Composable | fqn, name, body, isTest |
"route" | Route | name, path, fullPath, componentRef |
"apicall" | ApiCall | method (GET/POST/etc.), path, callerFqn |
"jsfunction" | JsFunction | fqn, name, filePath, exported, body |
"jsmodule" | JsModule | filePath, name, isBarrel |
FalkorDB scores results by BM25 across indexed fields with weights:
{"type": "method", "fqn": "com.example.AuthService#login(String)", "name": "login", "file": "src/.../AuthService.java"}
# Find a specific class by name
onelens_search("UserService", node_type="class", graph="myapp")
→ [{"type":"class","fqn":"com.example.UserService","name":"UserService","file":"src/.../UserService.java"}]
# Find all auth-related methods (prefix wildcard)
onelens_search("auth*", graph="myapp")
→ [{"type":"method","fqn":"...#authenticate()","name":"authenticate","file":"..."},
{"type":"method","fqn":"...#setAuthenticationType()","name":"setAuthenticationType","file":"..."}]
# Find methods whose body mentions "password" AND "encryption" (intersection)
onelens_search("password encryption", graph="myapp")
→ [{"type":"method","fqn":"...#encryptApiFieldPassword()","name":"encryptApiFieldPassword","file":"..."}]
# Find Vue components related to tickets
onelens_search("ticket*", node_type="component", graph="myapp")
→ [{"type":"component","fqn":"src/views/TicketList.vue::TicketList","name":"TicketList","file":"src/views/TicketList.vue"}]
# Find all Pinia stores (wildcard)
onelens_search("*", node_type="store", graph="myapp")
</search_tool>
<query_tool>
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
cypher | string | YES | — | Cypher query |
graph | string | no | "onelens" | Graph name |
limit | int | no | 100 | Max rows |
FalkorDB is NOT Neo4j. These differences cause errors:
=~ regex. Use CONTAINS, STARTS WITH, ENDS WITH, toLower(x) CONTAINS 'y'.[:REL*1..3] variable-length paths. Use explicit hops:
MATCH (a)-[:CALLS]->(b)-[:CALLS]->(c).fqn, filePath, classFqn, returnType.LIMIT — unbounded MATCH on 200K nodes hangs.WHERE n.external IS NULL to get only
project code (not JDK/library methods).Java / Spring:
| Label | Properties |
|---|---|
| Class | fqn, name, kind (CLASS/INTERFACE/ENUM/ABSTRACT_CLASS/RECORD), filePath, superClass, packageName |
| Method | fqn (com.example.Foo#bar(String)), name, classFqn, returnType, body, javadoc, visibility, isStatic, isConstructor, isAbstract, external |
| Field | fqn (com.example.Foo#bar), name, classFqn, type |
| Endpoint | id, path, httpMethod, consumes, produces |
| SpringBean | name, classFqn, scope, primary |
| Module | name |
| Package | name, parentId |
| Annotation | fqn, name |
Vue 3:
| Label | Properties |
|---|---|
| Component | fqn (src/views/X.vue::X), name, filePath, props, emits, body, isTest |
| Store | fqn, name, id, state, getters, actions, isTest |
| Composable | fqn, name, body, isTest |
| Route | name, path, fullPath, componentRef |
| ApiCall | fqn, method, path, callerFqn |
| JsFunction | fqn, name, filePath, exported, body |
| JsModule | filePath, name, isBarrel |
Structural:
| Edge | From → To | Meaning |
|---|---|---|
HAS_METHOD | Class → Method | Class declares method |
HAS_FIELD | Class → Field | Class declares field |
CONTAINS | Package → Class/Package | Package nesting |
EXTENDS | Class → Class | Inheritance (extends) |
IMPLEMENTS | Class → Class | Interface implementation |
OVERRIDES | Method → Method | Method overrides parent |
Code flow:
| Edge | From → To | Meaning |
|---|---|---|
CALLS | Method → Method | Method A calls method B (the big one — 600K+ edges) |
READS_FIELD | Method → Field | Field read access |
WRITES_FIELD | Method → Field | Field write access |
INSTANTIATES | Method → Class | new Foo() |
RETURNS | Method → Class | Return type |
THROWS | Method → Class | Throws exception |
HAS_PARAMETER | Method → Class | Method parameter type |
Spring:
| Edge | From → To | Meaning |
|---|---|---|
HANDLES | Class → Endpoint | @RestController maps to endpoint |
INJECTS | Class → SpringBean | @Autowired/constructor injection |
REGISTERED_AS | Class → SpringBean | @Service/@Component/@Repository |
ANNOTATED_WITH | Class/Method → Annotation | Annotation usage |
Vue 3:
| Edge | From → To | Meaning |
|---|---|---|
USES_STORE | Component/Composable → Store | Component uses Pinia store |
USES_COMPOSABLE | Component/Composable → Composable | Component uses composable |
CALLS_API | Component/Composable/JsFunction → ApiCall | Frontend calls HTTP API |
DISPATCHES | Route → Component | Route renders component |
HAS_FUNCTION | JsModule → JsFunction | Module exports function |
IMPORTS | JsModule/Component/Store → JsModule/JsFunction | ES6 import |
Cross-stack (the killer feature):
| Edge | From → To | Meaning |
|---|---|---|
HITS | ApiCall → Endpoint | Vue API call matches Spring endpoint (normalized HTTP path) |
IMPACT ANALYSIS — "What breaks if I change UserService?"
MATCH (caller:Method)-[:CALLS]->(target:Method)
WHERE target.classFqn STARTS WITH 'com.example.UserService'
RETURN DISTINCT caller.classFqn AS affected_class, caller.name AS caller_method
ORDER BY affected_class LIMIT 50
BLAST RADIUS (2 hops) — "Full impact of changing this specific method"
MATCH (caller:Method)-[:CALLS]->(mid:Method)-[:CALLS]->(target:Method)
WHERE target.fqn = 'com.example.UserService#findById(Long)'
RETURN DISTINCT caller.fqn AS blast_radius LIMIT 100
EXECUTION TRACE — "Trace /api/users endpoint through the call chain"
MATCH (e:Endpoint {path: '/api/users'})<-[:HANDLES]-(controller:Class)
MATCH (controller)-[:HAS_METHOD]->(handler:Method)
MATCH (handler)-[:CALLS]->(callee:Method)
WHERE callee.external IS NULL
RETURN handler.name AS entry_point, callee.name AS calls, callee.classFqn AS in_class LIMIT 50
ALL REST ENDPOINTS
MATCH (e:Endpoint) RETURN e.httpMethod AS method, e.path AS path ORDER BY path LIMIT 100
SPRING DEPENDENCY CHAIN — "Who injects AuthService?"
MATCH (dependent:Class)-[:INJECTS]->(bean:SpringBean)
WHERE bean.classFqn CONTAINS 'AuthService'
RETURN dependent.name AS dependent_class, bean.name AS bean_name
DEAD CODE — "Which public methods have no callers?"
MATCH (m:Method)
WHERE m.external IS NULL AND m.visibility = 'public'
AND NOT ()-[:CALLS]->(m)
RETURN m.fqn AS potentially_dead LIMIT 50
Note: before declaring dead, also check OVERRIDES (polymorphic dispatch), ANNOTATED_WITH (@Scheduled/@EventListener/@PostConstruct), and reflection.
INHERITANCE TREE — "What implements UserRepository?"
MATCH (impl:Class)-[:IMPLEMENTS]->(iface:Class)
WHERE iface.name CONTAINS 'UserRepository'
RETURN impl.fqn AS implementation
ANNOTATION USAGE — "What classes use @Transactional?"
MATCH (c:Class)-[:ANNOTATED_WITH]->(a:Annotation)
WHERE a.fqn CONTAINS 'Transactional'
RETURN c.fqn AS transactional_class
CROSS-STACK TRACE — "Which Vue components call which Spring endpoints?"
MATCH (c:Component)-[:CALLS_API]->(a:ApiCall)-[:HITS]->(e:Endpoint)
RETURN c.name AS vue_component, a.method AS http_method,
a.path AS api_path, e.path AS spring_endpoint LIMIT 50
VUE STORE USAGE — "Which components use the user store?"
MATCH (c:Component)-[:USES_STORE]->(s:Store)
WHERE s.name CONTAINS 'user' OR s.id CONTAINS 'user'
RETURN c.name AS component, s.name AS store_name
FIND ALL CALLERS OF A METHOD
MATCH (caller:Method)-[:CALLS]->(target:Method)
WHERE target.name = 'findById' AND target.classFqn CONTAINS 'UserService'
RETURN caller.fqn AS called_from LIMIT 30
TEST: exclude test doubles
MATCH (m:Method) WHERE m.external IS NULL
RETURN count(m) AS project_methods
-- or for Vue nodes:
MATCH (s:Store) WHERE NOT s.isTest RETURN s.name
</query_tool>
<retry_protocol>
name = 'X' → name CONTAINS 'X' → toLower(name) CONTAINS 'x'.Foo#bar(String,int).
Search by name first: onelens_search("bar", node_type="method").onelens_status — if no Vue data imported,
Component nodes won't exist. Only query node types that appear in counts.=~, remove *1..3, add LIMIT.WHERE n.external IS NULL (project code only),
add tighter LIMIT, add WHERE on classFqn or name.<anti_patterns>
onelens_status — it tells you what's available.available_graphs from status.[:CALLS*1..3]) — use explicit hops.LIMIT — graphs can have 200K+ nodes.onelens_search for impact/trace — that's onelens_query.onelens_query for name lookup — that's onelens_search.(caller)-[:CALLS]->(abstract_method)
means the real implementation lives on subclasses via OVERRIDES.m.name (or walk (impl)-[:OVERRIDES]->(iface)) or you will under-report the
blast radius and wrongly conclude the graph is incomplete..claude/worktrees/,
build/, vendored copies hold outdated duplicates whose line numbers don't match HEAD.file:line before asserting "off-by-one" or "dead branch".
</anti_patterns><reading_code>
Both tools return filePath and fqn but NOT full source code. After finding
the relevant node:
Read tool on the file / filePath value to see actual code.filePath is relative to the project root.Pattern: search → read. Find candidates via graph, then read source for logic. Graph tells you WHERE and WHAT CONNECTS. Source tells you HOW. </reading_code>
<references_index>
| File | Load when |
|---|---|
references/recipes.md | First stop for complex multi-step queries (20+ real recipes) |
references/graph-schema.md | Complete property list for every node + edge |
references/queries-code.md | Advanced Java code patterns (polymorphism, generics) |
references/queries-sql.md | SQL migration, table/column lineage, report impact |
references/queries-tests.md | Test coverage queries |
references/jvm.md | Spring/JPA deep patterns (@Qualifier, bean graph, @MappedSuperclass) |
references/vue3.md | Vue 3 specific patterns |
references/capabilities.md | What each capability flag means |
| </references_index> |
references/capabilities.md (opens in a new tab)references/graph-schema.md (opens in a new tab)references/jvm.md (opens in a new tab)references/queries-code.md (opens in a new tab)references/queries-sql.md (opens in a new tab)references/queries-tests.md (opens in a new tab)references/recipes.md (opens in a new tab)references/retrieval.md (opens in a new tab)references/vue3.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Java, Kotlin, Spring Boot, Vue
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: skills.0: Invalid string: must start with "./"
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
Other plugins' skills for the same job