Agent skill

Software Design Philosophy

by luoling8192 in luoling8192/software-design-philosophy-skill

Software design philosophy guide based on John Ousterhout's "A Philosophy of Software Design." Use this skill during: code reviews, architecture discussions, API design, module decomposition…

MITAuto-check passedDevelopment

Install Software Design Philosophy

skills CLI
$ npx skills add luoling8192/software-design-philosophy-skill --skill software-design-philosophy -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install luoling8192/software-design-philosophy-skill software-design-philosophy --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
software-design-philosophy
GitHub stars
346
Token cost
~3.4k tokens
SKILL.md length
1,699 words
Files
4
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Software design philosophy guide based on John Ousterhout's "A Philosophy of Software Design." Use this skill during: code reviews, architecture discussions, API design, module decomposition…

  • Works in 3 steps: Change Amplification: A seemingly simple… → Cognitive Load: Developers must absorb a… → Unknown Unknowns: It's unclear which…
  • The user mentions code is too complex
  • SKILL.md covers I. Complexity: Know the Enemy, II. Strategic vs. Tactical…, III. Deep Modules: The Most… and IV. Information Hiding and…, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Software Design Philosophy is an agent skill from luoling8192/software-design-philosophy-skill. Software design philosophy guide based on John Ousterhout's "A Philosophy of Software Design." Use this skill during: code reviews, architecture discussions, API design, module decomposition decisions, refactoring guidance, complexity analysis, naming and commenting improvements, error handling strategy design. Trigger when the user mentions "code is too complex", "how to split modules", "interface design", "reduce coupling", "deep/shallow modules", "information leakage", "error handling", "code readability"…

Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `README.md` and `codex-skill.md`).

It sits in Development, covering API design, Code review and Design review and critique. The repository describes itself as: Claude Code skill: Software design philosophy guide based on A Philosophy of Software Design by John Ousterhout. The licence is MIT.

When your agent uses it

  • The user mentions code is too complex
  • How to split modules
  • Interface design
  • Reduce coupling

Example prompts

  • “A Philosophy of Software Design.”
  • “code is too complex”
  • “how to split modules”
  • “/software-design-philosophy”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Change Amplification: A seemingly simple change requires code modifications in many different places.
  2. Cognitive Load: Developers must absorb a large amount of information to complete a task safely. Note: fewer lines of code ≠ simpler…
  3. Unknown Unknowns: It's unclear which code must be modified or what information is needed to complete a task. This is the most dangerous…

What it can do on your machine

Read from SKILL.md and the folder at commit 1a93214. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Software Design Philosophy loads about 3.4k tokens when it runs. Until then it costs about 179 tokens; SKILL.md has 1,699 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~179
When it runs · the whole SKILL.md, loaded when a task matches
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from luoling8192/software-design-philosophy-skill at commit 1a93214, republished under its MIT licence (© luoling8192). 1,699 words, ~3,353 tokens.

Download SKILL.mdSave it as .claude/skills/software-design-philosophy/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
software-design-philosophy
description
Software design philosophy guide based on John Ousterhout's "A Philosophy of Software Design." Use this skill during: code reviews, architecture discussions, API design, module decomposition decisions, refactoring guidance, complexity analysis, naming and commenting improvements, error handling strategy design. Trigger when the user mentions "code is too complex", "how to split modules", "interface design", "reduce coupling", "deep/shallow modules", "information leakage", "error handling", "code readability", "design philosophy", "pull complexity down", "define errors out of existence", or similar topics. Also trigger for any code review where design quality feedback is requested.

A Philosophy of Software Design — Distilled Guide

Source: John Ousterhout, A Philosophy of Software Design Central thesis: The core challenge of software design is managing complexity.


I. Complexity: Know the Enemy

Definition

Complexity is anything related to the structure of a software system that makes it hard to understand and modify. Complexity is not the same as system size — a small system can be complex, and a large well-designed system can be manageable.

Three Symptoms of Complexity
  1. Change Amplification: A seemingly simple change requires code modifications in many different places.
  2. Cognitive Load: Developers must absorb a large amount of information to complete a task safely. Note: fewer lines of code ≠ simpler — sometimes more code is actually simpler because it reduces cognitive load.
  3. Unknown Unknowns: It's unclear which code must be modified or what information is needed to complete a task. This is the most dangerous symptom.
Two Root Causes
  1. Dependencies: A piece of code cannot be understood or modified in isolation; it relates to other code that must also be considered.
  2. Obscurity: Important information is not obvious — vague names, missing docs, implicit conventions, hidden constraints.
Key Insight
  • Complexity is incremental: It's not caused by a single catastrophic error; it accumulates through thousands of small decisions.
  • Therefore you must adopt a zero-tolerance mindset — every bit of "minor" complexity matters.

