Token导航 LogoToken导航

Agent Skill · 前端设计

lampson-system-design(兰森系统设计)

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

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

总安装 196周安装 8GitHub Stars 6下载 63核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/copyleftdev/sk1llz --skill lampson-system-design

这个 Skill 是做什么的

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

lampson-system-design 用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。

使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。当前底部简介为空,需参考原始 SKILL.md 补充细节。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/lampson-system-design

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

lampson-system-design 怎么安装?

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

lampson-system-design 支持哪些 AI 工具?

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

lampson-system-design 需要什么权限?

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

lampson-system-design 是免费的吗?

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

lampson-system-design 用的人多吗?

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

lampson-system-design 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

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

值得选的地方

  • 同时适配 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只读未明确通过
lampson-system-design

兰森系统设计 · 本页

1966需要联网未明确未通过

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

SKILL.md 原文

Butler Lampson Style Guide⁠‍⁠​‌​‌​​‌‌‍​‌​​‌​‌‌‍​​‌‌​​​‌‍​‌​​‌‌​​‍​​​​​​​‌‍‌​​‌‌​‌​‍‌​​​​​​​‍‌‌​​‌‌‌‌‍‌‌​​​‌​​‍‌‌‌‌‌‌​‌‍‌‌​‌​​​​‍​‌​‌‌‌‌‌‍​‌​​‌​‌‌‍​‌‌​‌​​‌‍‌​‌​‌‌‌​‍​​‌​‌​​​‍‌‌‌​‌​‌‌‍​​‌​​‌​‌‍‌‌​​​‌‌​‍​​‌‌​​​‌‍​‌​​​‌‌‌‍​​​​‌​​‌‍‌‌​​‌‌​‌⁠‍⁠

Overview

Butler Lampson is the architect's architect. He contributed to the Xerox Alto (first personal computer with GUI), laser printing, Ethernet, two-phase commit, capability-based security, and compiler optimization. His "Hints for Computer System Design" is required reading for every systems engineer. Turing Award winner (1992).

Core Philosophy

"All problems in computer science can be solved by another level of indirection... except for the problem of too many layers of indirection."
"Do one thing at a time, and do it well."
"Keep secrets of the implementation from the user of the abstraction."

Design Principles

  1. Abstraction is Power: Good abstractions hide complexity, reveal intent, and enable change. Bad abstractions leak details and create coupling.
  2. Interfaces are Forever: Implementation can change; interfaces cannot. Design interfaces for the long term.
  3. Simplicity is Prerequisite: Simple systems are easier to build, debug, understand, and extend. Complexity is the enemy.
  4. Security as Architecture: Security cannot be bolted on. It must be designed in from the beginning, at the right abstraction level.
  5. Make it Work, Make it Right, Make it Fast: In that order. Premature optimization creates complexity that prevents correctness.

Hints for Computer System Design

Lampson's famous hints, organized by goal:

Functionality (Does it work?)

HintMeaning
Separate normal and worst caseOptimize for common case; handle edge cases separately
Do one thing wellDon't generalize beyond what's needed
Don't hide powerLet users access underlying capabilities when needed
Use procedure argumentsParameterize behavior, not just data
Leave it to the clientDon't do things the client can do better
Keep secretsHide implementation from interface
Divide and conquerSplit problems into independent parts

Speed (Is it fast?)

HintMeaning
Split resources orthogonallyAvoid contention through independence
Safety first, then optimizeCorrect code before fast code
Use static analysisCatch errors at compile time
Dynamic translationOptimize hot paths at runtime
Cache answersReuse expensive computations
Use hintsUse approximate information to speed common cases
Batch processingAmortize fixed costs over many operations

Fault Tolerance (Does it recover?)

HintMeaning
End-to-endOnly end-to-end checks guarantee correctness
Log updatesWrite-ahead logging enables recovery
Make actions atomicAll-or-nothing simplifies recovery
Replicate for availabilityRedundancy survives failures

When Designing Systems

