Receber por email
← Voltar para o catálogo

memem-mine-history

Mine ALL existing Claude Code sessions, including history from before memem was installed.

34estrelas
Atualizado há 3 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add TT-Wang/memem

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/memem-mine-history/svg)](https://www.skillteca.com.br/skills/memem-mine-history)

Skills relacionadas

Ver todas de Dados e Análise →

Alerta por categoria

Receba novas skills de Dados e Análise toda segunda

1 email curto, só com as skills novas de Dados e Análise. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Mine all historical Claude Code sessions for knowledge. By default the Stop hook only handles new sessions; this command backfills existing JSONL transcripts. It also opts you in to event-triggered mining for future sessions.

  1. Show how many sessions exist:
find ~/.claude/projects/ -name "*.jsonl" ! -path "*/subagents/*" -size +5k | wc -l
  1. Tell the user approximately how long it will take (~3-5 seconds per session, plus Haiku API costs).
  1. Confirm with the user before starting — this can take hours for large histories and makes many Haiku API calls.
  1. Record the opt-in and start history backfill in the background:
mkdir -p ~/.memem && touch ~/.memem/.miner-opted-in
nohup PYTHONPATH="${CLAUDE_PLUGIN_ROOT}" python3 -m memem.server --mine-all > ~/.memem/mine-all.log 2>&1 &
echo "History mining started in background (PID $!)"
  1. Tell the user:
  2. History mining is running in the background (log at ~/.memem/mine-all.log)
  3. Future sessions will also be mined automatically — every Claude Code Stop event spawns mine_delta to extract new turns
  4. They can continue working normally
  5. New memories appear as they're extracted (Haiku-extracted, written to ~/obsidian-brain/memem/memories/)
  6. Run /memem-status to check progress and Stop-hook registration
  7. To opt out: rm ~/.memem/.miner-opted-in (no daemon to stop)
Compartilhar X LinkedIn