II. Strategic vs. Tactical Programming

Tactical Programming (Anti-pattern)
  • Goal: get features working as quickly as possible.
  • Mindset: "Just make it work", "We'll refactor later."
  • Result: complexity accumulates fast, tech debt spirals out of control.
  • Goal: produce great design; working code is a byproduct.
  • Mindset: invest roughly 10–20% of development time in design improvements.
  • Practices:
    • Look for opportunities to improve design with every change.
    • Working code is not enough — design quality matters equally.
    • The increments of software development should be abstractions, not features.

III. Deep Modules: The Most Important Design Concept

Core Metaphor

Think of a module as a rectangle:

  • Width = complexity of its interface
  • Height/Depth = amount of functionality hidden inside

Deep module: simple interface, rich implementation. (Good design) Shallow module: complex interface, does very little. (Bad design 🚩)

Classic Examples
  • Deep: Unix file I/O — just 5 syscalls (open, read, write, lseek, close) expose a powerful file system.
  • Shallow: Java I/O — reading a file requires composing FileInputStream, BufferedInputStream, ObjectInputStream, etc.
Practical Principles
  • Design interfaces so the most common usage is as simple as possible.
  • A simple interface matters more than a simple implementation.
  • Rare use cases can accept more complex calling patterns, but the common path should never pay for them.

IV. Information Hiding and Information Leakage

Information Hiding
  • Each module should encapsulate design decisions (knowledge), exposing only a simplified interface.
  • Hidden information includes: data structures, algorithms, low-level mechanisms, policy decisions.
  • Information hiding minimizes inter-module dependencies.
Information Leakage 🚩 Red Flag
  • When the same design decision is reflected in multiple modules, information has leaked.
  • Temporal decomposition is a common source: splitting modules by execution order (rather than by information hiding) causes steps to share excessive knowledge.
Fixing Leakage
  • Merge shared knowledge into a single module.
  • If merging isn't possible, unify the shared information behind a single deep module.

V. General-Purpose vs. Special-Purpose Modules

Core Principle: General-purpose modules are usually deeper.
  • A general interface is simpler than a specialized one because it covers more use cases with fewer methods.
  • When designing a new module, ask: What is the most general-purpose interface that can satisfy my current needs?
Judgment Criteria
  • The interface should be general enough to support multiple use cases without modification.
  • But the implementation can do only what's currently needed (don't over-build).
  • General-purpose and special-purpose code should be cleanly separated.

VI. Different Layers, Different Abstractions

Principle
  • A software system has multiple layers; each layer should provide a different abstraction from its adjacent layers.
  • If two layers have similar abstractions, the layering is wrong.
Pass-Through Method 🚩 Red Flag
  • A method that does almost nothing except forward its arguments to another method with a similar signature.
  • This signals that the layers don't offer different abstractions — the responsibility split is flawed.
Pass-Through Variable 🚩 Red Flag
  • A variable threaded from top to bottom through layers that don't use it.
  • Solutions: context objects, dependency injection, or rethinking module boundaries.

VII. Pull Complexity Downward

Core Principle
  • When complexity is unavoidable, the module should absorb it internally rather than pushing it to callers.
  • Most modules have more users than developers — it's better for developers to suffer than for every user to suffer.
Anti-patterns
  • Turning hard decisions into configuration parameters and pushing them to sysadmins.
  • Throwing exceptions for uncertain conditions and letting callers handle them.
  • These save effort in the short term but amplify complexity system-wide.

VIII. Define Errors Out of Existence

Core Insight
  • Exception handling is one of the biggest sources of complexity.
  • Reducing the number of exceptions that must be handled is one of the best techniques for reducing complexity.
Strategies
  1. Redefine semantics so the error condition cannot arise.

    • Example: unset(key) succeeds even if the key doesn't exist — it simply guarantees "after the call, the key does not exist."
    • Example: substring(start, end) auto-clips out-of-bounds parameters instead of throwing.
  2. Exception Masking: Detect and handle exceptions at a low level so they never reach callers.

  3. Exception Aggregation: Handle multiple exception types in one centralized place instead of scattering handlers at every call site.

Important Distinction
  • This is not about ignoring errors — it's about designing better semantics so error conditions simply aren't errors.
  • Errors that truly require reporting (e.g., lost network packets) must still be handled properly.

IX. Design It Twice

  • For any important design decision, conceive at least two different approaches before choosing.
  • Even if the first idea seems great, force yourself to think of an alternative.
  • Comparison dimensions: interface simplicity, generality, performance, implementation difficulty.
  • This habit significantly improves design quality.

