记忆

Context Compactor

试用

Condense a long agent session transcript into a compact handoff memo: decisions, tasks, risks, facts & links. Credential values are auto-redacted before output (best-effort - review memos before sharing; --strict drops whole suspect lines). EN/RU heuristics, zero dependencies. The CLI prints what it reads and where it writes. Use ONLY with the user's explicit consent: tell the user which transcript file will be read.

它能做什么

Condense a long agent session transcript into a compact handoff memo: decisions, tasks, risks, facts & links. Credential values are auto-redacted before output (best-effort - review memos before sharing; --strict drops whole suspect lines). EN/RU heuristics, zero dependencies. The CLI prints what it reads and where it writes. Use ONLY with the user's explicit consent: tell the user which transcript file will be read.

技能文档

Context Compactor

Local-first. No telemetry, no cloud sync — the transcript you feed it never leaves your machine.

When to use

  • Your session is about to be compacted and you want a handoff memo to paste into the next one.
  • You hand work to another agent (or a human) without dumping 500 KB of transcript.
  • You want a daily digest of what was actually decided and what is still open. Don't use for: summarizing code repositories, translating documents, chat-style Q&A.

Quick start

# from this package (or the git repo: github.com/vnbochkarev-netizen/context-compactor)
python3 compactor.py --input session.md
python3 compactor.py --input session.md --output handoff.md
python3 compactor.py --self-test

Safety first: secrets never leak into the memo

Handoff memos travel to other agents and files. Context Compactor redacts credential values before scoring: password, пароль, token, api key, secret, sk-…/ghp_… tokens and PEM private-key blocks (multiline and single-line forms) become ``. The surrounding decision/context is kept — the secret value is not. --self-test asserts this with planted secrets, including Cyrillic values and PEM blocks.

How it works

  • Bucketing: strong decision verbs («решили», "decided") → Decisions; weak markers with a link («договорились, ссылка: ») → Facts; tasks, risks and links each get their own section.
  • Long transcripts: the head AND the tail are analyzed (final decisions usually sit at the end); the skipped middle is counted and reported in the memo header together with the tool version, date and source file.
  • Code dumps and tool noise are filtered out; duplicates are removed.
WhatWhereHow to delete
Transcript file you point atin memory onlynothing is written
Output memostdout or --output you choosedelete the file

Get explicit consent before processing a transcript: tell the user which file will be read. The tool writes nothing by itself, phones nothing and keeps no logs.

Permissions

  • Files: read-only access to the transcript file the user explicitly points at; writes only to an --output path the user provides.
  • Process: none — no subprocesses, no installs.
  • Network: NONE.
  • Secrets: values are redacted before any output; the tool never stores or transmits them.

License

MIT © 2026 Viacheslav Bochkarev. Free to use, modify and redistribute.

相关技能

Turn a short, redacted Session summary into a collaboration-safe Context excerpt. Use before sharing an agent or meeting handoff when the original Session may contain private details that do not belong in the next task.

GitHub PR/issue agent transcripts: redact, preview, and insert safely.

作者 flyelep1 次安装

User-driven conversation archiving for AI agents. Archive by topic or time, free context, recall on demand.

Claude Code & Antigravity session management. Topics — id (lookup UUID), list (enumerate), search (keyword validate), import, summarize, analyze (stats), archive (flat bak), classify, clean-profanity (sanitize JSONL), split (boundaries), compress (MCP), context (usage measurement pull/push), destroy, dual-sync (Win/WSL memory), install (hook), memory-trim (budget trim), migrate (to worktree), move (update cwd), purge (dead sessions), rename (custom title), repair (chain/tool_result/UUID), rewind (context truncate), url (web URL). Use when: "session id", "current session", "session list", "list sessions", "session search", "find session", "session classify", "session compress", "session migrate", "session move", "session repair", "session rename", "session split", "session purge", "session rewind", "session analyze", "session import", "session summarize", "session archive", "archive session", "clean profanity", "session cleanup", "memory trim", "dual sync", "measure context", "context u

作者 es6kr

Verify and distribute trust-gated context (memory and skill files) to a multi-agent roster before it's injected. Use when assembling context for several sub-agents from shared memory/skill files, to catch files silently modified since they were last verified.

Turn conversations into grounded decisions

1 次安装