Save Conversation Context - Universal Prompt

📋 How to Use

When you want to save the current conversation context, simply copy the prompt below and send it to Claude:


🔖 Prompt (Copy & Use Directly)

  1. Please analyze our current conversation history and generate a complete "Conversation Context Document" for quickly restoring context in new conversations.
  2. Document Requirements:
  3. 1. Automatically extract problem background, core issues, objectives, and constraints
  4. 2. Record attempted solutions (successful/failed)
  5. 3. Record current progress and status
  6. 4. Record key code changes and files
  7. 5. List unresolved issues and next steps
  8. 6. Include usage instructions and important notes
  9. Document Structure Reference:
  10. - 📋 Problem Background (project info, current state, involved components)
  11. - 🔴 Core Problem (symptoms, root cause analysis, specific data)
  12. - 🎯 Implementation Goals (main objectives, specific requirements, constraints)
  13. - 🔧 Technical Constraints (principles to follow, technical limitations, key files)
  14. - 🚫 Attempted Solutions (failed approaches and reasons)
  15. - Current/Final Solution (design approach, core mechanisms, key code)
  16. - 📝 Key Code Changes (modified files, change details, code statistics)
  17. - 🎯 Current Progress (completed, in-progress, pending)
  18. - 💡 Usage Guide (configuration steps, example code, important notes)
  19. - 🐛 Known Issues and Pending Items
  20. - 🚀 Next Steps
  21. - 📝 Notes (development insights, lessons learned, references)
  22. Please save the document as: conversation-context-[auto-identify-topic]-[current-status].md
  23. After generating the document, please tell me:
  24. 1. The document save path
  25. 2. How to use this document in new conversations
  26. 3. A summary of the core content

📖 Prompt Explanation

This Prompt Will Make Claude Automatically:

  1. Analyze conversation history - Extract all key information
  2. Identify problem type - Automatically determine if it’s bug fix, feature development, performance optimization, etc.
  3. Extract technical details - Code changes, file paths, configuration parameters, etc.
  4. Record progress status - Completed, in-progress, pending
  5. Generate structured document - Using unified format
  6. Auto-name file - Based on problem topic and status

Applicable Scenarios:

  • ✅ Complex problems requiring multiple conversation rounds
  • ✅ Need to pause conversation and continue later
  • ✅ Want to save solutions as knowledge base
  • ✅ Need to share context with team members
  • ✅ Conversation approaching length limit

🚀 Usage Examples

Scenario 1: Mid-conversation, need to pause

  1. You: We're solving the login functionality issue...
  2. [Conversation continues for 10 rounds]
  3. You: [Copy & paste the universal prompt]
  4. Claude:
  5. ✅ Generated document: conversation-context-login-optimization-in-progress.md
  6. 📍 Location: /path/to/conversation-context-login-optimization-in-progress.md
  7. Core Content Summary:
  8. - Issue: Login token expiration time too short
  9. - Attempted: Solution 1 (failed), Solution 2 (partially successful)
  10. - Current Progress: Implementing Solution 3 (JWT + Refresh Token)
  11. - Next Steps: Test refresh token logic
  12. For next conversation:
  13. 1. Start new conversation
  14. 2. Send: "Please read conversation-context-login-optimization-in-progress.md and continue helping me with the login issue"
  15. 3. I'll immediately restore context and continue

Scenario 2: Problem solved, save as knowledge base

  1. You: [Copy & paste the universal prompt]
  2. Claude:
  3. Generated document: conversation-context-viewpager-height-adaptation-resolved.md
  4. 📍 Location: /path/to/conversation-context-viewpager-height-adaptation-resolved.md
  5. This document can serve as:
  6. - Part of team knowledge base
  7. - Reference solution for similar problems
  8. - Learning material for new team members

🎯 How to Use Generated Document in Next Conversation

Method 1: Direct Reference (Recommended)

  1. New conversation starts:
  2. You: Please read conversation-context-XXX-in-progress.md and let's continue solving this problem.
  3. The new situation is: [describe new changes]

Method 2: Paste Document Content

  1. New conversation starts:
  2. You: I previously encountered a problem. Here's the context:
  3. [Paste document content]
  4. Now I want to continue with the XXX part.

Method 3: Combine with New Problem

  1. New conversation starts:
  2. You: Please read conversation-context-XXX-resolved.md. I'm now facing a similar problem, but with some differences:
  3. [Describe new problem]

💡 Advanced Usage

Merge Multiple Conversation Contexts

  1. You: I have two related problems:
  2. 1. conversation-context-login-functionality-resolved.md
  3. 2. conversation-context-permission-management-in-progress.md
  4. Please analyze the relationship between these two problems and continue solving the permission management issue.

Update Existing Context Document

  1. You: Please update conversation-context-XXX-in-progress.md with our newly discussed solution and update the progress status.

📋 Document Naming Convention

Generated documents will automatically follow this naming convention:

  1. conversation-context-[topic]-[status].md
  2. Status Indicators:
  3. - in-progress: Problem still being solved
  4. - resolved: Problem completely solved
  5. - pending-verification: Solution ready, awaiting testing
  6. - paused: Temporarily shelved, to continue later
  7. - abandoned: Approach not viable, abandoning this direction
  8. Examples:
  9. conversation-context-viewpager-height-adaptation-resolved.md
  10. 🔄 conversation-context-login-optimization-in-progress.md
  11. conversation-context-payment-flow-refactor-pending-verification.md
  12. ⏸️ conversation-context-performance-optimization-paused.md
  13. conversation-context-legacy-migration-abandoned.md

⚙️ Customization Options

