SuperAPI AI Directory

cc-sensei

Explore Claude Code's source as queryable architecture modules: trace cross-cutting concerns, search patterns and read source code locally.

Open website

About this tool

Purpose

cc-sensei is aimed at developers who want AI to understand the Claude Code architecture and build Agents based on it. The typical problem it solves is: the Claude Code source code is massive (about 310,000 lines, 1,250 files), and after developers read the source code, AI cannot reuse that knowledge; or they want to build a knowledge base but are discouraged by the amount of code. This project distills the source code into structured analysis and provides it to AI through the MCP protocol, acting as a "Claude Code Chief Architect" consultant.

Main Capabilities

The project distills Claude Code's 310,000 lines of source code and 1,250 files into 32 core modules and about 40,000 lines of structured analysis, covering: the Agent main loop, the tool system and execution pipeline, permissions and security sandbox, model API and streaming, context engineering and compression, file/Shell/Git tools, the MCP protocol, the Ink rendering engine, skills/plugins, persistent memory, prompt cache interruption detection, subagents and the task system, etc. (22 core modules plus 10 in-depth supplements).

The project establishes a complete index chain: natural language → module → design decision → reusable pattern → corresponding source code. After integration, AI can call tools on its own and return complete analysis with source code references.

How to Use

The project provides two installation paths:

  • Option A: Try it instantly with zero installation via npx, directly download and run the server, then connect AI according to step 3.
  • Option B: Clone the repository for full control, then install and build.

The build step parses the 32 module analyses, generates the knowledge index, and compiles the server; it only needs to be run once. After completion, you should see module-registry.json (32 modules) and a build success message. If pnpm is not available, you can first run npm install -g pnpm.

Step 3 is connecting AI: add the configuration snippet to the MCP client configuration file, and replace the path with the actual clone path. After restarting the client, integration is complete, and AI gains 6 new skills. You can say to AI: "Use cc-sensei to tell me how Claude Code optimizes prompt cache." It will call the tools on its own and return complete analysis with source code references.

Features of the Six Tools

Each tool has: path prefix fault tolerance (src/... and bare paths are both acceptable); result throttling (default 800 characters per section, 12 sections total, to avoid filling the context window); path traversal protection (rejects attacks such as ../../../etc/passwd); graceful degradation (returns friendly prompts for parameter errors instead of crashing).

Applicable Scenarios and Limitations

Suitable for developers who want to clone the overall architecture of Claude Code, or borrow only one of its designs (such as adding context compression to a self-built Agent). The project calls itself "self-reliant," meaning it is built using the methods taught by Claude Code and serves Claude.

Advanced configuration allows the data source to point to other projects; as long as that project writes analysis according to the same MODULE_NOTES template, Oracle can become a knowledge server for any project. The roadmap mentions incremental indexing, more analysis section types, HTTP/SSE transport, multi-codebase support, etc.; these are planned content.

Limitations: it must be used through an MCP client; the source code path and configuration path must match correctly; building requires a Node/pnpm environment; other projects must write analysis according to the same template if they want to reuse it. The repository does not provide specific pricing standards, platform scope, or effectiveness commitments; the relevant facts are not yet provided.