Toktoken banner
mauriziofonte mauriziofonte

Toktoken

AI community

Description

TokToken is a fast, single-binary C codebase indexer for AI coding agents. Powered by universal-ctags and SQLite FTS5, it provides precise symbol search, dependency tracking, and an MCP server. TokToken reduces LLM context token usage by 88-99% by retrieving exact code symbols instead of reading entire files. Zero runtime dependencies.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

TokToken (beta release)

Right now, your AI coding agent **reads entire files just to find one function**. That wastes tokens, money, and context window. **TokToken fixes this**.

Real numbers from [Redis](https://github.com/redis/redis) (727 files, 45K symbols, indexed in 0.9s):

What your agent needs Without TokToken With TokToken Savings
initServer() in server.c (8141 lines) 84,193 tokens 2,699 tokens 97%
sdslen() in sds.h (340 lines) 2,678 tokens 132 tokens 95%
processCommand() in server.c 84,193 tokens 4,412 tokens 95%
redisCommandProc typedef in server.h (4503 lines) 56,754 tokens 50 tokens 99%

**TokToken** scales well. Check it on the [Linux kernel](https://github.com/torvalds/linux) (65K files, 7.4M symbols) indexes in ~170 seconds:

What your agent needs Without TokToken With TokToken Savings
__schedule() in kernel/sched/core.c (10961 lines) 73,084 tokens 1,335 tokens 98%
do_sys_open() in fs/open.c (1583 lines) 9,915 tokens 89 tokens 99%
kmalloc() in include/linux/slab.h (1280 lines) 11,272 tokens 1,372 tokens 88%
ext4_fill_super() in fs/ext4/super.c (7573 lines) 53,651 tokens 376 tokens 99%

One command indexes your codebase. Your agent searches symbols, traces imports, and retrieves only the code it needs -- **88-99% fewer tokens** on every operation.

toktoken index:create            # index your project (once)
toktoken search:symbols "auth"   # find symbols by name
toktoken inspect:symbol      # retrieve just the code that matters

Works with Claude Code, Cursor, Windsurf, Copilot, Gemini, Codex, **and any MCP-compatible agent**. Single binary, zero dependencies, nothing written inside your project.

**Quick setup:** tell your AI ag