borghei/Claude-Skills / engineering/deep-module-design
deep-module-design
VerifiedDesign deep modules with small interfaces and rank shallow, pass-through or leaky code for deepening. Use when designing a module interface, improving codebase architecture, or making code easier to test.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.3 KB |
| assets/architecture-review-template.md | markdown | 1.9 KB |
| assets/interface-design-brief-template.md | markdown | 1.5 KB |
| assets/sample_codebase.json | config | 6.4 KB |
| assets/sample_designs.json | config | 3.1 KB |
| references/architecture-review-playbook.md | markdown | 7.2 KB |
| references/depth-principles.md | markdown | 9.5 KB |
| scripts/interface_compare.pyexecutable | script | 8.2 KB |
| scripts/module_depth.pyexecutable | script | 13.3 KB |
assets/sample_designs.json
View on GitHub{
"module": "Order intake (merging OrderService, OrderRepository and validation)",
"required_responsibilities": [
"validate order fields",
"price the order",
"persist the order",
"reject duplicate submissions",
"publish order-placed event",
"retry transient storage failures"
],
"designs": [
{
"name": "A: single command",
"constraint": "smallest possible surface",
"entry_points": [
{"name": "place_order", "params": ["draft"], "errors": ["InvalidOrder", "DuplicateOrder"], "ordering": []},
{"name": "get_order", "params": ["order_id"], "errors": ["NotFound"], "ordering": []}
],
"config_knobs": 0,
"hides": ["validate order fields", "price the order", "persist the order",
"reject duplicate submissions", "publish order-placed event", "retry transient storage failures"],
"leaks": [],
"common_case_calls": 1,
"seams": {"order storage": ["relational adapter", "in-memory adapter"],
"event publisher": ["queue adapter", "recording adapter"]},
"usage_example": "placed = intake.place_order(draft)"
},
{
"name": "B: step-by-step builder",
"constraint": "maximum flexibility",
"entry_points": [
{"name": "create_draft", "params": ["customer_id"], "errors": [], "ordering": []},
{"name": "add_line", "params": ["draft_id", "sku", "quantity"], "errors": ["UnknownSku"], "ordering": ["after create_draft"]},
{"name": "set_address", "params": ["draft_id", "address"], "errors": ["InvalidAddress"], "ordering": ["after create_draft"]},
{"name": "validate", "params": ["draft_id"], "errors": ["InvalidOrder"], "ordering": ["before commit"]},
{"name": "price", "params": ["draft_id", "currency"], "errors": [], "ordering": ["after validate"]},
{"name": "commit", "params": ["draft_id", "idempotency_key"], "errors": ["DuplicateOrder"], "ordering": ["last"]}
],
"config_knobs": 3,
"hides": ["persist the order", "publish order-placed event", "retry transient storage failures"],
"leaks": ["validate order fields", "price the order", "reject duplicate submissions"],
"common_case_calls": 6,
"seams": {"order storage": ["relational adapter"]},
"usage_example": "d = intake.create_draft(c); intake.add_line(d, s, 2); intake.set_address(d, a); intake.validate(d); intake.price(d, 'EUR'); intake.commit(d, key)"
},
{
"name": "C: cart-first",
"constraint": "optimise for the checkout caller",
"entry_points": [
{"name": "place_order_from_cart", "params": ["cart_id", "customer_id"], "errors": ["InvalidOrder", "DuplicateOrder"], "ordering": []},
{"name": "get_order", "params": ["order_id"], "errors": ["NotFound"], "ordering": []}
],
"config_knobs": 1,
"hides": ["validate order fields", "price the order", "persist the order", "reject duplicate submissions"],
"leaks": ["retry transient storage failures"],
"common_case_calls": 1,
"seams": {"order storage": ["relational adapter", "in-memory adapter"]},
"usage_example": "placed = intake.place_order_from_cart(cart_id, customer_id)"
}
]
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |