ai-codex: Pre-index your codebase to save Claude tokens

What ai-codex does
ai-codex is a single script that scans your project and generates five compact markdown files to pre-index your codebase for Claude Code conversations. This eliminates the initial exploration phase where Claude typically spends 10-20 tool calls reading files, scanning directories, and checking functions.
How it works
You run npx ai-codex once to generate these files:
routes.md— every API route with methods and auth tagspages.md— full page tree with client/server flagslib.md— all library exports with function signaturesschema.md— database schema compressed to key fields onlycomponents.md— component index with props
Then add one line to your CLAUDE.md telling Claude to read these files first. Every future conversation skips the exploration phase entirely.
Performance impact
On large projects, the exploration phase typically burns 30-50K tokens before any real work begins. The creator's example project had 950+ API routes and 255 DB models:
- Without codex: ~15 Serena/Read calls to understand the finance module
- With codex: 5 grep calls on the pre-built index, instant full picture — routes, pages, schema, lib exports, components
- All in parallel, all under 2 seconds
Technical details
The tool works with Next.js (App Router & Pages Router) and generic TypeScript projects. It auto-detects Prisma schemas. The entire tool was designed and built by Claude Code itself in a single conversation session. It's MIT licensed and available on GitHub.
📖 Read the full source: r/ClaudeAI
👀 See Also

Claude Code Plugin for Reddit Business Research
A Claude Code plugin automates Reddit research for businesses by searching relevant posts, analyzing threads, and generating structured markdown reports with findings and source links. No API keys required—install via GitHub and run with a single command.

Testing δ-Mem on Apple Silicon: MLX Implementation and Benchmarks
δ-mem paper implemented via mlx on a MacMini 64GB shows mixed but promising local benchmarks, with gains in realistic replay scenarios.

MultiModel Code Review Workflow Packaged as Reusable Skill
A reusable skill that orchestrates multiple AI models for PR and non-PR code reviews, tested with OpenClaw and models like GPT-5.5, DeepSeek V4 Pro, Kimi K2.6, Qwen 3.6 Plus, and GLM-5.1.

Relay lets Claude Code sessions message each other without alt-tabbing
A plugin called Relay uses Claude Code's channels capability to let parallel sessions communicate directly, removing the need to manually copy-paste context between backend and frontend repos.