Tools

Agent Tooling — Overview

Why three tools were added around Claude Code, what each one does, how they fit together, and the lessons that apply to all of them.

Suggest an edit

Agent Tooling — Overview

This chapter documents the tools installed around Claude Code on the development machine, why they were chosen, how they are configured, and what went wrong on the way. Each tool gets its own lesson; this page is the map.

The problem these tools address

An AI coding agent spends tokens in three places, and each place has a different lever:

Layer What costs tokens Lever Tool
Reading Loading files into context to answer a question Query a structure instead of reading the files Graphify (and CodeGraph, already in place)
Writing The model's own output — preambles, restated context, ceremony Change the output style at the prompt level Caveman
Retrieving Finding the right prose among documents that are not code A semantic index over ingested documents AnythingLLM

The three do not overlap. Graphify is a graph over a corpus; Caveman is a persona; AnythingLLM is a RAG application. They compose because each sits at a different layer.

What was installed

  • Graphify — a CLI plus a Claude Code skill that turns a folder into a knowledge graph. Code is parsed locally with tree-sitter for free; documents go through an LLM. See Graphify.
  • Caveman — a Claude Code plugin that makes the agent terse. Measured at roughly 65% fewer output tokens by its author. See Caveman.
  • AnythingLLM — a local-first RAG application running in Docker, queryable from a Claude Code session through a small self-authored skill. See AnythingLLM.

What was considered and dropped

Headroom (headroomlabs-ai/headroom) compresses tool output, logs, and files before they reach the model, by sitting as a proxy between the agent and the API. It was in the original plan and was dropped for two reasons:

  1. Its proxy works by claiming ANTHROPIC_BASE_URL, and on this machine that variable already points at OpenRouter. Headroom can chain to an upstream through ANTHROPIC_TARGET_API_URL, but that puts it in the path of every request and changes how every session routes.
  2. headroom wrap claude installs the Serena MCP server at user scope in ~/.claude.json, which persists across every project. CodeGraph already covers semantic code navigation here.

AnythingLLM replaced it in the plan. Headroom's own README names Graphify and Caveman as compatible companions, so it remains an option if the routing concern goes away.

How the tools relate to CodeGraph

CodeGraph was already installed before any of this. It indexes symbols — definitions, callers, callees, impact — and re-indexes automatically about a second after a file changes. It is the right tool for questions about code structure in the current repository.

Graphify is a different kind of index: a concept graph with community detection, built once and updated on demand. It is at its best on prose and at its weakest on code-heavy Markdown, which is documented honestly in its lesson. Neither replaces the other.

Lessons that apply to every tool

⚠️ Never dump the environment. During setup, an env | grep -i anthropic printed two live API keys in full into the session transcript because a redacting sed failed to match them. Transcripts persist on disk under ~/.claude/projects/. Both keys had to be rotated. Print key lengths, never values, and prefer read -rs when a key must be entered.

Store keys outside every repository. Every credential introduced during this work lives under ~/.claude/ or ~/.config/, never inside a checkout. The content repositories are fetched as tarballs and git-synced to production; a key committed by accident ships.

Generated output beside the thing it scans is a trap in this content system. A satellite book's root is the book, so any directory the walker finds at the root becomes a chapter — including graphify-out/. The full story is in the Graphify lesson; the short version is to write generated output outside the repo.

Measure before running anything that bills. Every tool here that calls a model was measured first: token estimates for Graphify, live model pricing from OpenRouter, a single-repo smoke test before the batch. The measurements changed the recommendation more than once.

A tool can work and still not deliver. Graphify executes correctly on every repository it was run against, and its query commands still returned nothing useful on this content. Mechanical success and functional value are different questions; ask both.

The subagent rule

The global Claude Code instructions on this machine forbid spawning subagents without asking first. Graphify's default extraction path dispatches subagents from the host session when no external backend is configured. Running it with --backend openrouter, as documented in its lesson, calls the provider directly from the CLI and never touches that path.

Where things live

Item Path
Graphify CLI ~/.local/bin/graphify (uv tool)
Graphify skill ~/.claude/skills/graphify/
Graphify provider config ~/.graphify/providers.json
Graphify output, guide books ~/graphify/<repo>/
Graphify output, synapse synapse/graphify-out/ (gitignored)
Caveman plugin ~/.claude/plugins/cache/caveman/
Caveman mode config ~/.config/caveman/config.json
AnythingLLM data ~/anythingllm/
AnythingLLM credentials ~/.claude/anythingllm.env
AnythingLLM skill ~/.claude/skills/anythingllm/SKILL.md
Mark as read