abstraction-quality

abstraction-quality is a skill for Claude Code from codybrom/clairvoyance. It costs 71 tokens per session (751 once invoked), scanned A, original, MIT.

A review of whether an abstraction genuinely hides complexity or merely adds another layer. An abstraction is a simplified interface that lets callers use something without knowing its internal details.

In plain words
What is it for?
Use it when reviewing wrappers, decorators, class hierarchies, or layered designs that seem to add boilerplate without simplifying use.
Why use it?
Shallow or leaky abstractions can make code harder to understand while still forcing callers to know how the underlying parts work. This review exposes those extra layers and hidden dependencies.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the clairvoyance plugin — 16 skills, 1 agent shipped together

Good fit Use it when reviewing wrappers, decorators, class hierarchies, or layered designs that seem to add boilerplate without simplifying use.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/codybrom/clairvoyance/abstraction-quality
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 codybrom/clairvoyance --skill abstraction-quality
Clone the repo
git clone --depth 1 https://github.com/codybrom/clairvoyance

Made for: Claude Code.

Or install clairvoyance, the plugin that ships this one along with the rest of its 16 skills, 1 agent.

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 abstraction-quality

README.md
[![agentmods](https://agentmods.dev/badge/skills/codybrom/clairvoyance/abstraction-quality.svg)](https://agentmods.dev/skills/codybrom/clairvoyance/abstraction-quality)
Your own site
<a href="https://agentmods.dev/skills/codybrom/clairvoyance/abstraction-quality"><img src="https://agentmods.dev/badge/skills/codybrom/clairvoyance/abstraction-quality.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 751 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.00071 $0.00751
Opus 5 $0.00036 $0.00376
Sonnet 5 $0.00014 $0.00150
Haiku 4.5 $0.00007 $0.00075

Measured 7d ago against content hash 355154a0fb26, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

abstraction-quality 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 7d 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/abstraction-quality/SKILL.md · 64 lines

How it starts

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

Abstraction Quality Review Lens

When invoked with $ARGUMENTS, focus the analysis on the specified file or module. Read the target code first, then apply the checks below.

Evaluate whether abstractions are genuine (hiding complexity) or false (adding layers without reducing what callers must know).

When to Apply

  • Reviewing class hierarchies or layered architectures
  • When an abstraction feels like it adds complexity rather than reducing it
  • When decorator or wrapper patterns are used
  • When two layers seem to operate at the same level of abstraction

Core Principles

Genuine vs. False Abstraction Test

Can callers forget what's underneath? If yes, it's genuine. If callers must peek through to use it correctly, it's false.

Two Ways Abstractions Fail
  • Including unimportant details: The interface leaks implementation concerns. Shows up as wide interfaces, excessive parameters. More common, at least visible.
  • Omitting important details: The interface hides something callers need. More dangerous because it signals nothing. The abstraction appears clean, inviting trust it doesn't deserve.

A file system can safely hide which disk blocks store data. It cannot hide flush rules for durable storage. Databases depend on that guarantee.

Different Layer, Different Abstraction

Each layer should provide a fundamentally different way of thinking about the problem. If two adjacent layers have similar methods, similar parameters, similar concepts, the layering adds cost without value.

Check: compare the interface of each layer. Are they at different conceptual levels? Or is one just a thin rephrasing of the other?

Decorator Pattern Trap

Decorators are structurally committed to shallowness. A decorator that adds one behavior to a class with twenty methods has nineteen pass-throughs and one meaningful method.

For the full decorator-alternatives checklist, see deep-modules' "Decorator Alternatives" section.

Ask whether the new functionality really needs to wrap the existing functionality. If not, implement it independently.

Read the full file on GitHub · 64 lines

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. 7d ago First seen · 64 lines · 71 tokens per session scan A 355154a0fb26

Subscribe to this mod's changes

abstraction-quality is a skill published in the GitHub repository codybrom/clairvoyance (12 stars, last pushed 1mo ago), licensed MIT. It adds 71 tokens to every session and 751 once invoked, about $0.0004 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-08-30.

Related

Other skills, from other repositories

agent-design-best-practices

Best practices for designing Claude Code agent files (.claude/agents/.md). This skill should be used when writing or reviewing agent markdown files to ensure proper design with focused domains, correct tool access, reusable definitions, and separation of capabilities from lifecycle. Combines Anthropic's official…

majiayu000/claude-skill-registry · 73 tokens

agent-cross-review

Structured cross-review protocol between specialized agents. Ensures scope alignment, priority calibration, and domain-aware feedback. Use when one agent reviews another's work, during handoffs, or when validating cross-cutting concerns.

majiayu000/claude-skill-registry · 46 tokens

neo-code-review

Use this skill when the user asks to review or audit source code, a PR, diff, commit, or recent changes for bugs, security, performance, tests, compatibility, or maintainability, duplicated code or logic across files, or hard-coded values. Also use it after an AI agent finishes modifying code to inspect the current…

Benknightdark/neo-skills · 87 tokens

neo-pr

Use this skill when the user asks to create, draft, review, format, or generate a Pull Request (PR) title and description, specify target or source branches for a repository, or convert git branch diffs into concise, high-impact, non-AI-slop PR content.

Benknightdark/neo-skills · 60 tokens

neo-rust

Use this skill when writing, refactoring, debugging, or auditing Rust code. Trigger for .rs files, Cargo projects, ownership/borrowing/lifetime issues, Result/Option error handling, unnecessary clone/performance work, unsafe code review, or modern Rust architecture.

Benknightdark/neo-skills · 58 tokens

go-code-review

Use when reviewing Go code for performance, concurrency safety, security vulnerabilities, or readability issues.

unix2dos/skills · 21 tokens