X. The Philosophy of Comments

Why Write Comments
  1. Comments capture design decisions and intent that code cannot express.
  2. Comments are part of the abstraction — good interface docs mean users don't have to read the implementation.
  3. Writing comments early exposes design problems before you invest in code.
  4. Good comments dramatically reduce cognitive load.
Show full SKILL.md (684 more words)Show less
What Comments Should Describe
  • Non-obvious information: the why, constraints, boundary conditions, side effects — things you can't see in the code.
  • Comments should NOT repeat what the code already says. 🚩 Red Flag: Comment Repeats Code
Comment Layers
  • Interface comments: describe what and why — no implementation details.
  • Implementation comments: explain how and why this approach — why the code is written this way.
  • Cross-module comments: document design decisions and dependencies that span module boundaries.
Comments-First Approach
  • Write interface comments before writing the implementation — use comments as a design tool.
  • If you can't write a clear comment, the design itself probably has a problem.

XI. The Art of Naming

Standards for Good Names
  • Precise: conveys meaning to the reader without ambiguity.
  • Consistent: the same name always means the same thing across the codebase.
  • Informative: a good name is lightweight documentation by itself.
Naming Red Flags 🚩
  • Vague names: too generic (e.g., data, result, tmp, info) — carry no useful information.
  • Hard to name: if you struggle to find a precise, intuitive name for an entity, the design itself may be flawed.

XII. Consistency

  • Handle the same thing the same way throughout the entire system.
  • Consistency covers: naming, coding style, interface patterns, design patterns, invariants.
  • Consistency dramatically reduces cognitive load — once a developer learns one pattern, it applies everywhere.
  • Don't break consistency for "better" unless the improvement is significant enough and the old way can be fully replaced.

XIII. Code Should Be Obvious

Goal
  • A reader should be able to quickly understand the behavior and intent of code without significant mental effort.
  • Obviousness is the ultimate test of good design.
Techniques for Obvious Code
  • Good naming and consistency.
  • Judicious use of whitespace and formatting to reveal structure.
  • Comments that explain the non-obvious.
  • Avoid implicit control flow in event-driven code (unless necessary).
Non-Obvious Code 🚩 Red Flag
  • If a reader cannot easily understand the behavior or meaning of a piece of code, it is not obvious enough.

XIV. Red Flags Quick Reference

Use these signals during code reviews and self-reviews:

SignalMeaning
Shallow ModuleInterface is nearly as complex as its implementation
Information LeakageSame design decision reflected in multiple modules
Temporal DecompositionModules split by execution order, not information hiding
OverexposureCommon API forces callers to know about rarely-used features
Pass-Through MethodMethod just forwards args to another method with similar signature
RepetitionNon-trivial code duplicated across locations
Special-General MixtureGeneral-purpose and special-purpose code not cleanly separated
Conjoined MethodsUnderstanding one method requires understanding another
Comment Repeats CodeComment is just an English translation of the code
Impl Contaminates InterfaceInterface docs expose implementation details users don't need
Vague NameName too generic to convey useful information
Hard to Pick NameCan't find a precise, intuitive name — design may be flawed
Hard to DescribeDocumentation must be long to be complete — module may be too complex
Non-Obvious CodeBehavior or meaning of code is not easily understood

XV. Design Principles Summary

  1. Complexity is incremental — sweat the small stuff.
  2. Working code isn't enough.
  3. Make continual small investments to improve system design.
  4. Modules should be deep.
  5. Interfaces should make the most common usage as simple as possible.
  6. A simple interface matters more than a simple implementation.
  7. General-purpose modules are deeper.
  8. Separate general-purpose and special-purpose code.
  9. Different layers should have different abstractions.
  10. Pull complexity downward.
  11. Define errors (and special cases) out of existence.
  12. Design it twice.
  13. Comments should describe things not obvious from the code.
  14. Software should be designed for ease of reading, not ease of writing.
  15. The increments of software development should be abstractions, not features.

Usage Guide

Reference this guide in the following scenarios:

  • Code review: Use the Red Flags quick reference to spot design problems.
  • API/Interface design: Aim for deep modules; ensure interfaces are simple for common usage.
  • Module decomposition: Split based on information hiding, not execution order or line count.
  • Error handling: Prefer "define errors out of existence" to reduce exception propagation.
  • Refactoring: Spend 10–20% of each change improving surrounding design.
  • Naming and comments: Names should be precise; comments should describe what the code doesn't show.

© luoling8192, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in the repository root of luoling8192/software-design-philosophy-skill.

  • SKILL.md
  • LICENSE
  • README.md
  • codex-skill.md

Open the folder on GitHubat commit 1a93214

