Agent skill

Structured Context Compressor

by LearnPrompt in LearnPrompt/cc-harness-skills

Compress a long agent conversation into a nine-part continuation summary that preserves request, files, errors, user messages, current work, and the next aligned step.

MITAuto-check passedAgent Workflows

Install Structured Context Compressor

skills CLI
$ npx skills add LearnPrompt/cc-harness-skills --skill structured-context-compressor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LearnPrompt/cc-harness-skills structured-context-compressor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LearnPrompt/cc-harness-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/structured-context-compressor .claude/skills/structured-context-compressor && rm -rf skills-src

Use ~/.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/

Facts

Skill name
structured-context-compressor
GitHub stars
236
Token cost
~327 tokens
SKILL.md length
119 words
Files
5 (incl. scripts, references)
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Compress a long agent conversation into a nine-part continuation summary that preserves request, files, errors, user messages, current work, and the next aligned step.

  • Works in 9 steps: primary request and intent → key technical concepts → files and code sections → …
  • Agent Workflows work in your project
  • SKILL.md covers Use It For, Quick Start, Nine Sections and Highest-Value Rule, plus 1 more section
  • Runs Python scripts from its folder; calls python3

What it does

Structured Context Compressor is an agent skill from LearnPrompt/cc-harness-skills. Compress a long agent conversation into a nine-part continuation summary that preserves request, files, errors, user messages, current work, and the next aligned step.

Its SKILL.md is about 330 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `README.md`, `references/prompt-template.md` and `references/source-notes.md`).

It sits in Agent Workflows. The repository describes itself as: Portable CC-inspired skills for memory, verification, multi-agent coordination, context compression, and proactive coding-agent workflows. The licence is MIT.

When your agent uses it

  • Agent Workflows work in your project

Example prompts

  • “/structured-context-compressor”

Requirements

  • Python 3

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. primary request and intent
  2. key technical concepts
  3. files and code sections
  4. errors and fixes
  5. problem solving
  6. all user messages
  7. pending tasks
  8. current work
  9. next aligned step

What it can do on your machine

Read from SKILL.md and the folder at commit 3899650. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Structured Context Compressor loads about 327 tokens when it runs, and up to ~558 if it reads all its reference files. Until then it costs about 49 tokens; SKILL.md has 119 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~327
With references · SKILL.md plus every file in references/, read only if the agent opens them
~558

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.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated 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); the scripts in this folder are not scanned.

SKILL.md

The full file from LearnPrompt/cc-harness-skills at commit 3899650, republished under its MIT licence (© LearnPrompt). 119 words, ~327 tokens.

Download SKILL.mdSave it as .claude/skills/structured-context-compressor/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
structured-context-compressor
description
Compress a long agent conversation into a nine-part continuation summary that preserves request, files, errors, user messages, current work, and the next aligned step.

Structured Context Compressor

Use this skill when a free-form summary is too lossy and you need a reliable continuation artifact.

Use It For

  • long coding conversations
  • session handoff
  • agent-to-agent continuation
  • preserving user intent under context pressure

Quick Start

Render the standard template:

bash
python3 {baseDir}/scripts/render_template.py

Then apply the prompt in references/prompt-template.md.

Nine Sections

  1. primary request and intent
  2. key technical concepts
  3. files and code sections
  4. errors and fixes
  5. problem solving
  6. all user messages
  7. pending tasks
  8. current work
  9. next aligned step

Highest-Value Rule

Preserve all user messages or an accurate equivalent. Do not compress away the corrections that changed the direction of work.

Supporting Files

© LearnPrompt, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in skills/structured-context-compressor of LearnPrompt/cc-harness-skills.

  • SKILL.md
  • README.md
  • references/prompt-template.md
  • references/source-notes.md
  • scripts/render_template.py

Open the folder on GitHubat commit 3899650

Compare with similar skills

Structured Context Compressor 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.

Structured Context Compressor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Structured Context Compressor this skillLearnPrompt/cc-harness-skills236—~327Automated safety check: PassMIT
Claude Code Agent Developmentanthropics/claude-plugins-official37k8 repos~2.8kAutomated safety check: PassApache-2.0
Copilot Session Failure Analysisdotnet/maui23k—~3.4kAutomated safety check: PassMIT
Mem0 CLI Memory Commandsmem0ai/mem067k—~1.4kAutomated safety check: NotesApache-2.0
Create Agentvectorize-io/hindsight46k—~1.1kAutomated safety check: PassMIT
Google Antigravity SDKgoogle-antigravity/antigravity-sdk-python3.6k—~2.1kAutomated safety check: NotesApache-2.0