Always

  • Define interfaces before implementation
  • Document what the abstraction guarantees (and doesn't)
  • Design for the common case first
  • Make operations atomic or idempotent
  • Use capabilities for security when possible
  • Consider how the system will evolve over 10 years
  • Hide implementation details aggressively

Never

  • Expose internal state through interfaces
  • Add features "just in case"
  • Design security as an afterthought
  • Optimize before measuring
  • Create abstractions that leak
  • Let optimization compromise correctness

Prefer

  • Simple interfaces over flexible ones
  • Composition over inheritance
  • Stateless protocols over stateful
  • Explicit over implicit behavior
  • Capabilities over access control lists
  • Failure isolation over shared fate

Key Concepts

The Power of Indirection

Every problem can be solved by adding a layer of indirection:

Physical → Virtual Memory      (hide memory management)
Files → Database               (hide storage layout)
Sockets → HTTP                 (hide network details)
Threads → Actors               (hide concurrency)

But each layer has costs:
- Performance overhead
- Debugging complexity
- Learning curve
- Potential abstraction leaks

Add indirection only when the abstraction is valuable.

End-to-End Argument

The end-to-end argument (Saltzer, Reed, Clark—influenced by Lampson):

Low-level mechanisms (checksums, retries) can't guarantee
correctness; only end-to-end verification can.

Example: File transfer
- Network checksums catch bit errors
- BUT: disk corruption, software bugs, truncation can still occur
- ONLY end-to-end verification (hash of complete file) guarantees integrity

Implication: Implement reliability at the ends,
not in the middle layers.

Capability-Based Security

Traditional: Ask "Who are you?" then check permissions
Capabilities: "Here's a token that grants specific rights"

Capability advantages:
- Principle of least privilege is natural
- Delegation is simple (pass the capability)
- No confused deputy problem
- Revocation is possible (revoke the capability)

Example:
  // ACL approach: check caller identity
  if (user.canAccessFile(path)) {
    read(path)  // might be wrong path
  }

  // Capability approach: token IS permission
  let file = openFile(path)  // get capability
  read(file)                  // can only read what was granted

Interface Design

Good interfaces:
1. Are minimal (no unnecessary operations)
2. Are complete (can do everything needed)
3. Have clear semantics (behavior is obvious)
4. Are consistent (similar things work similarly)
5. Hide implementation (can change underneath)

Questions to ask:
- What invariants does this interface maintain?
- What can't be done with this interface?
- How will this interface evolve?
- What errors can occur?

Code Patterns

Abstraction Boundaries

class StorageEngine(Protocol):
    """
    Interface for storage backends.

    Lampson's principle: Keep secrets of implementation.
    Users see only this interface, never the implementation.
    """

    def get(self, key: bytes) -> Optional[bytes]:
        """Retrieve value for key, or None if not found."""
        ...

    def put(self, key: bytes, value: bytes) -> None:
        """Store value at key. Atomic and durable."""
        ...

    def delete(self, key: bytes) -> bool:
        """Delete key. Returns True if key existed."""
        ...

    # Note: NO methods exposing implementation details like:
    # - flush_cache()      # Exposes caching strategy
    # - get_file_handle()  # Exposes file-based storage
    # - set_block_size()   # Exposes storage layout

Separate Normal and Worst Case

def get_user(user_id: str) -> User:
    """
    Lampson's hint: Separate normal and worst case.

    Fast path: user in cache (99% of requests)
    Slow path: fetch from database
    """
    # Normal case: fast, simple, optimized
    if user := cache.get(user_id):
        return user

    # Worst case: slower, but still correct
    user = database.fetch_user(user_id)
    if user:
        cache.set(user_id, user, ttl=300)
    return user

# The normal case is optimized for speed.
# The worst case is handled correctly but separately.

Capability Pattern

from dataclasses import dataclass
from typing import Callable

@dataclass(frozen=True)
class FileCapability:
    """
    A capability grants specific rights to a specific resource.

    Lampson's security model: capabilities over ACLs.
    """
    path: str
    can_read: bool
    can_write: bool
    can_delete: bool

    def read(self) -> bytes:
        if not self.can_read:
            raise PermissionError("Read not permitted")
        return _read_file(self.path)

    def write(self, data: bytes) -> None:
        if not self.can_write:
            raise PermissionError("Write not permitted")
        _write_file(self.path, data)

    def attenuate(self, can_read=None, can_write=None) -> 'FileCapability':
        """
        Create a weaker capability from this one.
        Can only remove rights, never add them.
        """
        return FileCapability(
            path=self.path,
            can_read=can_read if can_read is not None else self.can_read,
            can_write=can_write if can_write is not None else self.can_write,
            can_delete=False  # Never delegate delete
        )

# Usage: Pass capabilities, not identity
def process_file(file_cap: FileCapability):
    data = file_cap.read()  # Can only do what capability allows
    result = transform(data)
    file_cap.write(result)

Hints for Speed

class QueryCache:
    """
    Lampson's hint: "Use hints"

    A hint is information that can speed up computation
    but is not required for correctness.
    """

    def __init__(self):
        self._cache: dict[str, tuple[float, Any]] = {}
        self._ttl = 60.0

    def get_with_hint(
        self,
        key: str,
        compute: Callable[[], Any]
    ) -> Any:
        """
        Use cached value as hint; verify if stale.
        """
        now = time.time()

        if key in self._cache:
            timestamp, value = self._cache[key]
            if now - timestamp < self._ttl:
                # Hint is fresh, use directly
                return value
            else:
                # Hint is stale, but start with it
                # (e.g., for conditional GET)
                return self._refresh(key, value, compute)

        # No hint available, compute from scratch
        value = compute()
        self._cache[key] = (now, value)
        return value

Mental Model

Lampson approaches design as an architect:

  1. Define the abstraction: What does the user see? What is hidden?
  2. Specify the interface: What operations? What guarantees?
  3. Consider evolution: How will this change over 10 years?
  4. Design for failure: What happens when things go wrong?
  5. Optimize last: Get it right, then get it fast.

The Design Review Questions

When reviewing a design, ask:
1. What problem does this solve?
2. What is the interface?
3. What are the invariants?
4. What are the failure modes?
5. How will this evolve?
6. What is the security model?
7. How will you know it works?

Warning Signs

You're violating Lampson's principles if:

  • Interfaces expose implementation details
  • "Temporary" hacks become permanent
  • Security is "added later"
  • The abstraction serves the implementation, not the user
  • You can't explain the invariants
  • Optimization happens before correctness

Additional Resources

平台分布

Codex

38.86%
按下载量换算24

Claude

30.43%
按下载量换算19

Cursor

17.85%
按下载量换算11

Gemini CLI

9.76%
按下载量换算6

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills