Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

how-it-works — Claude Code skill: what it does, how to install

Explains how claude-mem works behind the scenes. It covers tool observation logging, local file storage, and memory injection timing.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add thedotmack/claude-mem --skill how-it-works -a claude-code
Open on GitHub

What how-it-works does

This skill guides the agent when asked about the internal mechanics of claude-mem. The system converts Read, Edit, and Bash tool executions into compressed observations, summarizing them at session end. Relevant details get injected into future prompts. You can also run /learn-codebase to process the entire repository in roughly 5 minutes.

All data remains in ~/.claude-mem on your local machine. That directory holds the SQLite database, vector index, settings, and runtime logs. Network traffic is restricted to your chosen AI provider (Claude, OpenRouter, or Gemini) for compression, plus a single sign-in request to cmem.ai during signup.

Memory injection will not help on the very first run. Context injection activates strictly on your second session in a project.

What it helps with

  • explain how claude-mem captures tool observations
  • locate local storage paths for SQLite files and logs
  • determine when context injection activates across project sessions

Example prompts for the agent

  • how does claude-mem work under the hood?
  • where does claude-mem store its sqlite database and logs?
  • what is claude-mem doing with my bash commands?

How to install how-it-works

1Skills CLI (Vercel)

npx skills add thedotmack/claude-mem --skill how-it-works -a claude-code

2Manually: put the files in place

~/.claude/skills/how-it-works/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/how-it-works/

From the same set15

The whole set →
mem-search thedotmack Searches memory for solutions and context from previous coding sessions when you need to recall past work. Claude Code CX Codex Cursor +1 8,900installs smart-explore thedotmack Uses tree-sitter to map code structure and find symbols. Useful when you need to explore a codebase without loading every full file. Claude Code CX Codex Cursor +1 7,300installs make-plan thedotmack Turns a feature request into a phased plan built on real documentation instead of guesses. Useful right before you run do. Claude Code CX Codex Cursor +1 7,200installs do thedotmack The skill runs an implementation plan in phases through subagents. Use it when a plan needs execution with checks after each phase. Claude Code CX Codex Cursor +1 7,000installs knowledge-agent thedotmack Builds focused knowledge corpora from claude-mem observations and lets you query them in an AI session. Useful for reviewing past work by topic or project. Claude Code CX Codex Cursor +1 5,700installs learn-codebase thedotmack Instructs the agent to read every source file in full before starting work. Built for onboarding on unfamiliar repositories. Claude Code CX Codex Cursor +1 5,300installs pathfinder thedotmack This skill maps feature flows, finds duplicated concerns, and proposes a unified architecture. Use it to inspect a codebase before a refactor. Claude Code CX Codex Cursor +1 5,100installs wowerpoint thedotmack Turns a single text document into a kawaii NotebookLM slide deck via CLI. Helpful when you need to render an architecture doc or report into clear, shareable slides. Claude Code CX Codex Cursor +1 4,400installs

Similar

explore-code lllllllama A skill for cautious code experiments in deep learning repositories: it transplants modules and adapts architectures on an isolated branch, with rollback-aware records. Claude Code CX Codex Cursor +1 335,000installs stitch::manage-design-system official google-labs-code Manages Stitch design systems through MCP tools: retrieves screen data, creates project-level tokens, and applies them to selected screens. Claude Code CX Codex Cursor +1 10,200installs stitch::code-to-design official google-labs-code Moves an existing frontend into Stitch by extracting standalone HTML and a design system, then uploading both to a project. Useful when bringing pages or components into Stitch for further work. Claude Code CX Codex Cursor +1 10,100installs vite Anthony Fu This skill covers Vite configuration, plugin development, SSR builds, and the Vite 8 move to Rolldown. Use it with vite.config.ts work. Claude Code CX Codex Cursor +1 39,800installs stitch::upload-to-stitch official google-labs-code Uploads local images, mockups, extracted HTML, and design markdown to a Stitch project over HTTP, bypassing MCP base64 token limits. Claude Code CX Codex Cursor +1 9,900installs gh cli Teaches agents to call GitHub CLI: structured JSON, pagination, issue and PR search, file uploads. Claude Code CX Codex Cursor +1 2,600installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. Claude Code 1,052,851installs to-tickets Matt Pocock Turns a plan, spec, or conversation into small end-to-end tickets with explicit blockers. Use it to agree on the work breakdown before tickets go to a tracker. Claude Code 711,230installs

Questions about how-it-works

How to install how-it-works in Claude Code?

Run npx skills add thedotmack/claude-mem --skill how-it-works -a claude-code.

What does how-it-works do?

It equips the assistant with exact instructions to answer questions about claude-mem architecture, observation storage, and prompt injection.

Where does claude-mem store project data?

All files live locally in ~/.claude-mem. It stores the SQLite database, vector index, and logs, which are cleanly removed via npx claude-mem uninstall.

Source text

SKILL.md · Apache-2.0
---
name: how-it-works
description: Explain how claude-mem captures observations, when memory injection kicks in, and where data lives. Use when the user asks "how does claude-mem work?" or "what is this thing doing?".
---

# How claude-mem works

## What it does

Every Read, Edit, and Bash that Claude makes turns into a compressed observation. Observations get summarized at session end. Relevant ones get auto-injected into future prompts so the next session starts with context from the last one — no re-explaining the codebase, no re-discovering decisions.

## When it kicks in

Memory injection starts on your second session in a project.

The first session in a fresh project seeds memory; subsequent sessions receive auto-injected context for relevant past work. Run `/learn-codebase` if you want to front-load the entire repo into memory in a single pass (~5 minutes, optional).

## Where data lives

Everything stays in ~/.claude-mem on this machine.

Nothing leaves your machine except calls to whichever AI provider you configured for compression (Claude / OpenRouter / Gemini). Local installs contact cmem.ai once, at signup, to create the sign-in link; nothing else is sent to cmem.ai. The SQLite database, vector index, logs, and settings all live under that directory and are removed cleanly on `npx claude-mem uninstall`.

© thedotmack · Apache-2.0 · thedotmack/claude-mem

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor