Show ContextShield status and waste protection stats; suggest or apply .contextignore rules from historical waste

MITAuto-check passed

Install Cco Shield

skills CLI
$ npx skills add egorfedorov/claude-context-optimizer --skill cco-shield -a claude-code

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

GitHub CLI
$ gh skill install egorfedorov/claude-context-optimizer cco-shield --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/egorfedorov/claude-context-optimizer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cco-shield .claude/skills/cco-shield && 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
cco-shield
GitHub stars
114
Token cost
~457 tokens
SKILL.md length
170 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

Show ContextShield status and waste protection stats; suggest or apply .contextignore rules from historical waste

  • Works in 4 steps: ContextShield Status: Active (it's… → Protected Files: List files with 3+… → Tokens Saved: Estimate based on waste… → …
  • SKILL.md covers Subcommands and Status report (default)
  • Calls node

What it does

Cco Shield is an agent skill from egorfedorov/claude-context-optimizer. Show ContextShield status and waste protection stats; suggest or apply .contextignore rules from historical waste

Its SKILL.md is about 460 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: Claude Code plugin that tracks token usage, identifies wasted context, and saves 30-50% on API costs. Heatmaps, ROI reports, budget alerts, efficiency scores, git-aware… The licence is MIT.

Example prompts

  • “/cco-shield”

Requirements

  • Pre-approved tools (allowed-tools): Bash(node ${CLAUDE_PLUGIN_ROOT}/src/context-shield.js:*), Bash(node ${CLAUDE_PLUGIN_ROOT}/src/tracker.js:*), Read

Workflow steps

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

  1. ContextShield Status: Active (it's always active as a PreToolUse hook)
  2. Protected Files: List files with 3+ waste sessions — these trigger warnings before Read
  3. Tokens Saved: Estimate based on waste history (files that would have been read without shield)
  4. Co-occurrence Groups: Files that are usually edited together

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(node ${CLAUDE_PLUGIN_ROOT}/src/context-shield.js:*)
    • Bash(node ${CLAUDE_PLUGIN_ROOT}/src/tracker.js:*)
    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node

    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

Cco Shield loads about 457 tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 170 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~31
When it runs · the whole SKILL.md, loaded when a task matches
~457

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from egorfedorov/claude-context-optimizer at commit f6f20ee, republished under its MIT licence (© egorfedorov). 170 words, ~457 tokens.

Download SKILL.mdSave it as .claude/skills/cco-shield/SKILL.md (or your agent's skills folder).
name
cco-shield
description
Show ContextShield status and waste protection stats; suggest or apply .contextignore rules from historical waste
allowed-tools
Bash(node ${CLAUDE_PLUGIN_ROOT}/src/context-shield.js:*), Bash(node ${CLAUDE_PLUGIN_ROOT}/src/tracker.js:*), Read
license
MIT

ContextShield Status

Show the user the current ContextShield protection status and historical waste prevention stats.

Subcommands

If the user asked for suggestions (/cco-shield suggest) or to apply them (/cco-shield apply), run instead:

bash
node ${CLAUDE_PLUGIN_ROOT}/src/context-shield.js suggest   # preview .contextignore candidates
node ${CLAUDE_PLUGIN_ROOT}/src/context-shield.js apply     # append them to ./.contextignore

suggest lists files wasted in 3+ sessions as ready-to-use .contextignore patterns with per-session token savings. apply appends them (deduped against existing rules) so those reads are blocked permanently. Show the output as-is.

Status report (default)

Run the following command to get pattern data:

bash
node ${CLAUDE_PLUGIN_ROOT}/src/tracker.js patterns

From the patterns data, present:

  1. ContextShield Status: Active (it's always active as a PreToolUse hook)
  2. Protected Files: List files with 3+ waste sessions — these trigger warnings before Read
  3. Tokens Saved: Estimate based on waste history (files that would have been read without shield)
  4. Co-occurrence Groups: Files that are usually edited together

Format as a clean status report. If no pattern data exists yet, tell the user: "ContextShield is warming up! It learns from your usage patterns and will start giving you smart suggestions after a few sessions."

End the report with:

ContextShield runs automatically on every Read. No configuration needed.

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

Files

Just SKILL.md in skills/cco-shield of egorfedorov/claude-context-optimizer.

Open the folder on GitHubat commit f6f20ee

Compare with similar skills

Cco Shield 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.

Cco Shield compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cco Shield this skillegorfedorov/claude-context-optimizer114—~457Automated safety check: PassMIT
Caveman StatsJuliusBrussee/caveman111k—~491Automated safety check: PassApache-2.0
Suggestion Boxpaperclipai/paperclip99k—~1.3kAutomated safety check: PassMIT
Suggest Automationsn8n-io/n8n207k—~2kAutomated safety check: PassCustom licence
Statsagenticnotetaking/arscontexta3.5k—~3.1kAutomated safety check: NotesMIT
Ctx Statsmksglu/context-mode26k—~290Automated safety check: PassCustom licence

Similar skills

  • Caveman Stats

    JuliusBrussee/caveman

    Show recorded output and cache-read token usage and mode attribution for the current Claude Code session, or locate the host's native usage report.

    111k GitHub stars~491 tokensUpdated yesterday
    Auto-check passed
  • Suggestion Box

    paperclipai/paperclip

    Quietly suggest a concrete improvement after observing material, generalizable friction in agent work.

    99k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Official

    Offer the three most common automations for a user as a single-choice card, from your own knowledge of their team and their apps, then build the one they choose once they confirm, or offer more.

    207k GitHub stars~2k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Stats

    agenticnotetaking/arscontexta

    Show vault statistics and knowledge graph metrics. An agent skill from agenticnotetaking/arscontexta.

    3.5k GitHub stars~3.1k tokensUpdated 7 mo ago
    Knowledge ManagementAuto-check: notes
  • Ctx Stats

    mksglu/context-mode

    Show how much context window context-mode saved this session.

    26k GitHub stars~290 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Cco Review

    alirezarezvani/claude-skills

    /cs:cco-review <plan — Retention-obsessed Chief Customer Officer interrogation of any plan that touches customer retention, segmentation, CS team sizing, or CS team hiring.

    28k GitHub stars~1.3k tokensUpdated 1 mo ago
    Marketing & SEOAuto-check passed

More from egorfedorov/claude-context-optimizer

All 13 skills in this repo
  • Smart Loader

    egorfedorov/claude-context-optimizer

    Automatically suggests optimal files to preload based on the user's task description and historical context patterns.

    114 GitHub stars~530 tokensUpdated 10 days ago
    Auto-check passed
  • Cco

    egorfedorov/claude-context-optimizer

    Context Control Center — one screen for budget, $ spent, tokens saved, waste, last prompt grade, the active task, and ready-to-run optimization actions

    114 GitHub stars~465 tokensUpdated 10 days ago
    Auto-check passed
  • Cco Budget

    egorfedorov/claude-context-optimizer

    Configure token budget limits, auto-compact settings, and view current budget status (model-aware — Claude 5 lineup, Opus 5.5 default fallback, full 1M context at standard price)

    114 GitHub stars~808 tokensUpdated 10 days ago
    Auto-check passed
  • Cco Config

    egorfedorov/claude-context-optimizer

    View and tune CCO's behavior thresholds — re-read warnings, cache staleness, prompt-coach length bands, and the /cco-pack budget cap

    114 GitHub stars~839 tokensUpdated 10 days ago
    Auto-check passed
  • Cco Patterns

    egorfedorov/claude-context-optimizer

    Share learned file patterns across a team — export an anonymized digest of what's usually waste/useful/co-edited, and import a teammate's so a fresh clone benefits day one

    114 GitHub stars~665 tokensUpdated 10 days ago
    Auto-check passed
  • Cco Task

    egorfedorov/claude-context-optimizer

    Organize work by task, track tokens/cost per task, and keep a small patchable execution state that is re-injected after /compact (SKILL.state-style) — start a task, patch its state, list tasks, or…

    114 GitHub stars~866 tokensUpdated 10 days ago
    Auto-check passed

Questions about Cco Shield

What does Cco Shield do?

Show ContextShield status and waste protection stats; suggest or apply .contextignore rules from historical waste. Cco Shield is an agent skill from egorfedorov/claude-context-optimizer.

How do I install Cco Shield in Claude Code?

Run `npx skills add egorfedorov/claude-context-optimizer --skill cco-shield -a claude-code`. Or copy the skill folder (skills/cco-shield in egorfedorov/claude-context-optimizer) into .claude/skills/cco-shield in your project. Claude Code loads it when a task matches its description.

How do I install Cco Shield in Codex?

Run `npx skills add egorfedorov/claude-context-optimizer --skill cco-shield -a codex`. Or copy the skill folder (skills/cco-shield in egorfedorov/claude-context-optimizer) into .agents/skills/cco-shield in your project. Codex loads it when a task matches its description.

Can I use Cco Shield 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 egorfedorov/claude-context-optimizer --skill cco-shield -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cco-shield, .gemini/skills/cco-shield, .github/skills/cco-shield and .opencode/skills/cco-shield in your project.

What does Cco Shield need to run?

Going by SKILL.md and its folder, Cco Shield needs the command-line tools its instructions call (node). Its frontmatter pre-approves these tools: Bash(node ${CLAUDE_PLUGIN_ROOT}/src/context-shield.js:*), Bash(node ${CLAUDE_PLUGIN_ROOT}/src/tracker.js:*), Read.

Does Cco Shield 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 Cco Shield 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. Review the folder before installing.

What licence does Cco Shield use?

Cco Shield is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cco Shield use?

About 457 tokens (SKILL.md is roughly 1.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cco Shield?

Skills that share tags, products or a category with Cco Shield: Caveman Stats (JuliusBrussee/caveman, 111k stars), Suggestion Box (paperclipai/paperclip, 99k stars), Suggest Automations (n8n-io/n8n, 207k stars) and Stats (agenticnotetaking/arscontexta, 3.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cco Shield?

egorfedorov (a GitHub user) maintains it in egorfedorov/claude-context-optimizer, which has 114 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 30, 2026.

Source: egorfedorov/claude-context-optimizer on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.