gitnexus-query

An advanced query interface for GitNexus, a tool that maps relationships in a codebase. It lets you search that code map using plain descriptions or database-style queries.

In plain words
What is it for?
Use it to find unused exports, circular dependencies, long functions, callers of a function, or other custom patterns in the code graph.
Why use it?
It helps answer codebase questions that ordinary searches cannot, especially when you need to follow calls, imports, or other relationships.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fo0/clawstash/gitnexus-query
Any agent
npx skills add fo0/clawstash --skill gitnexus-query
Clone the repo
git clone --depth 1 https://github.com/fo0/clawstash

Made for: Claude Code, Codex.

Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 723 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00050 $0.00723
Opus 5 $0.00025 $0.00362
Sonnet 5 $0.00010 $0.00145
Haiku 4.5 $0.00005 $0.00072

Measured yesterday against content hash 438515fe3c23, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gitnexus-query scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/gitnexus/gitnexus-query/SKILL.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Advanced Queries with GitNexus

When to Use

  • "Find all unused exports"
  • "Show circular dependencies"
  • "List all functions that match X pattern"
  • Custom relationship queries beyond what other skills cover
  • Complex cross-referencing or code metrics

Tools

gitnexus_query -- Natural Language Search

Best for: Finding code by description, not by exact name.

gitnexus_query({query: "error handling middleware"})
-> Found: errorHandler.ts, apiMiddleware.ts, errorBoundary.tsx
-> Processes: ErrorHandlingFlow, ApiRequestFlow

gitnexus_cypher -- Raw Cypher Queries

Best for: Complex relationship queries, metrics, pattern detection.

Find all callers of a function:

MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "targetFunction"})
RETURN caller.name, caller.filePath
ORDER BY caller.filePath

Find circular dependencies between modules:

MATCH path=(a:Module)-[:CodeRelation {type: 'IMPORTS'}]->(b:Module)-[:CodeRelation {type: 'IMPORTS'}]->(a)
RETURN a.name, b.name, length(path)

Find functions with many dependencies (potential god functions):

MATCH (f:Function)-[r:CodeRelation {type: 'CALLS'}]->(target)
WITH f, count(target) AS deps
WHERE deps > 10
RETURN f.name, f.filePath, deps
ORDER BY deps DESC

Find unused exports:

MATCH (e:Export)
WHERE NOT EXISTS { MATCH ()-[:CodeRelation {type: 'IMPORTS'}]->(e) }
RETURN e.name, e.filePath

Find all implementations of an interface:

MATCH (impl)-[:CodeRelation {type: 'IMPLEMENTS'}]->(iface {name: "InterfaceName"})
RETURN impl.name, impl.filePath

Find cross-layer dependencies (e.g. controller -> repository directly):

MATCH (c:Function)-[:CodeRelation {type: 'CALLS'}]->(r:Function)
WHERE c.filePath CONTAINS 'controller' AND r.filePath CONTAINS 'repository'
RETURN c.name, r.name, c.filePath, r.filePath

Tips

  • Node types depend on the analyzed project: Function, Class, Module, Export, Type, etc.
  • Relationship types: CALLS, IMPORTS, IMPLEMENTS, EXTENDS, REFERENCES
  • Use gitnexus_query first for discovery, then gitnexus_cypher for precise queries
  • If Cypher query returns empty: check node/relationship type names with a broad query first

Read the full file on GitHub · 88 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 88 lines · 50 tokens per session scan A 438515fe3c23

Subscribe to this mod's changes

gitnexus-query is a skill published in the GitHub repository fo0/clawstash (1 stars, last pushed yesterday), licensed MIT. It adds 50 tokens to every session and 723 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

design-mcp-server

Design the tool surface, resources, and service layer for a new MCP server. Use when starting a new server, planning a major feature expansion, or when the user describes a domain/API they want to expose via MCP. Produces a design doc at docs/design.md that drives implementation.

cyanheads/obsidian-mcp-server · 62 tokens

api-canvas

DataCanvas primitive reference — a Tier 3 SQL/analytical workspace for tabular MCP servers, backed by DuckDB. Use when registering tables from upstream APIs, running ad-hoc SQL across them, and exporting results. Covers the acquire → register → query → export flow, per-table TTL, the token-sharing pattern for…

cyanheads/obsidian-mcp-server · 85 tokens

api-telemetry

Catalog of OpenTelemetry instrumentation built into framework @cyanheads/mcp-ts-core — spans, metrics, completion logs, env config, runtime caveats, custom instrumentation patterns, and cardinality rules. Use when enabling OTel export, adding custom spans or metrics in services, debugging missing telemetry, looking up…

cyanheads/obsidian-mcp-server · 85 tokens

maintenance

Investigate, adopt, and verify dependency updates — with special handling for @cyanheads/mcp-ts-core. Captures what changed, understands why, cross-references against the codebase, adopts framework improvements, syncs project skills, and runs final checks. Supports two entry modes: run the full flow end-to-end, or…

cyanheads/obsidian-mcp-server · 75 tokens

add-test

Scaffold a test file for an existing tool, resource, or service. Use when the user asks to add tests, improve coverage, or when a definition exists without a matching test file.

cyanheads/obsidian-mcp-server · 41 tokens

polish-docs-meta

Finalize documentation and project metadata for a ship-ready MCP server. Use after implementation is complete, tests pass, and devcheck is clean. Safe to run at any stage — each step checks current state and only acts on what still needs work.

cyanheads/obsidian-mcp-server · 54 tokens