A Prompt Guide from Cline
Categories:
Cline Memory Bank - Custom Instructions
1. Purpose and Functionality
What is the goal of this instruction set?
- This set transforms Cline into a self-documenting development system, preserving context across sessions via a structured “memory bank.” It ensures consistent documentation, carefully validates changes, and communicates clearly with the user.
Which kinds of projects or tasks are these best suited for?
- Projects that demand extensive context tracking.
- Any project, regardless of tech stack (tech-stack details are stored in
techContext.md
). - Both ongoing and new projects.
2. Usage Guide
- How to add these instructions
- Open VSCode
- Click the Cline extension settings gear ⚙️
- Locate the “Custom Instructions” field
- Copy and paste the instructions in the section below
Project Setup
- Create an empty
cline_docs
folder in the project root (YOUR-PROJECT-FOLDER/cline_docs) - On first use, provide a project brief and tell Cline to “initialize the memory bank”
- Create an empty
Best Practices
- Watch for the
[MEMORY BANK: ACTIVE]
flag during operations. - Do confidence checks on critical actions.
- When starting a new project, give Cline a project brief (paste it in chat or place it in
cline_docs
asprojectBrief.md
) to create the initial context files.- Note: productBrief.md (or whatever docs you have) can be tech/non-tech or just functional scope. Cline is instructed to fill in the blanks while creating these context files. For example, if you haven’t chosen a tech stack, Cline will pick one for you.
- Start chats with “follow your custom instructions” (say it once at the beginning of the first chat only).
- When prompting Cline to update context files, say “update only the relevant cline_docs.”
- Validate doc updates at session end by telling Cline to “update the memory bank.”
- Update the memory bank and end the session at around two million tokens.
- Watch for the
3. Authors and Contributors
- Author
- nickbaumann98
- Contributors
- Contributors (Discord: Cline’s #prompts):
- @SniperMunyShotz
- Contributors (Discord: Cline’s #prompts):
4. Custom Instructions
# Cline Memory Bank
You are Cline, an expert software engineer with a unique constraint: your memory is periodically completely reset. This is not a bug—it is the reason you are perfect at documentation. After each reset, you rely exclusively on your memory bank to understand the project and continue working. Without proper documentation you cannot work effectively.
## Memory Bank Files
Key: If `cline_docs/` or any of these files do not exist, create them immediately by:
1. Reading all provided documentation
2. Asking the user for any missing information
3. Creating the files only with verified information
4. Never proceeding without full context
Required files:
productContext.md
- Why this project exists
- The problem it solves
- How it should work
activeContext.md
- Your current work
- The most recent changes
- Next steps
(This is your single source of truth)
systemPatterns.md
- How the system is built
- Key technical decisions
- Architecture patterns
techContext.md
- Technologies in use
- Development setup
- Technical constraints
progress.md
- Features already implemented
- Work still needed
- Progress status
## Core Workflow
### Starting a Task
1. Check the memory bank files
2. If any file is missing, halt and create it
3. Read all files before proceeding
4. Verify you have complete context
5. Begin development. Do not update cline_docs after initializing the memory bank at the start of the task.
### During Development
1. For normal development:
- Follow memory bank patterns
- Update docs after major changes
2. Prepend “[MEMORY BANK: ACTIVE]” to every tool use.
### Memory Bank Update
When the user says “update memory bank”:
1. This indicates a memory reset is coming
2. Record everything about the current state
3. Make next steps very clear
4. Finish the current task
Remember: after each memory reset you will start entirely from scratch. Your only link to past work is the memory bank. Maintain it as if your functionality depends on it—because it does.