skills/ai-ml/claude-mem/SKILL.md
# Claude-Mem: AI Development Instructions Claude-mem is a Claude Code plugin providing persistent memory across sessions. It captures tool usage, compresses observations using the Claude Agent SDK, and injects relevant context into future sessions. ## Architecture **5 Lifecycle Hooks**: SessionStart → UserPromptSubmit → PostToolUse → Summary → SessionEnd **Hooks** (`src/hooks/*.ts`) - TypeScript → ESM, built to `plugin/scripts/*-hook.js` **Worker Service** (`src/services/worker-service.ts`)
npx skillsauth add hongmaple0820/agent-academy skills/ai-ml/claude-memInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Claude-mem is a Claude Code plugin providing persistent memory across sessions. It captures tool usage, compresses observations using the Claude Agent SDK, and injects relevant context into future sessions.
5 Lifecycle Hooks: SessionStart → UserPromptSubmit → PostToolUse → Summary → SessionEnd
Hooks (src/hooks/*.ts) - TypeScript → ESM, built to plugin/scripts/*-hook.js
Worker Service (src/services/worker-service.ts) - Express API on port 37777, Bun-managed, handles AI processing asynchronously
Database (src/services/sqlite/) - SQLite3 at ~/.claude-mem/claude-mem.db
Search Skill (plugin/skills/mem-search/SKILL.md) - HTTP API for searching past work, auto-invoked when users ask about history
Chroma (src/services/sync/ChromaSync.ts) - Vector embeddings for semantic search
Viewer UI (src/ui/viewer/) - React interface at http://localhost:37777, built to plugin/ui/viewer.html
<private>content</private> - User-level privacy control (manual, prevents storage)Implementation: Tag stripping happens at hook layer (edge processing) before data reaches worker/database. See src/utils/tag-stripping.ts for shared utilities.
npm run build-and-sync # Build, sync to marketplace, restart worker
Settings are managed in ~/.claude-mem/settings.json. The file is auto-created with defaults on first run.
<project-root>/src/<project-root>/plugin/~/.claude/plugins/marketplaces/thedotmack/~/.claude-mem/claude-mem.db~/.claude-mem/chroma/Claude-mem hooks use specific exit codes per Claude Code's hook contract:
Philosophy: Worker/hook errors exit with code 0 to prevent Windows Terminal tab accumulation. The wrapper/plugin layer handles restart logic. ERROR-level logging is maintained for diagnostics.
See private/context/claude-code/exit-codes.md for full hook behavior matrix.
Public Docs: https://docs.claude-mem.ai (Mintlify)
Source: docs/public/ - MDX files, edit docs.json for navigation
Deploy: Auto-deploys from GitHub on push to main
Claude-mem is designed with a clean separation between open-source core functionality and optional Pro features.
Open-Source Core (this repository):
Pro Features (coming soon, external):
This architecture preserves the open-source nature of the project while enabling sustainable development through optional paid features.
No need to edit the changelog ever, it's generated automatically.
development
Builds dashboards, reports, and data-driven interfaces requiring charts, graphs, or visual analytics. Provides systematic framework for selecting appropriate visualizations based on data characteristics and analytical purpose. Includes 24+ visualization types organized by purpose (trends, comparisons, distributions, relationships, flows, hierarchies, geospatial), accessibility patterns (WCAG 2.1 AA compliance), colorblind-safe palettes, and performance optimization strategies. Use when creating visualizations, choosing chart types, displaying data graphically, or designing data interfaces.
development
Guided statistical analysis with test selection and reporting. Use when you need help choosing appropriate tests for your data, assumption checking, power analysis, and APA-formatted results. Best for academic research reporting, test selection guidance. For implementing specific models programmatically use statsmodels.
testing
Execute read-only SQL queries against multiple PostgreSQL databases. Use when: (1) querying PostgreSQL databases, (2) exploring database schemas/tables, (3) running SELECT queries for data analysis, (4) checking database contents. Supports multiple database connections with descriptions for intelligent auto-selection. Blocks all write operations (INSERT, UPDATE, DELETE, DROP, etc.) for safety.
development
Low-level plotting library for full customization. Use when you need fine-grained control over every plot element, creating novel plot types, or integrating with specific scientific workflows. Export to PNG/PDF/SVG for publication. For quick statistical plots use seaborn; for interactive plots use plotly; for publication-ready multi-panel figures with journal styling, use scientific-visualization.