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.
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…
$ npx skills add luoling8192/software-design-philosophy-skill --skill software-design-philosophy -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install luoling8192/software-design-philosophy-skill software-design-philosophy --agent claude-codeProject 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/
Install the "software-design-philosophy" agent skill from https://github.com/luoling8192/software-design-philosophy-skill/tree/main into .claude/skills/software-design-philosophy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "software-design-philosophy", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add luoling8192/software-design-philosophy-skill --skill software-design-philosophy -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install luoling8192/software-design-philosophy-skill software-design-philosophy --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "software-design-philosophy" agent skill from https://github.com/luoling8192/software-design-philosophy-skill/tree/main into .agents/skills/software-design-philosophy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "software-design-philosophy", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add luoling8192/software-design-philosophy-skill --skill software-design-philosophy -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install luoling8192/software-design-philosophy-skill software-design-philosophy --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "software-design-philosophy" agent skill from https://github.com/luoling8192/software-design-philosophy-skill/tree/main into .cursor/skills/software-design-philosophy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "software-design-philosophy", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add luoling8192/software-design-philosophy-skill --skill software-design-philosophy -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install luoling8192/software-design-philosophy-skill software-design-philosophy --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "software-design-philosophy" agent skill from https://github.com/luoling8192/software-design-philosophy-skill/tree/main into .gemini/skills/software-design-philosophy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "software-design-philosophy", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install luoling8192/software-design-philosophy-skill software-design-philosophyInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add luoling8192/software-design-philosophy-skill --skill software-design-philosophy -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "software-design-philosophy" agent skill from https://github.com/luoling8192/software-design-philosophy-skill/tree/main into .github/skills/software-design-philosophy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "software-design-philosophy", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add luoling8192/software-design-philosophy-skill --skill software-design-philosophy -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install luoling8192/software-design-philosophy-skill software-design-philosophy --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "software-design-philosophy" agent skill from https://github.com/luoling8192/software-design-philosophy-skill/tree/main into .opencode/skills/software-design-philosophy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "software-design-philosophy", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
software-design-philosophySoftware 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. 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.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 1a93214. It shows what the files ask for, not the result of running them.
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.
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.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
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.
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.
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.
The full file from luoling8192/software-design-philosophy-skill at commit 1a93214, republished under its MIT licence (© luoling8192). 1,699 words, ~3,353 tokens.
.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.Source: John Ousterhout, A Philosophy of Software Design Central thesis: The core challenge of software design is managing complexity.
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.
Think of a module as a rectangle:
Deep module: simple interface, rich implementation. (Good design) Shallow module: complex interface, does very little. (Bad design 🚩)
Redefine semantics so the error condition cannot arise.
unset(key) succeeds even if the key doesn't exist — it simply guarantees "after the call, the key does not exist."substring(start, end) auto-clips out-of-bounds parameters instead of throwing.Exception Masking: Detect and handle exceptions at a low level so they never reach callers.
Exception Aggregation: Handle multiple exception types in one centralized place instead of scattering handlers at every call site.
data, result, tmp, info) — carry no useful information.Use these signals during code reviews and self-reviews:
| Signal | Meaning |
|---|---|
| Shallow Module | Interface is nearly as complex as its implementation |
| Information Leakage | Same design decision reflected in multiple modules |
| Temporal Decomposition | Modules split by execution order, not information hiding |
| Overexposure | Common API forces callers to know about rarely-used features |
| Pass-Through Method | Method just forwards args to another method with similar signature |
| Repetition | Non-trivial code duplicated across locations |
| Special-General Mixture | General-purpose and special-purpose code not cleanly separated |
| Conjoined Methods | Understanding one method requires understanding another |
| Comment Repeats Code | Comment is just an English translation of the code |
| Impl Contaminates Interface | Interface docs expose implementation details users don't need |
| Vague Name | Name too generic to convey useful information |
| Hard to Pick Name | Can't find a precise, intuitive name — design may be flawed |
| Hard to Describe | Documentation must be long to be complete — module may be too complex |
| Non-Obvious Code | Behavior or meaning of code is not easily understood |
Reference this guide in the following scenarios:
© luoling8192, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files in the repository root of luoling8192/software-design-philosophy-skill.
Open the folder on GitHubat commit 1a93214
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Software Design Philosophy this skillluoling8192/software-design-philosophy-skill | 346 | — | ~3.4k | Automated safety check: Pass | MIT | |
| Cyclomatic Complexitysaurabhkumar8112/cyclomatic-complexity-skill | 405 | — | ~761 | Automated safety check: Pass | Apache-2.0 | |
| Copilot Code Coachtimothywarner/chatgptclass | 143 | — | ~1.9k | Automated safety check: Pass | Custom licence | |
| Frappe Code Reviewfrappe/skills | 146 | — | ~3.8k | Automated safety check: Pass | None | |
| Control Structure Optimizationkitchen-engineer42/pdf2skills | 134 | — | ~785 | Automated safety check: Pass | None | |
| Cpp Core GuidelinesSpecterOps/skills | 702 | — | ~500 | Automated safety check: Pass | Apache-2.0 |
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.
timothywarner/chatgptclass
Socratic coding tutor powered by GitHub Copilot. An agent skill from timothywarner/chatgptclass.
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.
kitchen-engineer42/pdf2skills
Provides a systematic checklist for optimizing control structures (loops, conditionals, control flow) to create self-documenting, maintainable code.
SpecterOps/skills
Apply a condensed version of the ISO C++ Core Guidelines to C++ design, implementation, refactoring, modernization, and code review.
docling-project/docling
Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.
Categories
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.
Software Design Philosophy fits situations like: the user mentions code is too complex; how to split modules; interface design; reduce coupling.
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.
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.
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.
SKILL.md names no scripts, command-line tools or credentials: Software Design Philosophy is instructions for the agent only.
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.
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.
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.
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.
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.
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.