gortex CLAUDE.md

Project instructions for Gortex, a Go code-intelligence engine that indexes a repository into a searchable graph stored in SQLite. They describe its build, tests, code layout, and graph-based tools.

In plain words
What is it for?
Use them to build and test Gortex, inspect repository relationships through its graph tools, and follow the project's required discovery workflow.
Why use it?
They give coding agents a consistent way to understand and modify the Gortex codebase without relying only on raw file searches.

Instructions file

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 instructions/zzet/gortex/claude-md
Clone the repo
git clone --depth 1 https://github.com/zzet/gortex
Per session 5,172 This file is loaded in full into every session.
When invoked 5,172 The same file — it is already loaded in full.
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.05172 $0.05172
Opus 5 $0.02586 $0.02586
Sonnet 5 $0.01034 $0.01034
Haiku 4.5 $0.00517 $0.00517

Measured 2d ago against content hash 9fc95c3866ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gortex CLAUDE.md 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 2d ago.

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.md · 134 lines

How it starts

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

Gortex

Code intelligence engine written in Go. Indexes repositories into a knowledge graph held in a local SQLite store and exposes it via CLI and MCP Server.

Build & Test

go build -o gortex ./cmd/gortex/   # requires CGO (tree-sitter C bindings)
go test -race ./...                 # all test packages must pass

Codebase Overview

  • Languages: go (primary)
  • Entry point: cmd/gortex/main.go
  • Source: 1,338 Go files (728 non-test) across the cmd/ and internal/ trees
  • Graph size: ~31k nodes, ~206k edges when the daemon indexes this repo

MANDATORY: Use Gortex's graph tools instead of Read/Grep/Glob

Gortex's workhorse tools are reachable two equivalent ways — over the registered MCP server, or via the equivalent gortex CLI verbs (gortex edit verify, gortex memory surface, gortex analyze, and gortex call <tool> for anything else; the verb reference is in docs/cli.md). Use whichever your harness has mounted — they are two front doors over the same handlers, and the daemon routes tool calls by name so the CLI reaches the full surface even under the core preset.

Either way, you MUST prefer graph queries over file reads on every task in this repo — search_symbols, find_usages, get_symbol_source, get_editing_context, smart_context, edit_symbol / edit_file / rename_symbol / batch_edit (or the matching gortex verbs). PreToolUse hooks deny Read / Grep / Glob against indexed source; the deny message names the right tool. The MCP server registers 180+ tools but by default publishes only a curated core preset (~34 dev-cycle workhorses) eagerly in tools/list, deferring the rest behind the tools_search discovery tool (the core/defer default — see docs/mcp.md). Opt into the full eager surface with GORTEX_TOOLS=full; GORTEX_LAZY_TOOLS=1 is the older all-or-nothing defer switch. The cross-project rule tables live in ~/.claude/CLAUDE.md — neither is restated here. This file carries only project-specific guidance.

Read the full file on GitHub · 134 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. 2d ago First seen · 134 lines · 5,172 tokens per session scan A 9fc95c3866ad

Subscribe to this mod's changes

gortex CLAUDE.md is an instructions file published in the GitHub repository zzet/gortex (1,516 stars, last pushed today), licensed Apache-2.0. It adds 5,172 tokens to every session, about $0.0259 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-30.