Context Compression
guanyang/open-agent-hub
This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve…
Compresses artifacts for judge evaluation. An agent skill from closedloop-ai/claude-plugins.
$ npx skills add closedloop-ai/claude-plugins --skill artifact-type-tailored-context -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install closedloop-ai/claude-plugins artifact-type-tailored-context --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/closedloop-ai/claude-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/judges/skills/artifact-type-tailored-context .claude/skills/artifact-type-tailored-context && 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 "artifact-type-tailored-context" agent skill from https://github.com/closedloop-ai/claude-plugins/tree/main/plugins/judges/skills/artifact-type-tailored-context into .claude/skills/artifact-type-tailored-context/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "artifact-type-tailored-context", 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/closedloop-ai/claude-plugins/tree/main/plugins/judges/skills/artifact-type-tailored-contextType 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 closedloop-ai/claude-plugins --skill artifact-type-tailored-context -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install closedloop-ai/claude-plugins artifact-type-tailored-context --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/closedloop-ai/claude-plugins.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/judges/skills/artifact-type-tailored-context .agents/skills/artifact-type-tailored-context && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "artifact-type-tailored-context" agent skill from https://github.com/closedloop-ai/claude-plugins/tree/main/plugins/judges/skills/artifact-type-tailored-context into .agents/skills/artifact-type-tailored-context/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "artifact-type-tailored-context", 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 closedloop-ai/claude-plugins --skill artifact-type-tailored-context -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install closedloop-ai/claude-plugins artifact-type-tailored-context --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/closedloop-ai/claude-plugins.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/judges/skills/artifact-type-tailored-context .cursor/skills/artifact-type-tailored-context && 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 "artifact-type-tailored-context" agent skill from https://github.com/closedloop-ai/claude-plugins/tree/main/plugins/judges/skills/artifact-type-tailored-context into .cursor/skills/artifact-type-tailored-context/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "artifact-type-tailored-context", 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/closedloop-ai/claude-plugins.git --path plugins/judges/skills/artifact-type-tailored-context--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 closedloop-ai/claude-plugins --skill artifact-type-tailored-context -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install closedloop-ai/claude-plugins artifact-type-tailored-context --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/closedloop-ai/claude-plugins.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/judges/skills/artifact-type-tailored-context .gemini/skills/artifact-type-tailored-context && 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 "artifact-type-tailored-context" agent skill from https://github.com/closedloop-ai/claude-plugins/tree/main/plugins/judges/skills/artifact-type-tailored-context into .gemini/skills/artifact-type-tailored-context/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "artifact-type-tailored-context", 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 closedloop-ai/claude-plugins artifact-type-tailored-contextInstalls 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 closedloop-ai/claude-plugins --skill artifact-type-tailored-context -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/closedloop-ai/claude-plugins.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/judges/skills/artifact-type-tailored-context .github/skills/artifact-type-tailored-context && 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 "artifact-type-tailored-context" agent skill from https://github.com/closedloop-ai/claude-plugins/tree/main/plugins/judges/skills/artifact-type-tailored-context into .github/skills/artifact-type-tailored-context/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "artifact-type-tailored-context", 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 closedloop-ai/claude-plugins --skill artifact-type-tailored-context -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install closedloop-ai/claude-plugins artifact-type-tailored-context --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/closedloop-ai/claude-plugins.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/judges/skills/artifact-type-tailored-context .opencode/skills/artifact-type-tailored-context && 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 "artifact-type-tailored-context" agent skill from https://github.com/closedloop-ai/claude-plugins/tree/main/plugins/judges/skills/artifact-type-tailored-context into .opencode/skills/artifact-type-tailored-context/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "artifact-type-tailored-context", 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.
artifact-type-tailored-contextCompresses artifacts for judge evaluation. An agent skill from closedloop-ai/claude-plugins.
Artifact Type Tailored Context is an agent skill from closedloop-ai/claude-plugins. Compresses artifacts for judge evaluation. Reads a single raw artifact, applies tiered summarization within a token budget, and returns compacted content with metadata. Isolation via forked context prevents pollution of agent context
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files (for example `preambles/code_preamble.md`, `preambles/common_input_preamble.md` and `preambles/feature_preamble.md`).
It sits in Writing & Content, covering Summarization, LLM cost and token optimization and Codebase knowledge for agents. The repository describes itself as: Open-source Claude Code plugins for multi-agent software delivery. Plan-first SDLC workflow, code review, LLM quality judges, and self-learning — grounded in your codebase… The licence is Apache-2.0.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 0e20ac0. 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:
ReadBashFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
uvFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.
From 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.
Artifact Type Tailored Context loads about 2.1k tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 777 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, 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 closedloop-ai/claude-plugins at commit 0e20ac0, republished under its Apache-2.0 licence (© closedloop-ai). 777 words, ~2,104 tokens.
.claude/skills/artifact-type-tailored-context/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.Compress individual artifacts within a specified token budget using tiered summarization strategies. This skill operates in isolated forked context to prevent polluting the parent agent's context with large raw artifacts.
You are responsible for compressing a single artifact file to fit within a token budget. Your responsibilities:
Success criteria:
You receive three required parameters:
| Parameter | Type | Description |
|---|---|---|
artifact_path | string | Path to artifact file relative to $CLOSEDLOOP_WORKDIR |
task_description | string | Compression guidance (e.g., "preserve function signatures") |
token_budget | integer | Maximum allowed tokens for compressed output |
Read the artifact from its absolute path:
# Construct full path
ARTIFACT_FULL_PATH="$CLOSEDLOOP_WORKDIR/$artifact_path"Use the Read tool to load the artifact content. If the file does not exist, skip to error handling.
Invoke the count_tokens.py script to get accurate token count:
cd "$CLOSEDLOOP_WORKDIR" && uv run count_tokens.py "$artifact_path"Expected output format:
{
"input_tokens": 1234
}Parse the JSON output and extract input_tokens as raw_tokens.
Error handling:
raw_tokens = len(content) / 4[WARNING: Token count estimated via heuristic due to count_tokens.py failure]\n\nChoose strategy based on raw token count relative to budget:
Condition: raw_tokens <= token_budget
Action: Return artifact unchanged
Metadata:
compacted_tokens = raw_tokenstruncated = falseNo further processing needed.
Condition: token_budget < raw_tokens <= token_budget * 1.5
Action: Apply artifact-type-specific compression preserving structure
Compression strategies by artifact type:
| Artifact Type | Strategy |
|---|---|
| Code diffs | Keep function signatures, class declarations, and error messages. Summarize method bodies with // ... (implementation omitted for brevity). Remove comments and blank lines. |
| JSON files | Keep all keys and structure. For arrays longer than 10 items, keep first 5 and last 2, replace middle with {"_truncated": "N items omitted"}. Truncate string values over 200 chars. |
| Log files | Keep all ERROR and WARNING lines. Summarize consecutive INFO lines with ... (N info lines omitted). Keep first and last 10 lines intact. |
| Plan/PRD markdown | Keep all headings, tables, and code blocks. Summarize paragraph text preserving key nouns and action verbs. Remove redundant examples. |
Validation:
After compression, count tokens again:
cd "$CLOSEDLOOP_WORKDIR" && uv run count_tokens.py <(echo "$compressed_content")Decision tree:
compacted_tokens <= token_budget: Success → Return with truncated = falsecompacted_tokens > token_budget: Compression failed → Fallback to Tier 3Condition: raw_tokens > token_budget * 1.5 OR compression in Tier 2 exceeded budget
Action: Hard truncate at character boundary
Algorithm:
char_limit = token_budget * 4 (heuristic: 4 chars per token)\n\n) before char_limittruncated_tokens = raw_tokens - token_budget[TRUNCATED: content exceeds budget, remaining {truncated_tokens} tokens omitted]Metadata:
compacted_tokens = token_budget (approximate)truncated = trueReturn structured JSON with strict schema:
{
"artifact_name": "path/to/artifact.ext",
"raw_tokens": 5000,
"compacted_tokens": 2000,
"truncated": false,
"content": "compressed artifact content here..."
}Field descriptions:
| Field | Type | Description |
|---|---|---|
artifact_name | string | Original artifact_path parameter |
raw_tokens | integer | Token count from count_tokens.py on raw artifact |
compacted_tokens | integer | Token count after compression (from count_tokens.py validation or estimate for Tier 1/3) |
truncated | boolean | true if Tier 3 truncation applied, false otherwise |
content | string | Compressed or truncated artifact content |
Condition: artifact_path does not exist at $CLOSEDLOOP_WORKDIR/<artifact_path>
Response:
{
"artifact_name": "path/to/missing.ext",
"raw_tokens": 0,
"compacted_tokens": 0,
"truncated": true,
"content": "[ERROR: artifact not found at $CLOSEDLOOP_WORKDIR/path/to/missing.ext]"
}Condition: Script exits with non-zero code or returns invalid JSON
Action:
raw_tokens = len(content) / 4[WARNING: Token count estimated via heuristic due to count_tokens.py failure]
<original content follows>truncated = false unless Tier 3 is appliedCondition: Tier 2 compression produces malformed content (e.g., invalid JSON syntax for JSON artifacts)
Action: Immediately fallback to Tier 3 hard truncation with truncated = true
Input:
artifact_path: plan.jsontoken_budget: 5000Output:
{
"artifact_name": "plan.json",
"raw_tokens": 3200,
"compacted_tokens": 3200,
"truncated": false,
"content": "<full plan.json content>"
}Input:
artifact_path: git_difftoken_budget: 10000Compression applied: Remove comments, summarize method bodies, keep signatures
Output:
{
"artifact_name": "git_diff",
"raw_tokens": 12000,
"compacted_tokens": 9500,
"truncated": false,
"content": "<compressed diff with function signatures preserved>"
}Input:
artifact_path: outcomes.logtoken_budget: 3000Action: Hard truncate at ~12000 chars (3000 tokens * 4)
Output:
{
"artifact_name": "outcomes.log",
"raw_tokens": 25000,
"compacted_tokens": 3000,
"truncated": true,
"content": "<first ~2900 tokens of log>\n\n[TRUNCATED: content exceeds budget, remaining 22000 tokens omitted]"
}© closedloop-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files in plugins/judges/skills/artifact-type-tailored-context of closedloop-ai/claude-plugins.
Open the folder on GitHubat commit 0e20ac0
Artifact Type Tailored Context 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 |
|---|---|---|---|---|---|---|
| Artifact Type Tailored Context this skillclosedloop-ai/claude-plugins | 122 | — | ~2.1k | Automated safety check: Notes | Apache-2.0 | |
| Context Compressionguanyang/open-agent-hub | 973 | 2 repos | ~4.6k | Automated safety check: Pass | MIT | |
| Codememory Summarization Skillharrylettering/CodeMemory | 158 | — | ~788 | Automated safety check: Pass | None | |
| News Aggregator Skillcclank/news-aggregator-skill | 1.3k | — | ~2.1k | Automated safety check: Pass | None | |
| Vss Search ArchiveNVIDIA-AI-Blueprints/video-search-and-summarization | 1.9k | — | ~3.6k | Automated safety check: Pass | Apache-2.0 | |
| Entroly Context Controljuyterman1000/entroly | 472 | — | ~501 | Automated safety check: Pass | Apache-2.0 |
guanyang/open-agent-hub
This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve…
harrylettering/CodeMemory
This skill should be used when creating conversation summaries for CodeMemory, discussing summarization quality, optimizing DAG structure, or working with the compaction system.
cclank/news-aggregator-skill
Comprehensive news aggregator that fetches, filters, and deeply analyzes real-time content from 44+ sources including Hacker News, Lobsters, Dev.to, GitHub, arXiv, Hugging Face Papers, AIHOT, TLDR…
NVIDIA-AI-Blueprints/video-search-and-summarization
A skill your agent uses when a user wants to search archived VSS video or ingest or delete a source for search.
juyterman1000/entroly
Surgically select, compress, and recover codebase context using Entroly's MCP tools.
deepgram/deepgram-js-sdk
A skill your agent uses when writing or reviewing JavaScript/TypeScript in this repo that calls Deepgram Text Intelligence / Read (/v1/read) for sentiment, summarization, topic detection, and intent…
closedloop-ai/claude-plugins
Run Codex to review a plan file and return structured feedback with a verdict.
closedloop-ai/claude-plugins
Check if critic reviews are still valid before re-running Phase 2.5 critics.
closedloop-ai/claude-plugins
Check if cross-repo coordinator results can be reused, avoiding redundant Sonnet agent launches.
closedloop-ai/claude-plugins
Check for a cached plan-evaluation.json result before launching the plan-evaluator agent.
closedloop-ai/claude-plugins
This skill should be used when needing to locate files within the Claude Code plugins cache directory (~/.claude/plugins/cache).
closedloop-ai/claude-plugins
Start a detached GitHub pull-request monitor that wakes the exact launching Codex Desktop or CLI root through the managed Codex App Server when review, CI, conflict, merge-queue, closure, readiness…
Compresses artifacts for judge evaluation. An agent skill from closedloop-ai/claude-plugins. Artifact Type Tailored Context is an agent skill from closedloop-ai/claude-plugins. Compresses artifacts for judge evaluation.
Artifact Type Tailored Context fits situations like: tasks that involve Summarization; tasks that involve LLM cost and token optimization; tasks that involve Codebase knowledge for agents.
Run `npx skills add closedloop-ai/claude-plugins --skill artifact-type-tailored-context -a claude-code`. Or copy the skill folder (plugins/judges/skills/artifact-type-tailored-context in closedloop-ai/claude-plugins) into .claude/skills/artifact-type-tailored-context in your project. Claude Code loads it when a task matches its description.
Run `npx skills add closedloop-ai/claude-plugins --skill artifact-type-tailored-context -a codex`. Or copy the skill folder (plugins/judges/skills/artifact-type-tailored-context in closedloop-ai/claude-plugins) into .agents/skills/artifact-type-tailored-context 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 closedloop-ai/claude-plugins --skill artifact-type-tailored-context -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/artifact-type-tailored-context, .gemini/skills/artifact-type-tailored-context, .github/skills/artifact-type-tailored-context and .opencode/skills/artifact-type-tailored-context in your project.
Going by SKILL.md and its folder, Artifact Type Tailored Context needs the command-line tools its instructions call (uv). Its frontmatter pre-approves these tools: Read, Bash.
SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. 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.
Artifact Type Tailored Context is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.4k 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 Artifact Type Tailored Context: Context Compression (guanyang/open-agent-hub, 973 stars), Codememory Summarization Skill (harrylettering/CodeMemory, 158 stars), News Aggregator Skill (cclank/news-aggregator-skill, 1.3k stars) and Vss Search Archive (NVIDIA-AI-Blueprints/video-search-and-summarization, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
closedloop-ai (a GitHub organization) maintains it in closedloop-ai/claude-plugins, which has 122 GitHub stars. The repository holds 43 skills in this directory. The repository was last updated on October 7, 2026.
Source: closedloop-ai/claude-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.