Compression
thedaviddias/Front-End-Checklist
A skill your agent uses when auditing slow page loads, heavy assets, or rendering delays related to Enable text-based compression.
Distill the current conversation into a structured note (decisions made, open questions, file pointers with line numbers, next 1–3 actions) and save to qualityreports/sessionlogs/ before…
$ npx skills add pedrohcgs/claude-code-my-workflow --skill compress-session -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install pedrohcgs/claude-code-my-workflow compress-session --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/compress-session .claude/skills/compress-session && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "compress-session" agent skill from https://github.com/pedrohcgs/claude-code-my-workflow/tree/main/.claude/skills/compress-session into .claude/skills/compress-session/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "compress-session", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/pedrohcgs/claude-code-my-workflow/tree/main/.claude/skills/compress-sessionType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add pedrohcgs/claude-code-my-workflow --skill compress-session -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install pedrohcgs/claude-code-my-workflow compress-session --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/compress-session .agents/skills/compress-session && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "compress-session" agent skill from https://github.com/pedrohcgs/claude-code-my-workflow/tree/main/.claude/skills/compress-session into .agents/skills/compress-session/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "compress-session", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pedrohcgs/claude-code-my-workflow --skill compress-session -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install pedrohcgs/claude-code-my-workflow compress-session --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/compress-session .cursor/skills/compress-session && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "compress-session" agent skill from https://github.com/pedrohcgs/claude-code-my-workflow/tree/main/.claude/skills/compress-session into .cursor/skills/compress-session/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "compress-session", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/pedrohcgs/claude-code-my-workflow.git --path .claude/skills/compress-session--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add pedrohcgs/claude-code-my-workflow --skill compress-session -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install pedrohcgs/claude-code-my-workflow compress-session --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/compress-session .gemini/skills/compress-session && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "compress-session" agent skill from https://github.com/pedrohcgs/claude-code-my-workflow/tree/main/.claude/skills/compress-session into .gemini/skills/compress-session/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "compress-session", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install pedrohcgs/claude-code-my-workflow compress-sessionInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add pedrohcgs/claude-code-my-workflow --skill compress-session -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/compress-session .github/skills/compress-session && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "compress-session" agent skill from https://github.com/pedrohcgs/claude-code-my-workflow/tree/main/.claude/skills/compress-session into .github/skills/compress-session/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "compress-session", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pedrohcgs/claude-code-my-workflow --skill compress-session -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install pedrohcgs/claude-code-my-workflow compress-session --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/compress-session .opencode/skills/compress-session && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "compress-session" agent skill from https://github.com/pedrohcgs/claude-code-my-workflow/tree/main/.claude/skills/compress-session into .opencode/skills/compress-session/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "compress-session", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
compress-sessionDistill the current conversation into a structured note (decisions made, open questions, file pointers with line numbers, next 1–3 actions) and save to qualityreports/sessionlogs/ before…
Compress Session is an agent skill from pedrohcgs/claude-code-my-workflow. Distill the current conversation into a structured note (decisions made, open questions, file pointers with line numbers, next 1–3 actions) and save to qualityreports/sessionlogs/ before auto-compression. Differs from /checkpoint (explicit stop-point snapshot) and from auto-compaction (which truncates rather than distills). Use when context is approaching auto-compact threshold, when a long pipeline has accumulated many decisions, or when the user says "compress", "distil this session", "before we hit…
Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: A ready-to-fork Claude Code template for academics using LaTeX/Beamer + R. Multi-agent review, quality gates, adversarial QA, and replication protocols. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit ae72617. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteGlobGrepBashFrom allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown and json).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
dbreunig.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Compress Session loads about 2.4k tokens when it runs. Until then it costs about 147 tokens; SKILL.md has 861 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Read, Write, Glob, Grep, BashAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from pedrohcgs/claude-code-my-workflow at commit ae72617, republished under its MIT licence (© pedrohcgs). 861 words, ~2,368 tokens.
.claude/skills/compress-session/SKILL.md (or your agent's skills folder)./compress-session — distil, don't truncateAuto-compaction is lossy: it keeps recent turns and drops earlier ones, with no preservation of what was decided mid-session. /compress-session is the distil-not-truncate alternative — produce a structured note that the next session can resume from in under a minute.
Drew Breunig's "How Long Contexts Fail" identifies four failure modes for long-context sessions:
The template's 200-line MEMORY.md cap defends against distraction. The plan-on-disk convention defends against clash. Nothing currently defends against poisoning or directly against confusion — that's what this skill is for.
/checkpoint/checkpoint | /compress-session | |
|---|---|---|
| When | Explicit stop-point (end of working session, before model switch, before collaborator handoff) | Forced — context is about to auto-compact, or the conversation has accumulated enough noise that distillation pays for itself |
| What's preserved | Active plan, decisions, file pointers, next 1–3 actions | Same, plus an explicit "discarded as noise" line so the next session knows what was intentionally not kept |
| Output location | quality_reports/checkpoints/YYYY-MM-DD_<slug>.md | quality_reports/session_logs/YYYY-MM-DD_compression_<slug>.md |
| Triggering | User-invoked at a natural pause | User-invoked when context fatigue shows, OR prompted by the optional PreCompact reminder hook below (not wired by default) |
| Memory updates | Optional auto-proposal of [LEARN] entries | Proposes 0–3 [LEARN] entries — distillation is when generalizable lessons surface, and a quiet session proposes none |
Both skills are companions to the narrative session-log workflow at quality_reports/session_logs/. None replaces the others.
/context-status reports approaching threshold./compress-session; the skill never runs automatically./checkpoint./clear. /compress-session is for preserving state, not for resetting.The current conversation is the source. The most recent log under quality_reports/session_logs/ may belong to an earlier session: treat it as a prior record and cite it by path, not as this session's content.
Optionally use $ARGUMENTS as a topic slug for the output filename.
Write only what this session established. The next session is handed this file automatically (session-handoff.py), so anything invented here arrives there as fact.
path:line only for lines you read in this session; otherwise give the path alone.[LEARN] proposals.[Session handoff: …] or [Context Restored After Compaction] block is the previous record. Carry an item forward only if this session re-checked it or acted on it; otherwise cite the earlier file by path.Produce a note with these sections:
# Session Compression — <YYYY-MM-DD> <topic-slug>
**Source:** <session-log file or "current conversation">
**Token budget at compression:** <approximate %>
**Why compress now:** <approaching auto-compact | mid-plan handoff | accumulated noise | user-requested>
## Active state
- **Plan:** [link to active plan in `quality_reports/plans/` or "no active plan"]
- **Branch:** <git branch>
- **Last commit:** <SHA + subject>
- **Working tree:** <clean | N modified files>
## Decisions made (this session)
1. [Decision]. **Why:** [one sentence]. **Where recorded:** [file:line, plan, or memory].
2. ...
## Files touched
- [path:line] — [what changed, one sentence]
- ...
## Open questions
- [Question]. **Blocker?** [Yes/No]. **Where to resume:** [pointer].
- ...
## Next actions (1–3 only)
1. [Specific next step with file pointer]
2. ...
## Discarded as noise
Things explored during this session that should NOT carry forward — failed hypotheses, abandoned approaches, debugging dead-ends. Listing them explicitly defends against [Breunig's "poisoning" failure mode](https://www.dbreunig.com/2025/06/22/how-contexts-fail-and-how-to-fix-them.html) (hallucinated / wrong content from early turns getting quoted later).
- [Hypothesis / approach / dead-end] — [why it didn't work]
- ...
## Proposed `[LEARN]` entries
Lessons worth promoting to MEMORY.md (machine-specific ones stay in native auto memory). User reviews; nothing auto-merged.
- `[LEARN:<category>]` <lesson>. **Evidence:** <pointer>.
- ...Write to quality_reports/session_logs/YYYY-MM-DD_compression_<topic>.md (slug derived from $ARGUMENTS or current plan name).
Report to the user:
The user reviews. Nothing auto-merges into MEMORY.md: a proposal the user approves is appended to MEMORY.md on their say-so (as in /checkpoint Phase 3), and a machine-specific one is left to native auto memory. /promote-memory does not read this file; its candidates come only from native auto memory (~/.claude/projects/<project>/memory/).
Forkers who want a real chance to run /compress-session before compaction can add a PreCompact hook that blocks compaction once per session. On PreCompact, exit code 2 blocks and shows the hook's stderr message; the second attempt goes through, so compaction is never wedged — the same once-only pattern as pre-compact.py's opt-in DRAFT block. (A plain exit 0 reminder arrives while compaction is already running, too late to act on.)
{
"hooks": {
"PreCompact": [
{
"hooks": [
{
"type": "command",
"command": "sid=$(python3 -c \"import sys,json; print(json.load(sys.stdin).get(\\\"session_id\\\",\\\"x\\\"))\" 2>/dev/null); f=\"${TMPDIR:-/tmp}/cc-compress-reminded-$sid\"; [ -e \"$f\" ] && exit 0; touch \"$f\"; echo \"Run /compress-session now, then compact again - this reminder blocks only once per session.\" >&2; exit 2",
"timeout": 5
}
]
}
]
}
}The hook only pauses and reminds; the user runs /compress-session, then compacts again. We deliberately don't make the hook auto-invoke the skill — that bypasses the user's review step.
/compress-session as a routine replacement for /checkpoint. Checkpoints are cheap and frequent; compressions are heavier and reserved for forced compression.quality_reports/session_logs/YYYY-MM-DD_compression_<topic>.md (gitignored — session-state, not version-controlled).[LEARN] proposals.© pedrohcgs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/compress-session of pedrohcgs/claude-code-my-workflow.
Open the folder on GitHubat commit ae72617
Compress Session next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Compress Session this skillpedrohcgs/claude-code-my-workflow | 1.7k | — | ~2.4k | Automated safety check: Notes | MIT | |
| Compressionthedaviddias/Front-End-Checklist | 74k | — | ~421 | Automated safety check: Pass | MIT | |
| Paperclip Distillpaperclipai/paperclip | 99k | — | ~2.8k | Automated safety check: Pass | MIT | |
| Meeting Notesoutline/outline | 41k | — | ~551 | Automated safety check: Pass | Custom licence | |
| Modeling Conversion MetricsPostHog/posthog | 40k | — | ~1.4k | Automated safety check: Pass | Custom licence | |
| Capture Conversationoutline/outline | 41k | — | ~474 | Automated safety check: Pass | Custom licence |
thedaviddias/Front-End-Checklist
A skill your agent uses when auditing slow page loads, heavy assets, or rendering delays related to Enable text-based compression.
paperclipai/paperclip
A skill your agent uses when an operation issue is a Paperclip cursor-window, distill, or backfill.
outline/outline
Create meeting notes in Outline from a template; use when the user wants an agenda, notes, or a follow-up document for a meeting.
PostHog/posthog
Build reusable conversion models — funnel/step conversion rates, drop-off, and time-to-convert — on either PostHog data-warehouse views (HogQL) or an external dbt project.
outline/outline
Save the current conversation, a decision, or a set of notes as a document in an Outline collection; use when the user wants to keep what was discussed in their knowledge base.
sickn33/agentic-awesome-skills
Transform messy meeting notes and transcripts into structured action items, decisions, and follow-ups.
pedrohcgs/claude-code-my-workflow
Adversarial 5-7 question challenge to a deck's pedagogical choices — ordering, prerequisites, cognitive load, motivation.
pedrohcgs/claude-code-my-workflow
Qualify a check before it is allowed to clear anything — prove it can detect the failure it is meant to catch.
pedrohcgs/claude-code-my-workflow
Compile a Beamer LaTeX slide deck with XeLaTeX (3 passes + bibtex).
pedrohcgs/claude-code-my-workflow
Show current context status and session health. An agent skill from pedrohcgs/claude-code-my-workflow.
pedrohcgs/claude-code-my-workflow
Snapshot the computational environment for a replication package — detects the analysis stack (R / Stata / Python) and emits the right lockfiles (renv.lock + sessionInfo.txt, requirements.txt /…
pedrohcgs/claude-code-my-workflow
Save a structured state snapshot before stopping or handing off.
Distill the current conversation into a structured note (decisions made, open questions, file pointers with line numbers, next 1–3 actions) and save to qualityreports/sessionlogs/ before…. Compress Session is an agent skill from pedrohcgs/claude-code-my-workflow. Distill the current conversation into a structured note (decisions made, open questions, file pointers with line numbers, next 1–3 actions) and save to qualityreports/sessionlogs/ before auto-compression.
Compress Session fits situations like: context is approaching auto-compact threshold; A long pipeline has accumulated many decisions; the user says compress; distil this session.
Run `npx skills add pedrohcgs/claude-code-my-workflow --skill compress-session -a claude-code`. Or copy the skill folder (.claude/skills/compress-session in pedrohcgs/claude-code-my-workflow) into .claude/skills/compress-session in your project. Claude Code loads it when a task matches its description.
Run `npx skills add pedrohcgs/claude-code-my-workflow --skill compress-session -a codex`. Or copy the skill folder (.claude/skills/compress-session in pedrohcgs/claude-code-my-workflow) into .agents/skills/compress-session in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pedrohcgs/claude-code-my-workflow --skill compress-session -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/compress-session, .gemini/skills/compress-session, .github/skills/compress-session and .opencode/skills/compress-session in your project.
SKILL.md names no scripts, command-line tools or credentials: Compress Session is instructions for the agent only. Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Glob, Grep, Bash.
SKILL.md names 1 domain. In commands or code: dbreunig.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Compress Session is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Compress Session: Compression (thedaviddias/Front-End-Checklist, 74k stars), Paperclip Distill (paperclipai/paperclip, 99k stars), Meeting Notes (outline/outline, 41k stars) and Modeling Conversion Metrics (PostHog/posthog, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
pedrohcgs (a GitHub user) maintains it in pedrohcgs/claude-code-my-workflow, which has 1,653 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on September 27, 2026.
Source: pedrohcgs/claude-code-my-workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.