ctx: AI-Ready Codebase Context
2025-11-09
ctx: AI-Ready Codebase Context
AI coding assistants lack architectural context. Every time I asked Claude or ChatGPT to write code, I’d waste time explaining my codebase structure, patterns, and conventions.
I needed a lightweight, always-fresh representation of my codebase—just the skeleton, no implementation details. So I built ctx.
What It Does
ctx extracts your codebase into .ctx/ with “skeletons”—function signatures, class structures, type definitions, exports. Roughly 6% of the original code size. Feed these to your AI, and it understands your entire architecture before touching real files.
The Workflow
go install github.com/dakshpareek/ctx@latest
cd /path/to/your/project
ctx init # bootstrap .ctx/ and seed the index
ctx ask # auto-sync + prompt to .ctx/prompt.md
# ... share prompt, save skeletons to .ctx/skeletons/ ...
ctx update # mark skeletons current after AI saves them
ctx bundle # optional: export .ctx/context.md for pairing
ctx askscans for changes and writes an AI prompt to.ctx/prompt.md- Paste prompt into Claude/ChatGPT
- AI generates skeletons → save to
.ctx/skeletons/ - Run
ctx update - Next time, only new/changed files need skeletons
Why Manual First
Phase 1 is intentionally manual:
- Simple and reliable
- Works with any LLM
- No vendor lock-in
- Build incrementally
Phase 2 adds automation, watch mode, git hooks.
Get Started
go install github.com/dakshpareek/ctx@latest
cd /path/to/your/project
ctx init
ctx ask