Similar skills

  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    37k GitHub starsUsed in 8 repos~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Mines local Copilot CLI session logs for dotnet/maui to rank costly or failing runs, tag recurring failure modes, propose repo edits and emit guard evals.

    23k GitHub stars~3.4k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Adds, searches, lists, updates and deletes memories on the Mem0 platform from the terminal with the mem0 command, including a JSON mode built for agents.

    67k GitHub stars~1.4k tokensUpdated yesterday
    Agent WorkflowsAuto-check: notes
  • Create Agent

    vectorize-io/hindsight

    Create a new Hindsight-powered subagent with long-term memory.

    46k GitHub stars~1.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Google Antigravity SDK

    google-antigravity/antigravity-sdk-python

    Design, implement, and debug autonomous AI agents and multi-agent systems using the Google Antigravity (AGY) SDK.

    3.6k GitHub stars~2.1k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check: notes
  • Yao Meta Skill

    yaojingang/yao-meta-skill

    Create, improve, or evaluate an existing skill from workflows, prompts, SOPs, scripts.

    2.7k GitHub stars~768 tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed

More from LearnPrompt/cc-harness-skills

  • Dream Memory

    LearnPrompt/cc-harness-skills

    Consolidate recent logs, sessions, and existing memory files into durable topic memories, normalize dates, prune stale entries, and keep MEMORY.md short enough for prompt use.

    236 GitHub stars~477 tokensUpdated 2 mo ago
    Auto-check passed
  • Kairos Lite

    LearnPrompt/cc-harness-skills

    Build a lightweight proactive mode with scheduled checks, sleep intervals, concise user briefs, and expiry safeguards so an agent can work in the background without becoming an uncontrolled daemon.

    236 GitHub stars~334 tokensUpdated 2 mo ago
    Auto-check passed
  • Memory Extractor

    LearnPrompt/cc-harness-skills

    Extract durable memories from recent conversation turns into user, feedback, project, and reference categories while avoiding stale code-state facts.

    236 GitHub stars~347 tokensUpdated 2 mo ago
    Auto-check passed
  • Swarm Coordinator

    LearnPrompt/cc-harness-skills

    Coordinate multiple agents by splitting work into research, synthesis, implementation, and verification, assigning ownership, and keeping the coordinator focused on integration rather than raw…

    236 GitHub stars~346 tokensUpdated 2 mo ago
    Auto-check passed
  • Verification Gate

    LearnPrompt/cc-harness-skills

    Run a read-only verification pass after implementation to check whether completion claims are real, validation actually ran, and obvious edge cases or regressions were missed.

    236 GitHub stars~302 tokensUpdated 2 mo ago
    Auto-check passed

Questions about Structured Context Compressor

What does Structured Context Compressor do?

Compress a long agent conversation into a nine-part continuation summary that preserves request, files, errors, user messages, current work, and the next aligned step. Structured Context Compressor is an agent skill from LearnPrompt/cc-harness-skills. Compress a long agent conversation into a nine-part continuation summary that preserves request, files, errors, user messages, current work, and the next aligned step.

When should I use Structured Context Compressor?

Structured Context Compressor fits situations like: agent Workflows work in your project.

How do I install Structured Context Compressor in Claude Code?

Run `npx skills add LearnPrompt/cc-harness-skills --skill structured-context-compressor -a claude-code`. Or copy the skill folder (skills/structured-context-compressor in LearnPrompt/cc-harness-skills) into .claude/skills/structured-context-compressor in your project. Claude Code loads it when a task matches its description.

How do I install Structured Context Compressor in Codex?

Run `npx skills add LearnPrompt/cc-harness-skills --skill structured-context-compressor -a codex`. Or copy the skill folder (skills/structured-context-compressor in LearnPrompt/cc-harness-skills) into .agents/skills/structured-context-compressor in your project. Codex loads it when a task matches its description.

Can I use Structured Context Compressor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LearnPrompt/cc-harness-skills --skill structured-context-compressor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/structured-context-compressor, .gemini/skills/structured-context-compressor, .github/skills/structured-context-compressor and .opencode/skills/structured-context-compressor in your project.

What does Structured Context Compressor need to run?

Going by SKILL.md and its folder, Structured Context Compressor needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Structured Context Compressor access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Structured Context Compressor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Structured Context Compressor use?

Structured Context Compressor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Structured Context Compressor use?

About 327 tokens (SKILL.md is roughly 1.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 231 tokens, read only when the agent opens those files.

What are the alternatives to Structured Context Compressor?

Skills that share tags, products or a category with Structured Context Compressor: Claude Code Agent Development (anthropics/claude-plugins-official, 37k stars), Copilot Session Failure Analysis (dotnet/maui, 23k stars), Mem0 CLI Memory Commands (mem0ai/mem0, 67k stars) and Create Agent (vectorize-io/hindsight, 46k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Structured Context Compressor?

LearnPrompt (a GitHub user) maintains it in LearnPrompt/cc-harness-skills, which has 236 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on July 10, 2026.

Source: LearnPrompt/cc-harness-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.