Skip to main content
skill CX Codex

compact-note — Claude Code skill for trimming notes

The compact-note Claude Code skill condenses long notes and logs while keeping the reasoning behind decisions. It runs on requests to shorten a note, log, or memory.

MIT ★ 26 updated 2026-11-16

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add wrg32786/aigent-os --skill compact-note -a claude-code
Open on GitHub

What compact-note does

The skill reads the whole note and sorts entries into recurring rules, decision-critical records, resolved items, and stale context. A standing rule needs a pattern repeated at least 3 times. Records that explain why a decision was made stay in the note.

It then turns the raw log into a shorter archive, keeps unresolved threads, and updates the note’s metadata with the compaction date and size ratio. A closing ledger records what changed and which entries remain uncertain. The skill requires a full read before editing; partial context is not enough.

What it helps with

  • condense a growing session log
  • extract repeated rules from a vault note
  • retain the reasoning behind past decisions
  • trim resolved or outdated entries

Example prompts for the agent

  • Condense this note and keep the reasons behind decisions.
  • Shorten the log and extract recurring rules.
  • Read the entire note, then compress it without dropping important entries.

How to install compact-note

1Skills CLI (Vercel)

npx skills add wrg32786/aigent-os --skill compact-note -a claude-code

2Manually: put the files in place

~/.claude/skills/compact-note/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/compact-note/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about compact-note

How do I install compact-note in Claude Code?

Run npx skills add wrg32786/aigent-os --skill compact-note -a claude-code. The skill file is at ~/.claude/skills/compact-note/SKILL.md.

What does compact-note do?

It condenses long notes by extracting recurring rules, retaining decision reasoning, and turning the raw log into a shorter archive. It also appends a change ledger.

How does compact-note decide which rules to extract?

A rule must come from a pattern repeated at least 3 times. Records that explain decisions are preserved, and uncertain classifications are listed in the ledger.

Source text

SKILL.md · MIT
---
name: compact-note
agent: mnemosyne
description: "Compact vault notes into standing rules and a shortened log. Use when a note is bloated, a log needs trimming, or memory needs distilling."
allowed-tools: Read, Write, Edit, Grep, Glob
user-invocable: true
triggers:
  - compact this note
  - compact note
  - this note is too long
  - compress the log
  - distill this note
  - trim the vault note
  - note is getting bloated
  - needs compact
  - compact the memory
---

# Compact Note

You are Mnemosyne compacting a bloated vault note. Distill signal into standing rules. Truncate raw log. Never compact so aggressively that rationale is lost.

## What this skill does

Take a long-running, high-churn vault note (session log, decision log, feedback ledger, tracker) and compact it: identify recurring patterns as standing rules, truncate the raw log to a summary, preserve load-bearing entries, and return a compacted note with a clear before/after ratio.

## Protocol

### Step 1: Read the full note

Read the entire note. Do not compact from partial context.

Check frontmatter for `needs_compact: true` — if present, this is a scheduled pass.

### Step 2: Classify all entries

Walk each entry and classify:
- **Standing rule candidate** — a pattern that has repeated 3+ times
- **Load-bearing** — an entry explaining *why* a decision was made; must be preserved
- **Resolved** — outcome is known and the entry no longer affects future decisions; can be truncated
- **Stale** — context has shifted, entry no longer applies; strike it

### Step 3: Compact

Structure the compacted note:

```
## Standing Rules (distilled from log)
<Rule 1 — drawn from entries X, Y, Z>
<Rule 2 — ...>

## Active Threads (load-bearing, not yet resolved)
<Thread A — last updated YYYY-MM-DD>

## Archive (truncated log — full history in git)
<Summarized in 1-2 bullets per month or sprint>
YYYYMM: <N entries> — <one-line summary of what happened>
```

Update frontmatter:
- Set `needs_compact: false`
- Add `last_compacted: YYYY-MM-DD`
- Add `compaction_ratio: X:1` (original lines / compacted lines)

### Step 4: Return honesty ledger

```
## Honesty Ledger

**Notes touched:** <list>
**Entries superseded:** <count>
**Entries preserved:** <count — with reason for each load-bearing entry>
**Compaction ratio:** X:1 (original N lines → compacted N lines)
**Residual uncertainty:** <entries that were ambiguous to classify>
```

## Constraints

- Read the full note before compacting. No partial-context edits.
- Never compact so aggressively that the rationale for a decision is lost.
- Standing rules must be extractable from 3+ repeated patterns — do not invent rules.
- Load-bearing entries (the "why" behind decisions) survive compaction.
- If in doubt about an entry's load-bearing status, preserve it and flag it.

© wrg32786 · MIT · wrg32786/aigent-os

Similar skills

SKILL.md skills catalog →

From the same set58

The whole set →
decide This Claude Code skill weighs a decision against selected criteria and returns a structured recommendation. Run /decide to compare options or ask for help choosing a course of action. CX Codex +1 ★ 26repo stars critique-plan The critique-plan Claude Code skill challenges strategic plans, architectural decisions, and proposals before approval. It surfaces counterarguments, hidden assumptions, and alternatives. CX Codex +1 ★ 26repo stars context-hygiene This Claude Code skill archives old session log entries and trims active priorities. Run /context-hygiene to clean the context files. CX Codex +1 ★ 26repo stars context-capsule The context-capsule Claude Code skill saves the current project state in a capsule for later work. Run it to checkpoint before risky changes, mark a completed milestone, or hand work to another session. CX Codex +1 ★ 26repo stars comms-summarize The comms-summarize Claude Code skill summarizes unread messages from an inbox, channel, or thread. It flags items that need action and separates them from FYI and stale messages. CX Codex +1 ★ 26repo stars cognitive-update The cognitive-update Claude Code skill updates goals, beliefs, self-model fields, and procedures from explicit evidence. It activates for cognitive or runtime state changes. CX Codex +1 ★ 26repo stars codex-adapter The codex-adapter Claude Code skill hands one bounded, mechanical change to OpenAI Codex CLI. It activates on an explicit request to delegate a rename, config edit, or scripted replacement. CX Codex +1 ★ 26repo stars close This Claude Code skill saves session outcomes to durable memory and prepares a resume point. Run /close to wrap up work and update notes in vault/. CX Codex +1 ★ 26repo stars

Project sponsors

Companies that keep this analytics open