بنقرة واحدة
بنقرة واحدة
| name | cache-codebase |
| description | Caches a codebase to reduce token usage |
Reduce token usage by reading off a minimized version of a given codebase.
This is to be used for browsing the codebase. When a file needs to be modified, do not read the cache. Read the file directly instead. When a file is updated, the cache should be updated (if necessary).
The cache should be stored on disk in the codebase itself as an exact replica of the codebase, stored in the folder .cached-codebase in the root directory. Every relevant file (see next) in the codebase should be cached as a markdown file with a short description, which is described further in this document.
DO NOT cache files and files in folders such as:
node_modules/.gitignoreThe .cached-codebase folder may be in .gitignore - this is ok.
Given the following codebase:
.
├── ui.js
└── lib/
├── formatter.js
└── renderer.ts
The codebase should look like this after being cached:
.
├── ui.js
├── lib/
│ ├── formatter.js
│ └── renderer.ts
└── .cached-codebase/
├── ui.md
└── lib/
├── formatter.md
└── renderer.md
This is the template that should be used for caching a file.
---
last-cached: Mon Apr 13 10:50:58 EDT 2026
description: A one sentence summary of the file. Include the purpose of the file and what it does.
quirks: Weird things about this file - functionality that isn't standard, anything that would affect development if it wasn't mentioned. Keep this to a maximum of two sentences
linked-to: Does this file use any special or weird imports? Is it used in any odd files?
---
last-cached: should be retrieved with the date command.description: a general description of the file. If this file is a standard file, denote it as such (ex. actions.ts or page.tsx). Include any notable/exported functionsquirks: weird things about this file that weren't included in the descriptionlinked-to: weird imports that the file uses, and weird exports that the file has. For example, ShadCN, Lucide, and imports from lib do not count as weird imports. Imports such as dnd-kit or other not-widely used imports do count as weird imports.When a file needs to be read, first check the cache. Interpret the markdown file, then modify the file if needed.
The entire goal of this cache is to minimize the amount of tokens that need to spent reading unnecessary files.
If you need to understand a certain part of the code, you may read the real file.
Avoid the cache when:
Use the cache when:
Updating the cache should look like this: