skills/modelscope.cn/abstraction-laws

abstraction-laws

Installation
SKILL.md

Abstraction Laws

When to use

  • You see the same code shape in 3+ places and want to unify it.
  • Refactors stall on “how general should this be?”.
  • Parameter clusters repeat across modules.
  • Algebraic cues show up (map/fold/compose, identity/associativity, combine/merge ops).

Quick start

  1. Collect 3+ concrete instances (file:line).
  2. Classify similarity: essential (domain) vs accidental (incidental implementation).
  3. Run the seam test (can callers stay ignorant of the concrete variant?).
  4. Name the abstraction by behavior.
  5. If algebraic, pick the minimal construction and add one executable law check.
Installs
1
First Seen
Aug 23, 2026
abstraction-laws from modelscope.cn