--- id: 30537b21-e088-483f-8327-bcd42eeaa3fb type: solution title: "Cognitive memory skill reorganization: self-contained directory structure" tags: [cognitive-memory, claude-code, architecture, reorganization] importance: 0.8 confidence: 0.8 created: "2026-02-19T22:03:07.335083+00:00" updated: "2026-02-28T22:11:00.197626+00:00" relations: - target: 89f32ef3-2d87-4b8c-aa6e-ce5a7f60566c type: RELATED_TO direction: incoming strength: 0.7 edge_id: 82a79f99-a136-4aa0-b3cf-d0834fe17446 - target: a41644f1-2dd1-4706-8fc8-e2242c1702cb type: FOLLOWS direction: incoming strength: 0.9 edge_id: acfde6d2-2c05-4e45-8597-cd869f3fb3e7 --- Reorganized the cognitive-memory skill from scattered files across 4 locations into a self-contained directory structure: **Before:** Components in `~/.claude/scripts/session-memory/`, `~/.local/bin/`, `~/.config/systemd/user/`, and skill root. **After:** ``` ~/.claude/skills/cognitive-memory/ ├── client.py, mcp_server.py # Core (unchanged location) ├── scripts/ │ ├── session_memory.py # SessionEnd hook (moved from ~/.claude/scripts/session-memory/) │ └── ensure-symlinks.sh # MEMORY.md symlink refresher (moved from ~/.local/bin/) ├── systemd/ │ ├── README.md # Install instructions │ └── 6 unit files # Reference copies of timers/services └── dev/ ├── PROJECT_PLAN.json # Moved from skill root └── migrate.py # Moved from skill root ``` **External entry points updated:** - `~/.claude/settings.json` SessionEnd hook → new path - `~/.local/bin/claude-memory-symlinks` → thin wrapper delegating to scripts/ensure-symlinks.sh - `~/.local/bin/claude-memory` → unchanged (already pointed into skill dir) - Installed systemd units → unchanged (reference wrappers in ~/.local/bin/)