cpv-strip-dev-submodules

cpv-strip-dev-submodules is a skill for Claude Code from Emasoft/claude-plugins-validation. It costs 85 tokens per session (2,070 once invoked), scanned A, original, MIT.

A tool for moving development-only folders or source code into a separate, version-pinned Git repository so they are not included in an installed plugin.

In plain words
What is it for?
Use it before publishing a plugin, or when creating a separate repository for source used to build a binary.
Why use it?
It reduces the size of published plugins and keeps compile source out of installations while allowing developers to restore it locally.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions .claude-plugin; mentions Claude Code.

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 claude-plugins-validation plugin — 52 skills, 14 commands, 14 agents shipped together

Good fit Use it before publishing a plugin, or when creating a separate repository for source used to build a binary.

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 Emasoft/claude-plugins-validation
Claude Code
/plugin install claude-plugins-validation

Made for: Claude Code.

Or install claude-plugins-validation, the plugin that ships this one along with the rest of its 52 skills, 14 commands, 14 agents.

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 cpv-strip-dev-submodules

README.md
[![agentmods](https://agentmods.dev/badge/skills/emasoft/claude-plugins-validation/cpv-strip-dev-submodules/github.svg)](https://agentmods.dev/skills/emasoft/claude-plugins-validation/cpv-strip-dev-submodules)
Your own site
<a href="https://agentmods.dev/skills/emasoft/claude-plugins-validation/cpv-strip-dev-submodules"><img src="https://agentmods.dev/badge/skills/emasoft/claude-plugins-validation/cpv-strip-dev-submodules/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 cpv-strip-dev-submodules

Your own site · 80×15
<a href="https://agentmods.dev/skills/emasoft/claude-plugins-validation/cpv-strip-dev-submodules"><img src="https://agentmods.dev/badge/skills/emasoft/claude-plugins-validation/cpv-strip-dev-submodules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,070 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.00085 $0.02070
Opus 5.5 $0.00034 $0.00828
Sonnet 5.5 $0.00017 $0.00414
Haiku 4.5 $0.00009 $0.00207

Measured 1mo ago against content hash 3523ee4b7482, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cpv-strip-dev-submodules 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 1mo 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.

skills/cpv-strip-dev-submodules/SKILL.md · 149 lines

How it starts

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

cpv-strip-dev-submodules

Overview

Shrinks a plugin install by moving dev-only folders — or the compile source of a compiled component — out of the plugin tree into a SEPARATE GitHub repository, and recording a {path, url, sha} reference in .claude-plugin/plugin.json under cpv.strip.extract[]. The extracted directory is REMOVED from the plugin tree and no .gitmodules is written, so the content stops shipping. --restore re-clones each reference pinned to its SHA for local development. Loaded dynamically via cpv-the-skills-menu, reached via the Manage → Strip dev parts menu branch.

Corrected threat model — read this before acting

Claude Code RECURSIVELY FETCHES git-submodule CONTENT on install. Verified empirically on perfect-skill-suggester 3.10.8: its installed rust/ submodule carried 1.7 MB of Rust source into the plugin cache. A submodule pointer therefore keeps NOTHING out of a user's install.

Earlier revisions of this skill asserted the opposite — that the installer skipped submodule content, so only a tiny pointer file shipped. That claim is EMPIRICALLY FALSE. An agent following it would ship compile source (and every other "stripped" dev folder) to every user while believing it did not. The claim was corrected in CPV v3.8.0 and the mechanism retargeted in v3.12.0: cpv_strip_dev.py no longer runs git submodule add and never writes .gitmodules. This skill's directory name is historical; there is ONE model — clone by URL.

Prerequisites

  • uv, git, git-filter-repo, gh on PATH; trufflehog for the secret gate
  • Clean working tree, on a branch (not detached HEAD), no stash entries, no untracked files inside the extraction targets
  • For real (non-dry) extraction: gh auth set up + write access to the target owner
  • The extraction source must not be a reserved path (.git, .gitmodules, .claude-plugin, scripts, and the other component dirs)

Instructions

  1. Run --dry-run first to confirm the extraction plan + safety preflight, and to see the exact repo visibility the live run would use.
  2. Run --check in CI to fail if stripped parts have leaked back into MAIN.
  3. Choose the mode: --dry-run (preview), --check (CI gate), --auto (live execution), or --restore (re-clone every recorded reference). Running with NO mode flag is preview-only — the engine prints the plan and a NOTE telling you to pass --auto, then exits without touching GitHub or git history.
  4. Choose the visibility: --visibility private (DEFAULT — a general dev-artefact strip must never auto-publicize) or --visibility public. The ship-only-binary migration passes --visibility public so the plugin's release CI can clone the source repo by URL tokenlessly.
  5. A PUBLIC target is secret-gated FAIL-CLOSED before the push, because git filter-repo preserves the extracted subdirectory's FULL history — a secret buried in an old or deleted commit would leak the instant the repo goes public. STRIP-S001 blocks on any trufflehog finding; STRIP-S002 blocks when the scan cannot be trusted (trufflehog absent, timed out, or exited on an error). A PRIVATE target warns and proceeds. NEVER downgrade to --visibility private to get past a finding — purge the secret from history and retry.
  6. Per-target overrides via --extract <path>/ (default: tests/). A target under 256 KB or under 20 files is skipped as not worth extracting; --force-extract bypasses that threshold (a small crate must still extract).
  7. Each strip operation writes .cpv-strip-state.json for resume on crash.
  8. After a successful strip, devs pull the content back with --restore, which clones each record at its pinned SHA and strips the nested .git so the restored files are plain files, not a gitlink.

Read the full file on GitHub · 149 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. 1mo ago First seen · 149 lines · 85 tokens per session scan A 3523ee4b7482

Subscribe to this mod's changes

cpv-strip-dev-submodules is a skill published in the GitHub repository Emasoft/claude-plugins-validation (4 stars, last pushed 3d ago), licensed MIT. It adds 85 tokens to every session and 2,070 once invoked, about $0.0003 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-03.