Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

compress

БесплатноБез исполняемых скриптовНе проверен

Save this session to the vault and update the semantic memory index

sliamh11от sliamh11★ 50 звёзд на GitHub

Об этом скилле

/compress

Context-aware session saving. Behavior adapts to home mode vs external project mode.

Detect mode

Check if the current working directory is the Deus home directory (~/deus). If it is → Home Mode. Otherwise → External Project Mode.

Resolve vault path

Resolve the vault path using this per-instance order (highest priority first). $VAULT means the resolved path:

  1. DEUS_VAULT_PATH env var, if set.
  2. vault_path in ./.deus/config.json (the current working directory's instance-local config), if that file exists. If the file exists but has no usable vault_path, STOP and tell the user it is present but missing vault_path — do not fall through to the global config (that fall-through is what corrupts another instance's vault).
  3. vault_path in ~/.config/deus/config.json (global fallback).

Tiers 1 and 2 are the per-instance mechanisms: when several Deus instances run on one machine they share the global config (tier 3), so resolving from it alone can silently point this instance's /compress at a different instance's vault and corrupt its memory. The instance-local ./.deus/config.json keeps each instance self-contained. The memory_indexer.py calls below resolve the vault by the same order, so their writes land in this instance's vault too.

Check memory level (External Project Mode only)

If External Project Mode: read branches/external-mode.md for memory level checks, redaction rules, and Step 0 scope.

Home mode: always proceed.

Step 0 — Preserve permanent memories

Before saving the session log, scan the conversation for knowledge worth persisting beyond this session:

  • Preferences or habits the user revealed
  • Decisions made with lasting effect
  • Things the user corrected or clarified
  • Facts worth knowing in future sessions

Do not preserve one-off requests or temporary context.

Where to save: Update $VAULT/CLAUDE.md using the same compact key: value format as the file — no prose bullets. One line per insight. If nothing qualifies, skip silently.

External Project Mode scope: see branches/external-mode.md.

If $VAULT/CLAUDE.md exceeds 200 lines, archive old content to $VAULT/CLAUDE-Archive.md.

Step 0.5 — Flag capturable gotchas

Scan the conversation for a gotcha: a single-fact tool/infra surprise discovered at real cost mid-session (a flag whose default silently misroutes something, an API quirk that wasted retries, a CLI behavior that contradicted its docs) — distinct from the multi-step procedures /learn-procedure captures, and distinct from the user-preference facts Step 0 saves to $VAULT/CLAUDE.md.

If the conversation contains one or more such gotchas that were NOT already captured in a rules file or memory node during the session, ask once (not once per gotcha):

"This session found N gotcha(s) — . Any belong in a rules file or a knowledge node before I save?"

Pre-resolve the likely destination from the session's own project_path (a project's own .claude/rules/*.md, its docs/decisions/, or — for a genuinely cross-project infra fact — the personal $AUTOMEM procedures store) so the user only has to confirm or redirect, not derive the path themselves. If the user confirms, write the fact directly to the named destination in the same session — append it, don't defer as a pending task. If the user declines, or the conversation has no gotcha-shaped content, skip silently — do not ask on every /compress run regardless of content.

Save session log

Review the conversation and create a session log at: $VAULT/Session-Logs/YYYY-MM-DD/{topic}.md

Create the YYYY-MM-DD folder if it doesn't exist. The filename should be the topic only (no date prefix), since the date is already in the folder name.

Use this format:

---
type: session
date: YYYY-MM-DD
topics: [topic1, topic2]
continues: "prior-session-filename.md"
superseded_by: "later-session-filename.md"
project_path: "<working directory path, or '~/deus' for home mode>"
tldr: |
  What happened (1 sentence). Key decision or outcome. Pending: X, Y.
decisions:
  - "chose X over Y: brief reason"
  - "rejected approach A: brief reason"
---

<!-- Full details — only loaded on demand -->

## Decisions Made
- ...

## Key Learnings
- ...

## Files Modified
- ...

## Pending Tasks
- [ ] ...

Cross-linking multi-session investigations (continues / superseded_by):

  • Both fields are optional. Omit them for standalone sessions (the common case).
  • Values are bare filenames (e.g. auto-compress-bg-gate.md) when the linked session is in the same date folder. For cross-date links, use a relative path from Session-Logs/ (e.g. 2026-05-13/prior-topic.md).
  • continues — set when this session resumes a prior investigation. Value: the filename of the earlier session. When setting this field, also update the prior session's frontmatter to add superseded_by pointing to the new log.
  • superseded_by — forward-
Полный SKILL.md на GitHub

Установить compress в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

branches/external-mode.mdbranches/fallback-merge.mdbranches/retrospective.md

FAQ

Что делает скилл compress?

Save this session to the vault and update the semantic memory index

Как установить скилл compress?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл compress запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить compress с