cva-analysis

cva-analysis is a skill for Claude Code from rjmurillo/ai-agents. It costs 58 tokens per session (4,208 once invoked), scanned A, original, MIT.

A way to compare several similar requirements by separating what stays the same from what changes. The comparison helps reveal whether an abstraction or reusable design is actually needed.

In plain words
What is it for?
Use it to discover natural abstractions, compare requirements, and identify reusable design patterns without selecting a pattern in advance.
Why use it?
Choosing a reusable design too early can make software harder to change. This analysis bases the design on observed similarities and differences between use cases.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Part of the project-toolkit plugin — 95 skills, 26 commands, 33 agents, 4 hooks shipped together

Good fit Use it to discover natural abstractions, compare requirements, and identify reusable design…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rjmurillo/ai-agents/cva-analysis
Install

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.

Any agent
npx skills add rjmurillo/ai-agents --skill cva-analysis
Clone the repo
git clone --depth 1 https://github.com/rjmurillo/ai-agents

Made for: Claude Code.

Or install project-toolkit, the plugin that ships this one along with the rest of its 95 skills, 26 commands, 33 agents, 4 hooks.

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 cva-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/rjmurillo/ai-agents/cva-analysis.svg)](https://agentmods.dev/skills/rjmurillo/ai-agents/cva-analysis)
Your own site
<a href="https://agentmods.dev/skills/rjmurillo/ai-agents/cva-analysis"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/cva-analysis.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,208 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.00058 $0.04208
Opus 5 $0.00029 $0.02104
Sonnet 5 $0.00012 $0.00842
Haiku 4.5 $0.00006 $0.00421

Measured 2d ago against content hash 43e45215d0c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

cva-analysis 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/validate-cva-matrix.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/cva-analysis/SKILL.md · 457 lines

How it starts

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

CVA Analysis - Discover Natural Abstractions

Commonality Variability Analysis (CVA) is a systematic technique for discovering abstractions from requirements. Instead of choosing patterns first, you build a matrix showing what's COMMON (constant across use cases) vs what VARIES (differs between cases). Patterns emerge naturally from the matrix structure.

Core Insight: Rows (commonalities) map to Strategy pattern. Columns (variabilities) map to Abstract Factory pattern. The matrix reveals whether abstraction is needed at all.

From CLAUDE.md Design Philosophy: "Greatest vulnerability is wrong or missing abstraction." CVA prevents wrong abstractions by making pattern selection evidence-based, not intuition-based.

Triggers

Activate CVA when you encounter:

  • discover abstractions for {domain}
  • run CVA analysis on {requirements}
  • commonality variability analysis
  • prevent wrong abstraction
  • what patterns emerge from {use cases}

Quick Reference

Phase Purpose Input Output Time
1. Identify Commonalities Find what's constant across ALL use cases Use cases/requirements List of commonalities (matrix rows) 5-10 min
2. Identify Variabilities Find what VARIES between use cases Commonalities + use cases List of variabilities (matrix columns) 5-10 min
3. Build Matrix Visualize commonality × variability relationships Rows + columns CVA matrix (Markdown table) 5-15 min
4. Map to Patterns Translate matrix structure to design patterns Completed matrix Pattern recommendations + rationale 5-10 min
5. Validate & Handoff Validate choices, route to appropriate agents Pattern recommendations Validation report + ADR stub 5-10 min

Total Time: Quick (15 min), Standard (30 min), Deep (60 min)

When to Use

Use CVA when:

  • Facing 2+ similar but varying requirements
  • About to select a design pattern (validate with CVA first)
  • Refactoring code with duplicated logic
  • Need evidence for abstraction decisions (ADR material)
  • Team debates whether to abstract (make implicit explicit)

Read the full file on GitHub · 457 lines

Files

What ships with it

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

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. 2d ago First seen · 457 lines · 58 tokens per session scan A 43e45215d0c6

Subscribe to this mod's changes

cva-analysis is a skill published in the GitHub repository rjmurillo/ai-agents (45 stars, last pushed today), licensed MIT. It adds 58 tokens to every session and 4,208 once invoked, about $0.0003 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-03.