Real-world use cases and example conversations showing how ClaudeMemory works in practice.
Scenario: Starting a new Rails project
You: "I'm starting a new Rails 7 project with PostgreSQL and deploying to Heroku"
Claude: "Great! Let me help you set up your Rails 7 project. I'll create the initial
structure with PostgreSQL configuration..."
[Claude helps with setup tasks]
On session stop, ClaudeMemory automatically extracts and stores:
- uses_framework: Rails 7 (project scope)
- uses_database: PostgreSQL (project scope)
- deployment_platform: Heroku (project scope)
No user action needed!
You: "Help me add a new User model"
Claude: "Based on my memory, you're using Rails 7 with PostgreSQL. I'll create a
migration for the users table..."
What happened:
- Claude called
memory.recallautomatically - Retrieved project facts about Rails and PostgreSQL
- Applied context to the current task
Scenario: Establishing personal coding conventions
You: "I always prefer 4-space indentation and descriptive variable names over
abbreviations"
Claude: "I'll remember that preference globally and apply it to all your projects."
Stored with scope: global:
- convention: "4-space indentation" (global)
- convention: "descriptive variable names over abbreviations" (global)
You: "Write a function to calculate the total price with tax"
Claude: "Here's a function with 4-space indentation and descriptive variable names:
def calculate_total_price_with_tax(subtotal, tax_rate)
tax_amount = subtotal * tax_rate
total = subtotal + tax_amount
total
end
"
What happened:
- Claude automatically recalled global conventions
- Applied 4-space indentation without being asked
- Used descriptive names (
subtotal,tax_rate,tax_amount,total)
Scenario: Recording and recalling design decisions
You: "We decided to use a microservices architecture for this app, with JWT
authentication and REST APIs"
Claude: "Got it. I'll record that architectural decision for future reference."
Stored as decisions:
- decision: "Use microservices architecture" (project scope)
- auth_method: "JWT" (project scope)
- decision: "REST APIs for service communication" (project scope)
You: "What were our architecture decisions for this project?"
Claude: [calls memory.decisions]
"Here are the architectural decisions I have on record:
1. **Architecture Pattern**: Microservices architecture
2. **Authentication**: JWT authentication
3. **API Style**: REST APIs for service communication
These decisions were made during the initial project planning."
What happened:
- Semantic shortcut
memory.decisionsprovides quick access - No need to manually construct search queries
- Pre-configured to find decision-related facts
Scenario: Working with sensitive credentials
You: "Our API endpoint is https://api.example.com with key <private>sk-abc123</private>
and secret <private>secret_xyz</private>"
Claude: "I'll configure the API client with those credentials..."
[Claude uses the credentials during the session to help set up API calls]
What gets stored:
"API endpoint is https://api.example.com with key and secret "
What does NOT get stored:
- ❌
sk-abc123 - ❌
secret_xyz
Privacy tags stripped at ingestion - zero chance of leaking in future queries.
You: "What's our API configuration?"
Claude: [calls memory.recall]
"According to my memory, your API endpoint is https://api.example.com.
You'll need to provide the key and secret again as I don't store sensitive credentials."
Scenario: Quick access to common information
You: "What coding conventions do I follow?"
Claude: [calls memory.conventions]
"Here are your coding conventions:
• 4-space indentation
• Descriptive variable names over abbreviations
• RSpec for testing (not Minitest)
• Standard Ruby for linting
• Prefer composition over inheritance"
What happened:
memory.conventionsis a semantic shortcut- Pre-configured to search for convention-related predicates
- Returns results instantly without manual query construction
You: "Remind me what frameworks we're using"
Claude: [calls memory.architecture]
"Your tech stack:
**Frontend:**
• Framework: React 18
• State Management: Redux Toolkit
• Styling: Tailwind CSS
**Backend:**
• Framework: Rails 7
• Database: PostgreSQL
• Deployment: Heroku"
You: "What architectural decisions have we made?"
Claude: [calls memory.decisions]
"Key architectural decisions:
1. Microservices architecture
2. JWT authentication
3. REST APIs for service communication
4. Event-driven updates with webhooks"
Scenario: Token-efficient memory searches
Claude: [calls memory.recall_index with query="database"]
# Returns lightweight index (~50 tokens per fact):
# - Fact ID: 42, Preview: "uses_database: PostgreSQL"
# - Fact ID: 78, Preview: "database_host: AWS RDS"
# - Fact ID: 103, Preview: "convention: Always use parameterized queries"
# - Fact ID: 145, Preview: "decision: Use connection pooling"
# - Fact ID: 189, Preview: "uses_database: Redis for caching"
Claude: "I found several facts about databases in your project:
• PostgreSQL as primary database
• AWS RDS for hosting
• Redis for caching
• Connection pooling enabled
• Parameterized queries convention
Would you like details on any specific item?"
You: "Tell me more about the PostgreSQL setup"
Claude: [calls memory.recall_details with fact_id=42]
# Returns full details with provenance:
# - Subject: repo
# - Predicate: uses_database
# - Object: PostgreSQL
# - Quote: "I'm starting a new Rails 7 project with PostgreSQL"
# - Source: Session abc-123, 2026-01-15
# - Superseded from: MySQL (Fact ID: 39)
# - Related: 3 other database facts
Claude: "You're using PostgreSQL as your primary database. This decision was made
on 2026-01-15 when starting the Rails 7 project. It replaced a previous
MySQL configuration."
Token Savings:
- Initial search: ~250 tokens (5 facts × 50 tokens)
- Without progressive disclosure: ~2,500 tokens (5 facts × 500 tokens)
- 10x reduction!
Scenario: Handling contradictory information
You: "We're using PostgreSQL for this project"
Claude: "Got it, storing that in memory."
Stored: uses_database: PostgreSQL
You: "Actually, we switched to MySQL for better compatibility"
Claude: "I'll update my memory to reflect that database change."
ClaudeMemory automatically:
- Creates new fact:
uses_database: MySQL - Marks old fact as superseded:
uses_database: PostgreSQL(superseded by Fact #78) - Maintains temporal validity:
- PostgreSQL valid from 2026-01-15 to 2026-01-20
- MySQL valid from 2026-01-20 onwards
You: "What database are we using?"
Claude: [calls memory.recall]
"You're currently using MySQL. You previously used PostgreSQL but switched
to MySQL on 2026-01-20 for better compatibility."
What happened:
- Truth maintenance handled supersession automatically
- No duplicates or conflicts
- Historical context preserved
- Current fact returned by default
Scenario: Sharing memory across team members (advanced)
Developer A: "We decided to use Stripe for payments and store webhooks in the
payment_events table"
Claude: [stores decision]
Developer B: "How do we handle payment webhooks?"
Claude: [recalls project facts]
"According to the project's memory, you're using Stripe for payments and storing
webhooks in the payment_events table."
How it works:
- Project-scoped facts stored in
.claude/memory.sqlite3 - Committed to git (optional)
- Shared across team members
- Provides consistency and context for everyone
Scenario: Migrating from one technology to another
Memory contains:
• uses_framework: React (class components)
• state_management: Redux
You: "We're migrating to React hooks and removing Redux in favor of Context API"
Claude: "I'll help with the migration and update my memory accordingly."
[Claude helps refactor components]
Memory now contains:
• uses_framework: React (hooks) [superseded React class components]
• state_management: Context API [superseded Redux]
Historical facts preserved with temporal validity:
• Redux valid from 2025-06-01 to 2026-01-22
• Context API valid from 2026-01-22 onwards
You: "What state management do we use?"
Claude: "You're using Context API for state management. You previously used Redux
but migrated to Context API on 2026-01-22."
- Be specific: "We're using PostgreSQL 14" is better than "We're using a database"
- State preferences clearly: "I always prefer X" signals global scope
- Use privacy tags:
<private>sensitive-data</private>for secrets - Review decisions: Periodically ask "What do you remember about this project?"
- Don't repeat facts: ClaudeMemory handles duplicates automatically
- Don't worry about formatting: Natural conversation works best
- Don't manually manage memory: Let Claude handle extraction
- Don't store temporary info: Only durable facts are worth remembering