gitnexus-cli

Instructions for maintaining a read-only GitNexus index, a searchable knowledge graph built from a repository's source code.

In plain words
What is it for?
They are for checking index status, listing indexed repositories, registering a repository, and rebuilding its index when needed.
Why use it?
They help inspect whether the index is current without accidentally changing tracked project files.

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-cli
Any agent
npx skills add fo0/clawstash --skill gitnexus-cli
Clone the repo
git clone --depth 1 https://github.com/fo0/clawstash

Made for: Claude Code, Codex.

Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,166 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.00053 $0.01166
Opus 5 $0.00026 $0.00583
Sonnet 5 $0.00011 $0.00233
Haiku 4.5 $0.00005 $0.00117

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

Security

Grade A, and why

gitnexus-cli 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-cli/SKILL.md · 85 lines

How it starts

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

GitNexus CLI Commands

All commands work via npx — no global install required.

Read-only / analysis only. GitNexus must never write tracked files. These commands manage the index (.gitnexus/, gitignored) and the global registry (~/.gitnexus/) only. analyze is the one command that can touch CLAUDE.md / AGENTS.md — always pass --skip-agents-md, run it only when genuinely needed, and revert any tracked file it changes. Wiki/doc generation is not used under this policy. See the Read-Only Analysis Policy in CLAUDE.md / AGENTS.md.

Commands

analyze — (re)build the index — index-only, not routine

npx gitnexus analyze --skip-agents-md

Run from the project root. This parses all source files, builds the knowledge graph, and writes it to .gitnexus/ (gitignored). Always pass --skip-agents-md — without it, analyze ALSO rewrites the optimizer-managed CLAUDE.md / AGENTS.md context sections. Run analyze only when the index is genuinely missing/stale AND the current task needs it; it is not a routine step.

Flag Effect
--skip-agents-md Preserve AGENTS.md/CLAUDE.md sections — mandatory on every analyze
--force Force full re-index even if up to date
--embeddings Enable embedding generation for semantic search (off by default)
--drop-embeddings Drop existing embeddings on rebuild (default: preserve them)

Mandatory revert guard: even with --skip-agents-md, after any analyze run git status and git checkout -- <paths> for any tracked file it touched (.claude/**, CLAUDE.md, AGENTS.md, docs/wiki/**). Only analyze writes tracked files — status, index, and list never do. The index itself (.gitnexus/) stays gitignored and uncommitted — never in a commit or PR.

Read the full file on GitHub · 85 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 · 85 lines · 53 tokens per session scan A 270cd6f6e2b8

Subscribe to this mod's changes

gitnexus-cli is a skill published in the GitHub repository fo0/clawstash (1 stars, last pushed 2d ago), licensed MIT. It adds 53 tokens to every session and 1,166 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

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

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

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

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