system-design

Guide modular decomposition and interface design for reusable software modules and APIs.

Updated Aug 30, 2024
One-click install
npx skills add https://github.com/minhtri2710/dotfiles --skill system-design-minhtri2710
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: system-design
Source: https://github.com/minhtri2710/dotfiles/tree/main/dot_config/opencode/skill/system-design
Command: npx skills add https://github.com/minhtri2710/dotfiles --skill system-design-minhtri2710

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Principles for building reusable coding systems to reduce complexity and improve maintainability, including deep modules and information hiding.

Core Features & Use Cases

  • Deep modules: Simple interface with rich internal implementation.
  • Information hiding: Conceal implementation details.
  • Error-out-of-existence: Designing errors so they can't happen.

Quick Start

Apply these principles to design a module, API, or CLI to reduce complexity and improve reuse.

Frequently Asked Questions about system-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a module or API with minimal complexity?

Design modules with deep, information-hiding interfaces: expose simple surfaces while concealing rich implementation details. This reduces cognitive load for users and promotes reuse by minimizing what they need to understand.

What is information hiding in software design?

Information hiding conceals implementation details behind a simple interface, allowing internal complexity without burdening users. It enables independent evolution of internals while maintaining stable contracts.

How do I reduce errors when designing APIs and libraries?

Apply error-out-of-existence principles: design interfaces so errors cannot occur in normal usage. Structure APIs to make incorrect usage impossible or immediately obvious, eliminating runtime failures.

When should I decompose code into separate modules?

Decompose when you can hide implementation complexity behind a simple interface. Modular decomposition works best when it reduces surface area while concentrating related functionality, improving both reusability and maintainability.

Can I refactor existing code to improve module design?

Yes. Reuse-focused refactoring reorganizes code to expose cleaner interfaces and hide complexity. Compare designs before implementation to identify which structure better balances simplicity with functionality.