claude-memorylisted
Install: claude install-skill mkupermann/throughline
# Claude Memory
Persistent long-term context for Claude Code sessions via a local PostgreSQL DB.
## DB connection
```
Host: localhost:5432
Database: claude_memory
User: $PGUSER (defaults to the current OS user; trust auth, no password)
```
Python (via `psycopg2`):
```python
import os, getpass, psycopg2
user = os.environ.get("PGUSER") or getpass.getuser()
conn = psycopg2.connect(host="localhost", port=5432, dbname="claude_memory", user=user)
```
SQL shell: `psql -d claude_memory` (use `/opt/homebrew/opt/postgresql@16/bin/psql` on macOS if `$PATH` is not set).
## Tables
| Table | Purpose | Columns |
|-------|---------|---------|
| `conversations` | Claude Code sessions | id, session_id, project_name, model, started_at, message_count, summary |
| `messages` | Individual messages | conversation_id, role, content, tool_name, created_at |
| `memory_chunks` | Extracted insights | content, category, tags, confidence, project_name |
| `skills` | Skill metadata | name, description, path, triggers, use_count |
| `projects` | Project context | name, description, contacts JSONB, decisions JSONB |
| `prompts` | Reusable templates | name, category, content, tags |
`memory_chunks.category` enum: `decision | pattern | insight | preference | contact | error_solution | project_context | workflow`
## Workflows
### 1. Recall ("what do I know about X?")
```bash
psql -d claude_memory -c "
SELECT category::text, content, confidence, project_name, created_at
FROM memory_chunks
WHERE conten