Stop paying your AI to reread your repo.
TokenSaver gives it a small cheat sheet instead.
Turn repeated repo scanning into reusable project context.
Your AI agent has no project memory.
Every new session, it opens the same files again: package.json, routes, configs, docs, random files under src/…
That's fine once.
It's expensive forever.
TokenSaver reads the important bits once, then hands your agent a short cheat sheet it can reuse.
Without TokenSaver → a large repeated repo scan, every session
With TokenSaver → a small reusable read, once
TokenSaver reads your project's key files, then creates:
TOKENSAVER.md— a short entry point your agent reads first.tokensaver/— a focused context folder with 7 lightweight Markdown files
Your agent gets oriented from a few small files instead of scanning the whole repo. It only opens source files when it actually needs the details.
TokenSaver replaces expensive full-repo scanning. It's not another layer on top — it's a shortcut.
.tokensaver/ — 7 lightweight Markdown files
| File | What it tells the agent |
|---|---|
overview.md |
What this project is, what it's built with |
architecture.md |
How the pieces fit together |
codebase-map.md |
Annotated directory tree — where everything lives |
conventions.md |
Naming, patterns, code style |
decisions.md |
Key architecture decisions and why |
gotchas.md |
Known pitfalls — don't step on these |
session-handoff.md |
What's in progress, what's next, what's blocked |
TOKENSAVER.md — the universal entry point. Adapters point AI tools here first.
Thin adapters — small pointers for tools that auto-load specific files:
| Adapter | For |
|---|---|
CLAUDE.md |
Claude Code auto-load |
AGENTS.md |
Codex, Copilot Coding Agent, Cline, Windsurf, Roo Code |
GEMINI.md |
Gemini CLI |
.cursor/rules/tokensaver.mdc |
Cursor |
.github/copilot-instructions.md |
VS Code Copilot |
Changes are wrapped in <!-- tokensaver:start --> / <!-- tokensaver:end --> — your existing config stays untouched.
TokenSaver is agent-agnostic. TOKENSAVER.md is a plain Markdown file. How tools pick it up depends on their read mechanism:
- Tools that auto-load instruction files (Claude Code, Cursor, Codex…) → thin adapters
- Tools that don't auto-load → drop a one-liner in your first prompt
Tool compatibility
| Tool | How it loads TokenSaver |
|---|---|
| Claude Code | First-class /tokensaver Skill + CLAUDE.md → TOKENSAVER.md |
| Cursor | .cursor/rules/tokensaver.mdc → TOKENSAVER.md |
| Codex / OpenAI | AGENTS.md → TOKENSAVER.md |
| GitHub Copilot Coding Agent | AGENTS.md → TOKENSAVER.md |
| Gemini CLI | GEMINI.md → TOKENSAVER.md |
| VS Code Copilot | .github/copilot-instructions.md → TOKENSAVER.md |
| Aider | Reads TOKENSAVER.md directly |
| Windsurf | AGENTS.md → TOKENSAVER.md |
| Cline | AGENTS.md → TOKENSAVER.md |
| Roo Code | AGENTS.md → TOKENSAVER.md |
The only file you need is SKILL.md. One command, one file — that's the install.
Claude Code — install in 5 seconds
mkdir -p ~/.claude/skills/tokensaver && \
curl -sL https://raw.githubusercontent.com/thinkofuture/TokenSaver/main/SKILL.md \
-o ~/.claude/skills/tokensaver/SKILL.mdThat's it. Now in any project:
/tokensaver
TokenSaver scans your project, creates .tokensaver/ and TOKENSAVER.md, then adds thin adapter blocks where useful — no manual prompts in most setups.
Thin adapter blocks added to:
| Tool | Adapter file |
|---|---|
| Claude Code | CLAUDE.md |
| Cursor | .cursor/rules/tokensaver.mdc |
| Codex, Copilot Coding Agent, Windsurf, Cline, Roo Code | AGENTS.md |
| Gemini CLI | GEMINI.md |
| VS Code Copilot | .github/copilot-instructions.md |
All wrapped in <!-- tokensaver:start/end --> blocks — your existing config stays untouched.
Clone the full repo (docs, examples, or contributing)
git clone https://github.com/thinkofuture/TokenSaver.gitUseful when you want to browse examples, read the philosophy docs, or send a PR.
Daily use:
# Start work — adapters point to TOKENSAVER.md
claude
# End of session — refresh what changed
claude "Update project context with today's changes"Is this Claude Code only?
No. Claude Code gets a first-class Skill, but .tokensaver/ is plain Markdown. Every major AI coding tool has a thin adapter file that points to TOKENSAVER.md — /tokensaver creates them all in one go.
Does it replace my README or docs?
No. TokenSaver is for AI agents, not humans. Keep your README, wiki, and API docs — they serve a different audience.
Won't this make the agent read more files?
Opposite. A few small structured files replace the usual blind repo scan. Less reading, faster starts.
Should I commit .tokensaver/?
Yes. It's designed to be versioned alongside your code — the whole team's agents benefit from it.
What if it goes stale?
Refresh it. Two minutes after a session updates the changed files. Or ask your agent: "Check if the project context is still accurate."
- Examples: Next.js SaaS · React Native · AI Agent Framework
- Docs: Philosophy · Architecture · Best Practices
MIT © 2026
别再花 token 让 AI 重读你的仓库。
TokenSaver 把它压缩成一份小抄。
每次新会话,AI 都从零开始翻你的项目:package.json、路由、配置、docs、src/ 下面一堆文件……
第一次还行。
每次都这样,又慢又烧钱。
没有 TokenSaver → 每次都要大规模扫描一遍
使用 TokenSaver → 一次小小的可复用读取
TokenSaver 先读项目关键文件,然后生成:
TOKENSAVER.md— 一个简短入口,AI 优先读这里.tokensaver/— 一个轻量上下文目录,7 个 Markdown 文件
AI 读几个小文件就能了解项目全貌,不需要到处翻源码。只有在真正需要实现细节时,才打开对应文件。
TokenSaver 替代昂贵的全仓库扫描,不是在已有配置上额外加一层——它是捷径。
.tokensaver/ — 7 个轻量 Markdown 文件
| 文件 | 告诉 AI 什么 |
|---|---|
overview.md |
项目是什么,用什么技术栈 |
architecture.md |
系统怎么组合在一起 |
codebase-map.md |
带注释的目录树——东西都在哪 |
conventions.md |
命名、结构、代码风格 |
decisions.md |
关键架构决策及原因 |
gotchas.md |
已知坑点——别踩这些 |
session-handoff.md |
进行中的工作、下一步、阻塞点 |
TOKENSAVER.md — 统一入口,适配器会引导 AI 工具先读这里。
薄适配器 — 给会自动读取特定文件的工具使用:
| 适配器 | 适用工具 |
|---|---|
CLAUDE.md |
Claude Code 自动加载 |
AGENTS.md |
Codex、Copilot Coding Agent、Cline、Windsurf、Roo Code |
GEMINI.md |
Gemini CLI |
.cursor/rules/tokensaver.mdc |
Cursor |
.github/copilot-instructions.md |
VS Code Copilot |
修改用 <!-- tokensaver:start --> / <!-- tokensaver:end --> 包裹——你已有的配置不动分毫。
TokenSaver 从设计上就是工具无关的。TOKENSAVER.md 就是普通 Markdown。不同工具的衔接方式:
- 有自动加载机制的工具(Claude Code、Cursor、Codex…)→ 薄适配器
- 没有自动加载的工具 → 在第一个 prompt 里加一行
工具兼容性
| 工具 | 如何加载 TokenSaver |
|---|---|
| Claude Code | 一等 /tokensaver Skill + CLAUDE.md → TOKENSAVER.md |
| Cursor | .cursor/rules/tokensaver.mdc → TOKENSAVER.md |
| Codex / OpenAI | AGENTS.md → TOKENSAVER.md |
| GitHub Copilot Coding Agent | AGENTS.md → TOKENSAVER.md |
| Gemini CLI | GEMINI.md → TOKENSAVER.md |
| VS Code Copilot | .github/copilot-instructions.md → TOKENSAVER.md |
| Aider | 直接读取 TOKENSAVER.md |
| Windsurf | AGENTS.md → TOKENSAVER.md |
| Cline | AGENTS.md → TOKENSAVER.md |
| Roo Code | AGENTS.md → TOKENSAVER.md |
你只需要一个文件:SKILL.md。 一行命令,一个文件——安装完成。
Claude Code — 五秒安装
mkdir -p ~/.claude/skills/tokensaver && \
curl -sL https://raw.githubusercontent.com/thinkofuture/TokenSaver/main/SKILL.md \
-o ~/.claude/skills/tokensaver/SKILL.md搞定。在任意项目中运行:
/tokensaver
TokenSaver 先评估项目,创建 .tokensaver/ 和 TOKENSAVER.md,并在合适的位置加入薄适配器区块——大多数场景不需要手动粘贴 prompt。
薄适配器区块加在:
| 工具 | 适配器文件 |
|---|---|
| Claude Code | CLAUDE.md |
| Cursor | .cursor/rules/tokensaver.mdc |
| Codex、Copilot Coding Agent、Windsurf、Cline、Roo Code | AGENTS.md |
| Gemini CLI | GEMINI.md |
| VS Code Copilot | .github/copilot-instructions.md |
所有修改都用 <!-- tokensaver:start/end --> 包裹——你已有的配置不动分毫。
克隆完整仓库(查看文档、示例或参与开发)
git clone https://github.com/thinkofuture/TokenSaver.git适合想浏览示例、阅读设计哲学文档或提交 PR 的场景。
日常使用:
# 开始工作 — 适配器指向 TOKENSAVER.md
claude
# 会话结束 — 只刷新变化的部分
claude "Update project context with today's changes"只支持 Claude Code 吗?
不是。Claude Code 有一等 Skill 支持,但 .tokensaver/ 就是普通 Markdown。所有主流 AI 编码工具都有对应的薄适配器文件指向 TOKENSAVER.md——/tokensaver 一次全搞定。
会替代我的 README 或文档吗?
不会。TokenSaver 是给 AI 看的,不是给人看的。保留你的 README、wiki 和 API 文档——它们面向不同的读者。
这不是让 AI 读更多文件吗?
正相反。用几个小文件替代每次的盲目扫描——读得更少,启动更快。
.tokensaver/ 要提交到仓库吗?
要。它就是设计来跟着代码一起版本管理的——整个团队的 AI 都能受益。
内容过时了怎么办?
刷新一下。每次会话后花两分钟更新受影响的部分。或者让 AI 自查:"Check if the project context is still accurate."
- 示例:Next.js SaaS · React Native · AI Agent Framework
- 文档:设计哲学 · 系统架构 · 最佳实践
MIT © 2026
