AgentSkillsCN

module-depth

审查模块的深度与浅度。适用于设计API、审查类接口或评估抽象价值时使用。

SKILL.md
--- frontmatter
name: module-depth
description: Reviews modules for depth vs shallowness. Use when designing APIs, reviewing class interfaces, or evaluating abstraction value.
allowed-tools: Read, Grep, Glob

Module Depth Reviewer

Deep modules provide powerful functionality behind simple interfaces.

Deep vs Shallow

  • Deep (good): Few methods, minimal parameters → hides significant complexity
  • Shallow (bad): Many methods, many parameters → little actual functionality

Examples of deep: Unix file I/O (5 calls hide tremendous complexity), TCP sockets, garbage collectors.

Signs of Shallow Modules

  • Pass-through methods (same signature delegation)
  • Decorators adding no real value
  • Over-decomposition into tiny classes
  • Parameter explosion

Evaluation Criteria

Interface: Public method count, parameters per method, concepts callers must understand Implementation: What complexity is hidden? Real work or mostly delegation? Information Hiding: Implementation details visible? Can it change without affecting callers?

Output

Per module: interface complexity, functionality depth, assessment. Recommendations: combine shallow modules, simplify interfaces, hide more complexity.