If you need specific document format, add to the prompt:

  1. Please generate conversation context document with additional requirements:
  2. - Include detailed code examples
  3. - Include performance test data
  4. - Include UI screenshots
  5. - Focus on [specific aspect]

🎁 Bonus: Quick Command Version

If you find the full prompt too long, use the simplified version:

Simplified Prompt

  1. /save-context
  2. (Please analyze current conversation and generate structured context document for quick restoration in new conversations.)

> Note: Simplified version may miss some details. Recommend using full version for first time.


📝 Best Practices

✅ Recommended Practices

  1. Save regularly - Save once every 10-15 conversation rounds
  2. Update timely - Update document when problem status changes
  3. Organize by category - Organize documents by project/module
  4. Version control - Add important documents to Git

❌ Practices to Avoid

  1. ❌ Wait until conversation ends to save (may miss details)
  2. ❌ Random document naming (hard to find)
  3. ❌ Never update status (don’t know what’s solved)
  4. ❌ Use one document for all problems (messy)

🔄 Complete Workflow

  1. 1. Start new problem
  2. 2. Conversation in progress (10-15 rounds)
  3. 3. [Use universal prompt] Save context
  4. 4. Get document: conversation-context-XXX-in-progress.md
  5. 5. [Need to pause]
  6. 6. New conversation: "Please read conversation-context-XXX-in-progress.md and continue..."
  7. 7. Problem solved
  8. 8. [Use universal prompt] Update document status to "resolved"
  9. 9. Archive to knowledge base

📚 Example Library

Common problem types document examples:

  1. conversation-context-viewpager-height-adaptation-resolved.md
  2. conversation-context-database-migration-solution-resolved.md
  3. 🔄 conversation-context-network-request-optimization-in-progress.md
  4. 🔄 conversation-context-ui-adaptation-issues-in-progress.md
  5. conversation-context-new-architecture-evaluation-pending-verification.md

💬 FAQ

Q: Will the document include all conversation content? A: No. Only key information (problems, solutions, code, progress) will be extracted, filtering out irrelevant discussions.

Q: What if document is too long? A: Claude will automatically compress, keeping core content. If still too long, you can request a “simplified version”.

Q: Can I modify the document structure? A: Yes! Specify your desired structure in the prompt.

Q: Can multiple problems be merged? A: Yes! Tell Claude “Please merge XXX.md and YYY.md to generate new context document”.

Q: Where is the document saved? A: By default in current working directory. You can specify path in prompt.


🎯 Advantages of This Prompt

Compared to manual organization:

Manual Organization Using Prompt
❌ Need to extract key info yourself ✅ Automatic analysis & extraction
❌ May miss important details ✅ Comprehensive coverage
❌ Inconsistent format ✅ Unified structured format
❌ Takes 10-20 minutes ✅ Complete in 30 seconds
❌ Need to remember all attempts ✅ Auto-record all solutions

📝 Real Effect Demonstration

Before (Traditional Way):

  1. New conversation:
  2. You: "I previously solved a ViewPager problem, but forgot how I did it..."
  3. Me: "Can you describe it in detail?"
  4. You: "Um... it was a height issue... page 2 had blank space..."
  5. Me: "What caused it?"
  6. You: "Something about preloading... I forgot..."
  7. [Repeated questioning, wasting 10 rounds]

After (With Context Document):

  1. New conversation:
  2. You: "Please read conversation-context-viewpager-height-adaptation-resolved.md"
  3. Me: "Got it. I see:
  4. - Problem: Page 2 has 827px blank space at bottom
  5. - Cause: Preloading mechanism takes max height
  6. - Solution: Fully automated WrapContentHeightViewPager
  7. - Status: Completely resolved
  8. Any new requirements now?"
  9. You: "I want to copy this component to another project"
  10. Me: "You can copy directly! Steps are..."
  11. [Immediately on topic, saving time]

🎉 Ready to Use Now!

For next conversation:

  1. Copy universal prompt
  2. Send to me
  3. I’ll automatically generate document
  4. Save document for backup
  5. Provide document link in new conversation

This allows you to:

  • ✅ Pause and resume conversations anytime
  • ✅ Maintain context across multiple conversations
  • ✅ Accumulate project knowledge base
  • ✅ Share solutions with team

🌍 Language Support

This prompt works in any language. Claude will:

  • Analyze conversation in original language
  • Generate document in same language as conversation
  • Or specify language: “Please generate in [English/Chinese/Japanese/etc.]”

🔧 Template Customization

You can customize the prompt for specific needs:

For Code-Heavy Projects

  1. [Add to prompt]
  2. Additional focus:
  3. - Include complete code snippets with line numbers
  4. - Record all file paths and directory structure
  5. - Include dependency versions and package info

For UI/UX Projects

  1. [Add to prompt]
  2. Additional focus:
  3. - Include design decisions and rationale
  4. - Record color codes, spacing, font sizes
  5. - Include before/after screenshots if discussed

For Architecture Decisions

  1. [Add to prompt]
  2. Additional focus:
  3. - Record all considered approaches and trade-offs
  4. - Include decision matrix or comparison table
  5. - Document stakeholder concerns and responses

📖 Quick Reference Card

Save Context:

  1. [Copy universal prompt] Send

Restore Context:

  1. "Please read [filename].md and continue..."

Update Status:

  1. "Please update [filename].md, status changed to resolved"

Merge Contexts:

  1. "Please merge [file1].md and [file2].md"

Created: 2025-11-17 Version: v1.0 For: Claude Code / Claude - Any Conversation Scenario Language: English (中文版本: 保存对话上下文-通用Prompt.md)