protect

protect is a skill for Claude Code from melodic-software/claude-code-plugins. It costs 101 tokens per session (2,813 once invoked), scanned A, original, MIT.

A performance regression guard that records a checked-in maximum for a measured counter and checks it in continuous integration (CI), the automated build and test process. A later increase makes the build fail, while a lower value can suggest lowering the limit.

In plain words
What is it for?
Use it after verifying a performance improvement to protect a counter such as a resource count. It proposes files for a person to approve and merge, rather than changing or merging them itself.
Why use it?
Performance improvements can disappear when later code changes add the cost back. This creates a repeatable check without relying on unstable timing measurements or running an AI model in CI.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the performance plugin — 4 skills shipped together

Good fit Use it after verifying a performance improvement to protect a counter such as a resource count. It proposes files for a person to approve and merge, rather than changing or merging them itself.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add melodic-software/claude-code-plugins
Claude Code
/plugin install performance

Made for: Claude Code.

Or install performance, the plugin that ships this one along with the rest of its 4 skills.

Wrote 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.

agentmods badge for protect

README.md
[![agentmods](https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/protect/github.svg)](https://agentmods.dev/skills/melodic-software/claude-code-plugins/protect)
Your own site
<a href="https://agentmods.dev/skills/melodic-software/claude-code-plugins/protect"><img src="https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/protect/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for protect

Your own site · 80×15
<a href="https://agentmods.dev/skills/melodic-software/claude-code-plugins/protect"><img src="https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/protect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,813 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00101 $0.02813
Opus 5.5 $0.00040 $0.01125
Sonnet 5.5 $0.00020 $0.00563
Haiku 4.5 $0.00010 $0.00281

Measured 18d ago against content hash 9319b71fe713, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

protect 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 18d ago.

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.

plugins/performance/skills/protect/SKILL.md · 222 lines

How it starts

The opening of the file, as written. The whole thing — 222 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Arguments. [<counter or claim>]. e.g. /performance:protect the 4-to-1 spawn reduction

Purpose

Answers "what keeps this win from eroding?"

Performance wins decay in a codebase that keeps moving: nothing asserts the new cost, so the next change that adds it back passes every test. A checked-in counter ceiling, checked in CI, turns the win into a build failure the next regression has to answer.

Run it once, after /performance:verify reports MET on a counter. It proposes files; a human approves them. It never merges, and no model runs in CI: the check is a script and a number.

Read ${CLAUDE_PLUGIN_ROOT}/reference/techniques.md#g-protect-the-win for the technique entries this skill applies.

1. Choose the counter

  • Counters only, never durations. A duration ceiling moves with runner load, fails at random, and teaches people to raise it. Ratchet the headline counter from the verify report.
  • Measure it in the state CI will see. A counter behind a cache has a cold value and a warm value; a guard with a per-user cache can count 6 spawns cold and 1 warm. CI runners start cold, so a ceiling measured warm fails there. Pin the state in the command (unset or empty the cache location), and measure that.
  • It must be deterministic. ratchet.py add measures twice and refuses a counter whose two runs disagree (${CLAUDE_PLUGIN_ROOT}/reference/harness-integrity.md rule 1). Fix what varies before ratcheting.

2. The ceilings file

Propose .performance/ratchets.json, created by python3 ${CLAUDE_PLUGIN_ROOT}/scripts/ratchet.py add --name <n> --field <f> --goal <g> --command <cmd> from the repository root:

{"counters": [{"name": "guard-spawns", "command": "<shell command>", "field": "spawns",
               "ceiling": 6, "goal": "<the verified goal this protects>"}]}
  • command runs through the shell from the repository root and prints a <field>=<number> token.
  • The command must exit non-zero when the subject fails. A subject that errors out early spends fewer spawns and passes any ceiling. spawn-census.sh exits 0 whatever the subject did and prints rc=<n>, so append | grep -F ' rc=0 '.
  • The ceiling is the measured value, never a round number above it. Headroom is room for a regression.
  • CI has no plugin installed, so the proposal vendors ratchet.py (one stdlib file) into the repository, for example .performance/ratchet.py, unless the repository already carries it.

Read the full file on GitHub · 222 lines

Files

What ships with it

1 file 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.

Changes

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.

  1. 18d ago Changed · +27 lines 9319b71fe713
  2. 20d ago Changed · +2 lines 4a29423c052a
  3. 25d ago First seen · 193 lines · 101 tokens per session scan A e4f337f02c3f

Subscribe to this mod's changes

protect is a skill published in the GitHub repository melodic-software/claude-code-plugins (26 stars, last pushed today), licensed MIT. It adds 101 tokens to every session and 2,813 once invoked, about $0.0004 per session on Opus 5.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-25.