Token导航 LogoToken导航

Agent Skill · 前端设计

software-design-philosophy(软件设计理念)

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

software-design-philosophy 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 2,097。

总安装 2,893周安装 123GitHub Stars 303下载 1,014核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:software-design-philosophy(软件设计理念)
来源仓库:https://github.com/luoling8192/software-design-philosophy-skill
仓库路径:skills/software-design-philosophy
安装命令:
npx skills add https://github.com/luoling8192/software-design-philosophy-skill --skill software-design-philosophy
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/luoling8192/software-design-philosophy-skill --skill software-design-philosophy

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

software-design-philosophy 用于辅助界面设计、视觉规范和交互体验优化。适合整理页面结构、生成 UI 方案或检查视觉一致性,需结合品牌与设计系统。通过 npx skills add 命令安装,避免仅堆砌装饰元素。涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出与对齐问题。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/software-design-philosophy

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/luoling8192/software-design-philosophy-skill -…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

software-design-philosophy 怎么安装?

在终端执行 npx skills add https://github.com/luoling8192/software-design-philosophy-skill --skill sof…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

software-design-philosophy 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

software-design-philosophy 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

software-design-philosophy 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

software-design-philosophy 用的人多吗?

公开数据是累计安装 2,893 次,近一周安装 123 次,下载 1,014 次,GitHub 303 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

software-design-philosophy 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
software-design-philosophy

软件设计理念 · 本页

2,893303需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

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.

Strategic Programming (Recommended)

  • 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.

  1. Exception Masking: Detect and handle exceptions at a low level so they never reach callers.
  2. 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.

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.

平台分布

Codex

37.77%
按下载量换算383

Claude

27.96%
按下载量换算284

Cursor

18.2%
按下载量换算185

Gemini CLI

9.21%
按下载量换算93

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills