system-design

system-design is a skill for Claude Code from cass-2003/local-workflow-skill. It costs 82 tokens per session (2,653 once invoked), scanned A, original, MIT.

A guide to designing the structure of systems made from services, databases, caches, queues, and other parts. It explains how these pieces handle traffic, failures, data storage, and communication.

In plain words
What is it for?
Use it when planning an application architecture, API gateway, load balancer, cache, message queue, microservice system, or database-backed service.
Why use it?
It helps expose capacity limits and trade-offs before implementation. It also provides a way to reason about availability, consistency, latency, and scaling in distributed systems.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it when planning an application architecture, API gateway, load balancer, cache, message queue, microservice system, or database-backed service.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cass-2003/local-workflow-skill/system-design
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cass-2003/local-workflow-skill --skill system-design
Clone the repo
git clone --depth 1 https://github.com/cass-2003/local-workflow-skill

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for system-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/system-design/github.svg)](https://agentmods.dev/skills/cass-2003/local-workflow-skill/system-design)
Your own site
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/system-design"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/system-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for system-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/system-design"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/system-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,653 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00082 $0.02653
Opus 5 $0.00041 $0.01326
Sonnet 5 $0.00016 $0.00531
Haiku 4.5 $0.00008 $0.00265

Measured 6d ago against content hash c474149705b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

system-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/engineering-core/codex/system-design/SKILL.md · 218 lines

How it starts

The opening of the file, as written. The whole thing — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.

系统设计与架构

角色定义

你是系统设计与架构引擎。接收业务场景或技术需求后,自主完成架构分析、组件选型、容量规划、方案输出全链路。所有设计遵循工业界最佳实践。

行为指令

Phase 1: 需求分析与约束识别

  1. 功能需求: 核心用例、读写比例、数据模型
  2. 非功能需求: QPS/TPS 目标、延迟 SLA、可用性目标(99.9%/99.99%)
  3. 约束条件: 预算、团队规模、技术栈限制、合规要求
  4. 容量估算:
    • DAU/MAU → QPS 换算 (DAU × 操作/天 ÷ 86400 × 峰值系数)
    • 存储估算: 单条数据大小 × 日增量 × 保留期
    • 带宽估算: QPS × 响应大小

Phase 2: 高层架构设计

核心定理与权衡:

  • CAP 定理: Consistency / Availability / Partition Tolerance — 三选二
    • CP 系统: ZooKeeper / etcd / HBase — 强一致优先
    • AP 系统: Cassandra / DynamoDB / Eureka — 可用性优先
  • PACELC: Partition 时 A vs C; Else Latency vs Consistency

分层架构:

Client → CDN → Load Balancer → API Gateway
  → Service Layer (微服务)
    → Cache Layer → Database Layer
    → Message Queue → Async Workers

Phase 3: 核心组件设计

负载均衡:

  • L4 (传输层): TCP/UDP 转发 — HAProxy / AWS NLB / LVS
  • L7 (应用层): HTTP 路由/SSL 终止 — Nginx / Envoy / AWS ALB
  • 算法: Round Robin / Weighted / Least Connections / IP Hash / Consistent Hashing
  • 健康检查: Active (HTTP probe) / Passive (error rate)

CDN:

  • 静态资源加速: JS/CSS/图片/视频
  • 边缘计算: Cloudflare Workers / Lambda@Edge
  • 缓存策略: TTL / Cache-Control / Purge API
  • 回源优化: 分层缓存 / 预热 / 防击穿

缓存策略:

  • 模式: Cache-Aside / Read-Through / Write-Through / Write-Behind / Refresh-Ahead
  • 层级: 浏览器 → CDN → API Gateway → 应用本地(Caffeine) → 分布式(Redis)
  • 问题处理:
    • 缓存穿透: Bloom Filter / 空值缓存
    • 缓存击穿: 互斥锁 / 热点预加载
    • 缓存雪崩: TTL 随机化 / 多级缓存 / 熔断降级
  • Redis 集群: Sentinel(HA) / Cluster(分片) / 持久化(RDB+AOF)

数据库模式:

  • 复制(Replication): 主从 / 多主 / 链式 — 读扩展 + HA
  • 分片(Sharding): Hash / Range / Directory — 写扩展
    • 分片键选择: 均匀分布 / 避免热点 / 查询友好
    • 跨分片查询: Scatter-Gather / 全局索引
  • 联邦(Federation): 按功能拆分数据库 — 独立扩展
  • 反范式(Denormalization): 冗余存储换取读性能
  • SQL vs NoSQL 选型:
    • RDBMS (MySQL/PostgreSQL): ACID / 复杂查询 / 关系数据
    • Document (MongoDB): 灵活 Schema / 嵌套数据
    • Wide-Column (Cassandra/HBase): 高写入 / 时序数据
    • Key-Value (Redis/DynamoDB): 低延迟 / 简单查询
    • Graph (Neo4j): 关系密集 / 社交网络

消息队列:

  • 选型: Kafka(高吞吐/日志) / RabbitMQ(灵活路由) / Pulsar(多租户) / SQS(托管)
  • 模式: Point-to-Point / Pub-Sub / 事件溯源
  • 保证: At-most-once / At-least-once / Exactly-once
  • 关键设计: 分区策略 / 消费者组 / 死信队列 / 重试策略 / 背压处理

Read the full file on GitHub · 218 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 218 lines · 82 tokens per session scan A c474149705b4

Subscribe to this mod's changes

system-design is a skill published in the GitHub repository cass-2003/local-workflow-skill (12 stars, last pushed 2mo ago), licensed MIT. It adds 82 tokens to every session and 2,653 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

stripe-projects

Provision SaaS services + sync creds via Stripe Projects.

NousResearch/hermes-agent · 15 tokens

azure-eventhub-dotnet

Azure Event Hubs SDK for .NET. Use for high-throughput event streaming: sending events (EventHubProducerClient, EventHubBufferedProducerClient), receiving events (EventProcessorClient with checkpointing), partition management, and real-time data ingestion. Triggers: "Event Hubs", "event streaming"…

microsoft/skills · 94 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens

wikipedia

Search and read Wikipedia via x wkp — MediaWiki API, no API key, zero install; query, extract, suggest, and DDG route in one module. Load for wiki, wikipedia, encyclopedia lookup, article summary.

x-cmd/x-cmd · 49 tokens

django-storages-s3

Use when configuring Django to store static and media files on AWS S3 with django-storages. Invoke when working with the STORAGES setting, S3 buckets, presigned URLs, CloudFront, or boto3-backed file storage in settings.py. Configures the Django 4.2+ STORAGES dict, public/private custom backends, presigned GET/POST…

Jeffallan/claude-skills · 138 tokens

cve

Look up CVE records via x cve — cached, zero-API-key, daily xz TSV. Load for cve, vulnerability id, kev, epss, nvd, cvelist, or security advisory.

x-cmd/x-cmd · 49 tokens