Cursor Memories is an open source project hosted on GitHub that aims to provide persistent contextual memory for the AI code editor Cursor. It helps AI assistants retain project information across sessions through structured document files, solving the problem of AI forgetting context after each session. Users can manage project background, technical details, and progress in a simple Markdown file, allowing AI to quickly recover context and improve development efficiency. The project is maintained by community developer carlxrosales and is suitable for developers who need long-term project management.
Function List
- persistent context memory: Storing project information in Markdown files ensures that AI reads and restores context at the start of each session.
- Structured Document Management: Support for multiple document types, such as project briefs, technical contexts, and progress notes, is clearly organized.
- Custom Mode Support: Combined with Cursor's customizable schema, it provides workflows for the planning, implementation, and reflection phases.
- Efficient token optimization: Adopting a hierarchical loading rule that loads only the necessary documents to reduce token consumption for AI processing.
- Cross-session collaboration: Improve AI collaboration by maintaining consistency across development phases with Memory Bank files.
- Open Source Community Support: The project code is publicly available, allowing users to contribute and customize features.
Using Help
Installation process
- clone warehouse
Run the following command in the terminal to clone the Cursor Memories project locally:git clone https://github.com/carlxrosales/cursor-memories.git
Once the cloning is complete, go to the project directory:
cd cursor-memories
- Copying configuration files
Project contains.cursor
cap (a poem)custom_modes
folder. Copy it to the root directory of your Cursor project:cp -r .cursor /path/to/your/project cp -r custom_modes /path/to/your/project
Note: Other documents (e.g., instruction files) may optionally be copied to the
memory_bank_documents
folder for reference but not required. - Configuring customized modes
Create custom modes manually in the Cursor Editor:- Open Cursor and click on the Mode Selector in the Chat panel.
- Create the following pattern (it is recommended to use the corresponding emoji to enhance recognition):
- 🔍 VAN (vision analysis)
- 📋 PLAN (planning)
- 🎨 CREATIVE
- ⚒️ IMPLEMENT (Implementation)
- 📝 REFLECT (Reflect)
- 🗄️ ARCHIVE
- In each mode, paste
custom_modes
The contents of the instructions for the corresponding file in the folder. For example, it would be a good idea to set thevan_instructions.md
to paste the contents of the customized command input box into the VAN mode. - Select one of the icons provided by Cursor to save the settings.
- Initialize Memory Bank
Run the following command in the project root directory to initialize the Memory Bank:npx cursor-bank init
This will create the
memory_bank
folder containing the necessary Markdown files, such as theprojectbrief.md
,techContext.md
cap (a poem)progress.md
The
Usage
Core Function Operation
- Read Memory Bank
In the Cursor chat panel, enter commands:follow your custom instructions
The Cursor automatically reads the
memory_bank
Markdown file in the folder to restore the project context. It is recommended to run this command at the beginning of each new session. - Update Memory Bank
Entered upon completion of a major development phase or project update:update memory bank
Cursor will review and update
memory_bank
Files in the folder, e.g. updateprogress.md
Latest developments or modifications intechContext.md
Information about the technology stack in the - Planning model (PLAN)
Go into planning mode:/plan
Cursor analyzes existing code and Memory Bank files and asks 4-6 clarifying questions. For example: "How would you like to prioritize new features?" or "Do you need to adjust the existing API structure? or "Do you need to adjust the existing API structure?" Once the user has answered, Cursor creates a detailed plan to be implemented once the user has confirmed.
- Implementation modalities (IMPLEMENT)
After the planning is confirmed, it enters implementation mode where Cursor generates code or modifies files according to the plan. Upon completion, it reports on the status of completion and lists the next steps.
Detailed Operation Procedure
- Launch of new projects
- (of a computer) run
npx cursor-bank init
Creates the Memory Bank structure. - compiler
projectbrief.md
, fill in the project objectives and background. Example:# Project Brief 项目名称:在线任务管理工具 目标:开发一个支持多人协作的任务管理 Web 应用 技术栈:React, Node.js, MongoDB
- exist
techContext.md
Document technical details, such as the API structure or framework version, in the
- (of a computer) run
- Daily Development
- At the beginning of each session, type
follow your custom instructions
The - Select the mode according to the development phase. For example, use CREATIVE mode to generate a draft UI design, or IMPLEMENT mode to write back-end code.
- regular update
progress.md
If the user has not completed the API, you can record the milestone of completion, such as "Completion of User Authentication API".
- At the beginning of each session, type
- Optimize context management
- Use the Hierarchical Rule Loading feature to load only documents relevant to the current task. For example, PLAN mode loads only
projectbrief.md
cap (a poem)techContext.md
The - In complex projects, adding
activeContext.md
Record the current work status, e.g. "Payment module under development".
- Use the Hierarchical Rule Loading feature to load only documents relevant to the current task. For example, PLAN mode loads only
Featured Function Operation
- Charting Workflows
Cursor Memories supports graphical workflows, where schemas are connected in a logical order (VAN → PLAN → CREATIVE → IMPLEMENT). The user can create a diagrammatic workflow in theprogress.md
Mid record mode switching. Example:# Progress 2025-07-20: 完成 PLAN 阶段,进入 CREATIVE 模式设计 UI。
In the Cursor, type
follow your custom instructions
The AI will adjust its behavior based on the record. - Sharing memories across modalities
Memory Bank files are shared between modes. For example, requirements recorded in PLAN mode automatically influence code suggestions in IMPLEMENT mode. The user does not need to re-enter the context. - QA Functions
In any mode, call the built-in QA function to verify the code. Example:Run QA on auth module
Cursor checks for code consistency and reports potential problems.
caveat
- assure
memory_bank
Markdown files in the folder are clear and accurate, and the effectiveness of AI depends on the quality of the document. - Back up Memory Bank files regularly to prevent accidental loss.
- If the project is complex, it is recommended that it be broken down
techContext.md
for multiple files, such asapiContext.md
cap (a poem)uiContext.md
The
application scenario
- Long-term project development
Developers use Cursor Memories to keep AI context consistent in large projects that span multiple sessions. For example, when developing a web application, AI remembers the technology stack and API design to avoid duplicating instructions. - Teamwork
Team members share Memory Bank files to ensure that the AI has a consistent understanding of the project context. A documented Memory Bank also serves as a project record, making it easy for new team members to get up to speed quickly. - Rapid Prototyping
In CREATIVE mode, designers or developers quickly generate UI drafts or functional prototypes, and Memory Bank records design decisions for subsequent IMPLEMENT mode.
QA
- Does the Memory Bank folder need to be created manually?
Not required. Runnpx cursor-bank init
will automatically creatememory_bank
folder and the necessary files. If created manually, ensure that the file structure is consistent with the project template. - How do you deal with context loss?
At the beginning of each session typefollow your custom instructions
If the Memory Bank file is missing, make sure that the Cursor reads the Memory Bank file. If it is still missing, check the.cursor/rules
The configuration path in the - Are other AI tools supported?
Yes, Memory Bank is a generalized document management method that works with any AI assistant that supports Markdown file reading, subject to adjusting the command format. - How to optimize token consumption?
Use the layered loading feature to load only the files relevant to the current task. Avoid loading files in theactiveContext.md
Store sensitive or lengthy information in the