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

Hyper iOS App: Voice Recorder with Real-Time Transcription and Action Extraction
Hyper is an iOS voice recorder app that transcribes conversations in real-time, provides summaries and action items, and allows mid-conversation queries via wakeword detection. It's designed for unstructured meetings like 1:1s, coffee chats, and standups.

Windows System Tray App for Real-Time Claude API Usage Monitoring
A developer built a lightweight Windows tray application that displays Claude API quota usage in real time, including 5-hour and 7-day windows, today's token counts, and depletion forecasts. The app supports Korean, English, Chinese, and Japanese UI and is open source on GitHub.

Multi-Agent System for Deep Competitive Analysis with Claude
A developer built a three-wave agent system that moves beyond shallow competitor lists to extract pricing intelligence, customer sentiment patterns, and strategic signals through structured multi-source research.

Local AI Agent Workflow Using OpenCode, FastMCP, and DeepSeek-r1
A developer shares their local AI agent setup using OpenCode with AGENTS.md files for deterministic system prompts, FastMCP for exposing local functions, and DeepSeek-r1 via Ollama for specific subagents like testing.