Compare with similar skills

Software Design Philosophy next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Software Design Philosophy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Software Design Philosophy this skillluoling8192/software-design-philosophy-skill346—~3.4kAutomated safety check: PassMIT
Cyclomatic Complexitysaurabhkumar8112/cyclomatic-complexity-skill405—~761Automated safety check: PassApache-2.0
Copilot Code Coachtimothywarner/chatgptclass143—~1.9kAutomated safety check: PassCustom licence
Frappe Code Reviewfrappe/skills146—~3.8kAutomated safety check: PassNone
Control Structure Optimizationkitchen-engineer42/pdf2skills134—~785Automated safety check: PassNone
Cpp Core GuidelinesSpecterOps/skills702—~500Automated safety check: PassApache-2.0

Similar skills

  • Cyclomatic Complexity

    saurabhkumar8112/cyclomatic-complexity-skill

    Refactor code to reduce cyclomatic complexity so it stays readable, maintainable, and aligned with the long-term vision of the codebase, not just optimized for AI comprehension.

    405 GitHub stars~761 tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Copilot Code Coach

    timothywarner/chatgptclass

    Socratic coding tutor powered by GitHub Copilot. An agent skill from timothywarner/chatgptclass.

    143 GitHub stars~1.9k tokensUpdated 19 days ago
    DevelopmentAuto-check passed
  • Frappe Code Review

    frappe/skills

    Review code for any Frappe application — a checklist distilled from years of engineering practice on correctness, security, performance, concurrency, readability, API design, and testing.

    146 GitHub stars~3.8k tokensUpdated 8 days ago
    DevelopmentAuto-check passed
  • Control Structure Optimization

    kitchen-engineer42/pdf2skills

    Provides a systematic checklist for optimizing control structures (loops, conditionals, control flow) to create self-documenting, maintainable code.

    134 GitHub stars~785 tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Cpp Core Guidelines

    SpecterOps/skills

    Apply a condensed version of the ISO C++ Core Guidelines to C++ design, implementation, refactoring, modernization, and code review.

    702 GitHub stars~500 tokensUpdated 15 days ago
    DevelopmentAuto-check passed
  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    69k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed

Categories

Questions about Software Design Philosophy

What does Software Design Philosophy do?

Software design philosophy guide based on John Ousterhout's "A Philosophy of Software Design." Use this skill during: code reviews, architecture discussions, API design, module decomposition…. Software Design Philosophy is an agent skill from luoling8192/software-design-philosophy-skill." Use this skill during: code reviews, architecture discussions, API design, module decomposition decisions, refactoring guidance, complexity analysis, naming and commenting improvements, error handling strategy design.

When should I use Software Design Philosophy?

Software Design Philosophy fits situations like: the user mentions code is too complex; how to split modules; interface design; reduce coupling.

How do I install Software Design Philosophy in Claude Code?

Run `npx skills add luoling8192/software-design-philosophy-skill --skill software-design-philosophy -a claude-code`. Or copy the skill folder (the luoling8192/software-design-philosophy-skill repository) into .claude/skills/software-design-philosophy in your project. Claude Code loads it when a task matches its description.

How do I install Software Design Philosophy in Codex?

Run `npx skills add luoling8192/software-design-philosophy-skill --skill software-design-philosophy -a codex`. Or copy the skill folder (the luoling8192/software-design-philosophy-skill repository) into .agents/skills/software-design-philosophy in your project. Codex loads it when a task matches its description.

Can I use Software Design Philosophy in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add luoling8192/software-design-philosophy-skill --skill software-design-philosophy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/software-design-philosophy, .gemini/skills/software-design-philosophy, .github/skills/software-design-philosophy and .opencode/skills/software-design-philosophy in your project.

What does Software Design Philosophy need to run?

SKILL.md names no scripts, command-line tools or credentials: Software Design Philosophy is instructions for the agent only.

Does Software Design Philosophy access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Software Design Philosophy safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Software Design Philosophy use?

Software Design Philosophy is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Software Design Philosophy use?

About 3.4k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Software Design Philosophy?

Skills that share tags, products or a category with Software Design Philosophy: Cyclomatic Complexity (saurabhkumar8112/cyclomatic-complexity-skill, 405 stars), Copilot Code Coach (timothywarner/chatgptclass, 143 stars), Frappe Code Review (frappe/skills, 146 stars) and Control Structure Optimization (kitchen-engineer42/pdf2skills, 134 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Software Design Philosophy?

luoling8192 (a GitHub user) maintains it in luoling8192/software-design-philosophy-skill, which has 346 GitHub stars. The repository was last updated on July 11, 2026.

Source: luoling8192/software-design-philosophy-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.