Claude Chat Logger & Project Memory

A VSCode extension that logs Claude Code AI chat sessions and maintains project memory to prevent Claude from creating duplicate tables, pages, services, or other elements that already exist in your project.
Publisher: skanderturki | skanderturki@gmail.com
The Problem This Solves
When Claude Code's context gets compacted (summarized), it loses important project knowledge like:
- Database schema and table structures
- Existing pages and routes
- Backend services and API endpoints
- Coding conventions and patterns
This leads to Claude suggesting or creating things that already exist in your project.
The Solution: Project Memory
This extension maintains a persistent project memory file (.claude/project-memory.json) that stores:
- All database tables and their columns
- All pages/routes in your application
- All services and their endpoints
- Important notes and conventions
This memory is automatically injected into your prompts when relevant, giving Claude visibility into your existing project structure.
Features
Chat History Logging
- Automatically logs all conversations with Claude Code
- Timestamps and session tracking
- Markdown format for easy reading and searching
- Persistent across sessions
Project Memory
- Auto-scan: Automatically detects database models, routes, and services
- Smart context injection: Only injects relevant context based on your prompt keywords
- Manual entry: Add tables, pages, services, and notes manually
- Persistent: Survives context compaction and session restarts
Supported Frameworks
- Frontend: Angular, React, Vue, Next.js
- Backend: Express, Node.js, NestJS
- Database: Sequelize, TypeORM, Prisma, Mongoose
Installation
From VSIX File
Download or build the extension:
cd claude-chat-logger-extension
npm install
npm run compile
npm run package
Install in VSCode:
- Press
Ctrl+Shift+P (or Cmd+Shift+P on Mac)
- Type "Extensions: Install from VSIX"
- Select
claude-chat-logger-2.0.0.vsix
From Source (Development)
- Clone and open the extension folder in VSCode
- Run
npm install
- Press
F5 to launch Extension Development Host
Quick Start
- Setup:
Ctrl+Shift+P → "Claude: Setup Chat Logging & Project Memory"
- Scan: Click "Scan Project Now" to auto-detect existing structures
- Restart: Restart Claude Code for hooks to activate
- Use: Start chatting - context will be automatically injected!
Commands
| Command |
Description |
| Claude: Setup Chat Logging & Project Memory |
Initialize logging and memory for your project |
| Claude: Scan Project (Update Memory) |
Auto-detect tables, pages, and services |
| Claude: View Project Memory |
Open the project-memory.json file |
| Claude: Edit Project Memory |
Edit the memory file directly |
| Claude: Add Note to Project Memory |
Add a custom note or convention |
| Claude: Add Database Table to Memory |
Manually add a database table |
| Claude: Add Page/Route to Memory |
Manually add a page or route |
| Claude: Add Service to Memory |
Manually add a service |
| Claude: View Chat History |
Open the conversation log |
| Claude: Clear Chat History |
Clear all logged conversations |
| Claude: Clear Project Memory |
Reset the project memory |
| Claude: Disable Logging |
Disable the logging hooks |
How Context Injection Works
When you send a prompt like:
"Add a new users table with email and password"
The hook detects database-related keywords and automatically injects:
---
**PROJECT MEMORY CONTEXT** (Auto-injected to prevent duplicates)
### Existing Database Tables:
- **users**: id, name, email, created_at +2 more
- **bookings**: id, user_id, trip_id, status
- **trips**: id, name, destination, price
### Important Notes:
- All tables use UUID primary keys
- Timestamps are auto-managed by Sequelize
---
Now Claude knows the users table already exists and can suggest modifications instead of creating a duplicate.
Important: Context is NOT Sent with Every Prompt
The project memory is NOT automatically included in every prompt. This keeps your prompts lightweight and avoids unnecessary token usage.
Instead, the extension uses smart detection to determine when context is relevant:
| Your Prompt |
Context Injected? |
Reason |
| "Add a new column to the users table" |
✅ Yes (database) |
Contains "column", "table" keywords |
| "Fix the CSS on the login page" |
❌ No |
No database/service keywords |
| "Create a new booking API endpoint" |
✅ Yes (services) |
Contains "API", "endpoint" keywords |
| "Update the README file" |
❌ No |
No relevant keywords |
| "What tables exist in the project?" |
✅ Yes (full) |
Contains "exist" keyword |
This ensures Claude only receives project context when it's actually needed for the task at hand.
Context Injection Levels
Configure via Settings (claudeChatLogger.memoryContextLevel):
| Level |
Behavior |
none |
No context injection |
minimal |
Just stats: "Project has 5 tables, 12 pages, 8 services" |
smart (default) |
Injects relevant context based on prompt keywords |
full |
Always injects complete project memory |
Smart Detection Keywords
| Category |
Trigger Keywords |
| Database |
database, table, column, schema, model, entity, migration, sql, query, field |
| Pages |
page, component, view, route, screen, template, layout, ui, form |
| Services |
service, api, endpoint, controller, backend, http, request |
| Full Context |
create new, add new, implement, build, what exist, existing |
Adding to Memory Manually
For elements the scanner can't auto-detect:
Add a Note
Ctrl+Shift+P → "Claude: Add Note to Project Memory"
Enter: "All API endpoints return { success: boolean, data: any, message: string }"
Add a Database Table
Ctrl+Shift+P → "Claude: Add Database Table to Memory"
Table name: users
Columns: id:UUID, email:VARCHAR, password:VARCHAR, role:ENUM, created_at:DATETIME
Ctrl+Shift+P → "Claude: Add Page/Route to Memory"
Path: /users/profile
Name: User Profile
Add a Service
Ctrl+Shift+P → "Claude: Add Service to Memory"
Name: AuthService
Type: auth
Project Memory Structure
The memory is stored in .claude/project-memory.json:
{
"projectName": "my-app",
"projectType": "angular",
"lastUpdated": "2025-12-06T10:30:00.000Z",
"database": {
"tables": [
{
"name": "users",
"columns": [
{ "name": "id", "type": "INT", "nullable": false },
{ "name": "email", "type": "VARCHAR", "nullable": false },
{ "name": "password", "type": "VARCHAR", "nullable": false }
],
"filePath": "models/users.js"
}
],
"relationships": [],
"lastUpdated": "2025-12-06T10:30:00.000Z"
},
"pages": [
{
"path": "/dashboard",
"name": "Dashboard",
"component": "DashboardComponent",
"filePath": "src/app/dashboard/dashboard-routing.module.ts"
}
],
"services": [
{
"name": "UserService",
"type": "api",
"filePath": "src/services/user.service.ts",
"endpoints": [
{ "method": "GET", "path": "/api/users" },
{ "method": "POST", "path": "/api/users" }
]
}
],
"notes": [
"All API responses use { success, data, message } format",
"Authentication uses JWT tokens stored in localStorage"
],
"conventions": [],
"libraries": [],
"stats": {
"totalTables": 5,
"totalPages": 12,
"totalServices": 8,
"totalEndpoints": 24
}
}
Extension Settings
| Setting |
Type |
Default |
Description |
claudeChatLogger.autoSetup |
boolean |
true |
Auto-setup when opening a new workspace |
claudeChatLogger.logDirectory |
string |
claude-chat-logs |
Directory for storing chat logs |
claudeChatLogger.addToGitignore |
boolean |
true |
Auto-add logs to .gitignore |
claudeChatLogger.enableMemoryContext |
boolean |
true |
Enable context injection into prompts |
claudeChatLogger.memoryContextLevel |
string |
smart |
Context level: none, minimal, smart, full |
claudeChatLogger.autoScanOnSetup |
boolean |
true |
Auto-scan project during setup |
Files Created
your-project/
├── .claude/
│ ├── settings.json # Claude Code hook configuration
│ ├── chat-logger-config.json # Extension configuration
│ ├── project-memory.json # Project memory (THE KEY FILE)
│ └── hooks/
│ ├── prompt-logger.js # Logs prompts + injects context
│ ├── response-logger.js # Logs Claude responses
│ └── project-memory.js # Memory management utilities
└── claude-chat-logs/
└── conversation-history.md # Full chat history in Markdown
Best Practices
- Run "Scan Project" regularly after adding new tables, pages, or services
- Add notes for patterns and conventions that can't be auto-detected
- Edit project-memory.json directly for complex or bulk changes
- Use "full" context level for new projects until you're confident in the memory
- Review injected context occasionally to ensure accuracy
Troubleshooting
Hooks not triggering?
- Make sure you restarted Claude Code after setup
- Check that
.claude/settings.json exists in your project
- Verify Node.js is installed and accessible
Context not being injected?
- Run "Claude: Scan Project" to populate the memory
- Check
claudeChatLogger.enableMemoryContext is true
- Verify
claudeChatLogger.memoryContextLevel is not set to none
Scanner not detecting models/routes?
- The scanner looks in common directories (models/, src/models/, etc.)
- Use manual entry commands to add elements in non-standard locations
- Edit
project-memory.json directly for complex structures
Requirements
- VSCode 1.85.0 or higher
- Node.js (for running hook scripts)
- Claude Code extension
License
This extension is licensed under a Commercial License.
Copyright © 2025 skanderturki. All rights reserved.
For licensing inquiries, please contact: skanderturki@gmail.com
Support
For issues, feature requests, or support, please contact:
Email: skanderturki@gmail.com
Changelog
v2.0.1
- Improved documentation with detailed context injection examples
- Clarified that project memory is NOT sent with every prompt
- Added smart detection keyword reference table
v2.0.0
- Added Project Memory feature
- Smart context injection based on prompt analysis
- Auto-scanning for database models, routes, and services
- Manual entry commands for tables, pages, services, and notes
- Configurable context levels (none, minimal, smart, full)
v1.0.0
- Initial release
- Chat history logging
- Basic hook setup