deep-modules

A code-review guide for judging whether a module provides substantial behavior through a small, simple interface. An interface is the set of methods, parameters, and data that callers must understand.

In plain words
What is it for?
Use it to review classes, modules, and APIs, especially when there are many parameters, many forwarding methods, or several small components with limited responsibilities.
Why use it?
It helps identify designs where callers handle too many details or where many small classes cooperate to do one job. It also supports decisions about whether to combine or deepen modules during refactoring.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/codybrom/clairvoyance/deep-modules
Any agent
npx skills add codybrom/clairvoyance --skill deep-modules
Clone the repo
git clone --depth 1 https://github.com/codybrom/clairvoyance

Made for: Claude Code, Codex.

Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,750 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00071 $0.01750
Opus 5 $0.00036 $0.00875
Sonnet 5 $0.00014 $0.00350
Haiku 4.5 $0.00007 $0.00175

Measured 2d ago against content hash d6f6a369bf53, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

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/deep-modules/SKILL.md · 142 lines

How it starts

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

Deep Modules 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 modules provide powerful functionality through simple interfaces.

When to Apply

  • Reviewing a new class, module, or API design
  • When a module feels like it "doesn't do enough" or has too many parameters
  • When you see many small classes collaborating to do one thing
  • When a method signature closely mirrors what it calls
  • During refactoring to decide what to merge or deepen

Core Principles

The Depth Principle

Every module gives functionality and costs knowledge (in the form of an interface). Deep modules give a lot and ask for very little, delivering the highest return on interface cost. This is the same interface-vs-implementation-cost asymmetry pull-complexity-down's "Core Asymmetry" applies to caller burden — here it's applied to depth.

The deepest possible module can even have no interface at all. Garbage collection is the classic example: it does enormously complex work that callers never think about.

Importantly, interfaces are also bigger than they look. The visible part is the formal interface: signatures, types, and exceptions. The invisible part is the informal interface: ordering rules, side effects, performance characteristics, and thread safety assumptions. The informal interface is usually larger and more dangerous. When the invisible part goes undocumented, callers end up with dependencies they don't know exist, creating new unknown unknowns.

The Depth Test

For each module under review:

  1. How many things must a caller know to use this correctly?
  2. How much work does the module do behind that interface?
  3. Could a caller skip this module and do the work directly with similar effort?

If #3 is "yes," the module is shallow.

A concrete signal: if the documentation for a method would be longer than its implementation, it is shallow.

Read the full file on GitHub · 142 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. 2d ago First seen · 142 lines · 71 tokens per session scan A d6f6a369bf53

Subscribe to this mod's changes

deep-modules 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 1,750 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-architecture-planner

Use when designing an autonomous agent, planning agent architecture, building a scheduled automation, or creating a Claude Code agent workflow. Triggers: 'design an agent', 'build an automation', 'agent architecture', 'automate this workflow', 'create a scheduled agent', 'shell script agent'.

majiayu000/claude-skill-registry · 64 tokens

81-pipecat

Create your Pipecat skill from official documentation, then learn to improve it throughout the chapter.

majiayu000/claude-skill-registry · 18 tokens

2026-legal-research-agent

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape. Activate on "find expungement data", "scrape state laws", "legal research", "court URLs", "statute sources", "Clean Slate laws", "automatic…

majiayu000/claude-skill-registry · 103 tokens

80-livekit-agents-majiayu000-claude-skill-registr

Create your LiveKit Agents skill from official documentation, then learn to improve it throughout the chapter.

majiayu000/claude-skill-registry · 18 tokens

ac-lock

Phase 4.0 — Acceptance Criteria lock checkpoint before implementation. Consolidates all ACs from PRD, TechSpec, and Tasks, presents to user for confirmation, and saves the locked AC list to accepted-criteria.md. Implementation only starts after explicit user confirmation.

majiayu000/claude-skill-registry · 57 tokens

advisor-triggers

Detects when user requests warrant critical analysis via /advise command.

majiayu000/claude-skill-registry · 17 tokens