Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add closedloop-ai/claude-plugins --skill artifact-type-tailored-contextgit clone --depth 1 https://github.com/closedloop-ai/claude-pluginsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/closedloop-ai/claude-plugins/artifact-type-tailored-context)<a href="https://agentmods.dev/skills/closedloop-ai/claude-plugins/artifact-type-tailored-context"><img src="https://agentmods.dev/badge/skills/closedloop-ai/claude-plugins/artifact-type-tailored-context.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00047 | $0.02026 |
| Opus 5 | $0.00023 | $0.01013 |
| Sonnet 5 | $0.00009 | $0.00405 |
| Haiku 4.5 | $0.00005 | $0.00203 |
Grade A, and why
artifact-type-tailored-context scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 288 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Artifact-Type-Tailored Context Skill
Purpose
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.
Task Context
You are responsible for compressing a single artifact file to fit within a token budget. Your responsibilities:
- Read the raw artifact from the specified path
- Count its tokens using the count_tokens.py script
- Apply appropriate tiered summarization strategy
- Return structured JSON with metadata
Success criteria:
- Compressed content fits within token budget (or is properly truncated)
- Valid JSON response with all required fields
- Metadata accurately reflects truncation status
Input Parameters
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 |
Execution Workflow
Step 1: Read Artifact
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.
Step 2: Count Raw Tokens
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:
- If count_tokens.py fails (exit code non-zero), fallback to character-based heuristic:
raw_tokens = len(content) / 4 - Add warning to content preamble:
[WARNING: Token count estimated via heuristic due to count_tokens.py failure]\n\n
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 288 lines · 47 tokens per session scan A 7de4150cf2c9
artifact-type-tailored-context is a skill published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed yesterday), licensed Apache-2.0. It adds 47 tokens to every session and 2,026 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.
Other skills, from other repositories
pr-reviewer
Reviews a diff or security scope read-only using evidence-tiered findings, structural and context-error rubrics, and repository review policy. Use when asked to "review my changes", "structural review", "review for AI patterns", or "security audit". For applying fixes use tidy; for UI defects use ui-design.
autoship
Runs a changesets npm release through the version PR, CI publish, and registry verification. Use when asked to "release this package", "autoship", "merge Version Packages", or diagnose a release that did not publish. For feature PRs use pr-creator or pr-babysitter.
scaffold-cli
Scaffolds a TypeScript CLI and npm package with the house toolchain, dual tsdown outputs, CLI contracts, changesets, and publishing templates. Use when asked to "scaffold a CLI" or "start an npm package". For an existing package release use autoship; for existing API ergonomics use dx-audit.
claw-mux
Control cmux terminal topology and I/O — send commands to panes, read output, split layouts, monitor logs, orchestrate multi-pane workflows. Requires cmux environment.
report-manager
Manage and refine vision-powers reports: list, open, delete, search, and refine sections. Use when asked to list, open, delete, search, or update generated HTML reports.
fetch-sitemap
Extract URLs from an XML sitemap with optional regex filtering.