
所有代码代理仓库的映射:一个索引,每个仓库一张卡,一个MCP服务器。支持Claude Code、Codex、Gemini CLI和Cursor。
概览
Cairn 会扫描文件夹中的每个 Git 仓库一次,计算它们的连接方式,并给你的代理提供:- 一个微小且始终加载的索引;- 每个仓库一张简短的卡片。 代理人知道物品所在位置,无需重新探索。 石堆是堆叠的石头标记,用来引导徒步者沿着小径前进。石堆留下的小而廉价的标记,引导编码代理找到正确的存储点,然后找到正确的文件。 在 上运行。使用 Claude Code?安装 cairn 作为插件,或者把那部分粘贴到 Claude Code 里,它会自动帮你安装所有内容。 编码代理在一个仓库内工作。实际工作涵盖多个仓库:网页应用、API、共享类型包、支付服务、报告工作。比如说“向行程端到端添加小费金额”,代理必须:1. 发现存在兄弟仓库;2. 对所有仓库进行 grep 处理;3. 读取一堆文件;4. 猜测哪个服务拥有行程表。 这会消耗代币和回合,较弱的模型也会猜错。 手工维护的“相关仓库”文档能帮忙,直到它们变得陈旧。
概述(AI 翻译)
你所有代码代理仓库的地图。 Cairn 会扫描文件夹里的每个 git 仓库一次,能用 了解它们如何连接,并为你的代理人提供:
- 一个极小且始终加载的索引;
- 每个仓库一张短卡。
代理人知道物品所在位置,无需重新探索。
石堆是堆叠的石碑,引导徒步者沿着小径前行。石堆留下的小而廉价的遗迹 标记引导编码代理找到正确的仓库,然后再到正确的文件。
支持Claude Code、Codex、Gemini CLI和Cursor,支持Windows、macOS和Linux。 使用 Claude 代码?安装 cairn 作为插件,或者粘贴那部分 然后它会帮你安装所有东西。
为什么
编码代理在一个仓库中工作。实际工作涵盖多个仓库:网页应用、API、共享类型 包裹、支付服务、报告工作。写*“在出行的端到端增加小费金额”*,然后 代理人必须:
- 发现存在兄弟仓库;
- 通过所有 grep;
- 阅读一堆文件;
- 猜测哪个服务拥有
trips表。
这会消耗代币和回合,较弱的模型也会猜错。
手工维护的“相关仓库”文档能帮忙,直到它们变得陈旧。Cairn 是根据代码构建那个映射的 保持新鲜感:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
cairn
A map of all your repos for coding agents. cairn scans every git repo in a folder once, works out how they connect, and gives your agent:
- a tiny always-loaded index;
- a short card per repo.
The agent knows where things live without re-exploring.
Cairns are the stacked-stone markers that guide hikers along a trail. cairn leaves small, cheap markers that guide coding agents to the right repo, and then to the right file.
Works with Claude Code, Codex, Gemini CLI, and Cursor, on Windows, macOS, and Linux. Using Claude Code? Install cairn as a plugin, or paste that section into Claude Code and it installs everything for you.
Why
Coding agents work inside one repo. Real work spans many: a web app, an API, a shared types package, a payments service, a reporting job. Say “add a tip amount to trips end to end” and the agent has to:
- discover that sibling repos exist;
- grep through all of them;
- read a pile of files;
- guess which service owns the
tripstable.
That costs tokens and turns, and weaker models guess wrong.
Hand-maintained “related repos” docs help until they go stale. cairn builds that map from the code itself and keeps it fresh:
~/code/ ~/code/.cairn/
├── rider-web/ cairn ├── INDEX.md ← ~25 tokens per repo, always loaded
├── trips-svc/ ─────▶ ├── cards/trips-svc.md ← read on demand (≤ 800 tokens)
├── payments-svc/ scan ├── workspace.json ← the full graph
├── analytics-etl/ └── authored/ ← your summaries and decisions
└── …
What your agent sees
The index is a few lines, loaded into every session through CLAUDE.md or an equivalent:
# Workspace repos (cairn)
- admin-console (@fleetline/admin-console): Next.js back-office for ops staff; queries trips… · nextjs
- analytics-etl: Nightly SQL reporting jobs over trips, payments, drivers… · python
- payments-svc (payments): Go service that charges completed trips and records weekly payouts · go
- trips-svc: FastAPI service owning the trip lifecycle and the trips/trip_events tables · fastapi · used by admin-console
- ui-kit (@fleetline/ui-kit): Shared React components (Button, Card) · react · used by admin-console
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →