К основному содержанию
скилл CX Codex

system-design-from-scratch — скилл для Claude Code

Скилл system-design-from-scratch для Claude Code и Codex помогает проектировать бэкенд и распределённые системы через написание рабочего кода, нагрузочные тесты и симуляцию сбоев.

MIT ★ 541 обновлён 2026-11-09

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add dotslashsimran/simcraft --skill system-design-from-scratch -a claude-code
Открыть на GitHub

Что делает system-design-from-scratch

Скилл организует проектирование систем через создание минимального прототипа вместо абстрактных схем. Процесс разбит на шаги: предварительный расчёт требований, чистая реализация компонентов, проверка инвариантов на генеративных случайных данных, открытые нагрузочные прогоны и проверка отказоустойчивости.

Внутрь встроены скрипты loadgen.py для асинхронной генерации нагрузки с замером перцентилей задержки и faultsim.py — детерминированный дискретно-событийный симулятор сети. Симулятор воспроизводит падения узлов, рассинхронизацию часов, разделение сети (split-brain) и потерю пакетов. По итогам агент составляет итоговый документ DESIGN.md исключительно на основе цифр из тестовых прогонов.

Основной стек — стандартная библиотека Python 3.9+. Go используется по отдельному выбору пользователя при его наличии в системе, а вывод графиков в PNG требует установленного пакета matplotlib.

Какие задачи решает

  • создать минимальный прототип распределённого хранилища или очереди
  • замерить пропускную способность и перцентили задержки p50/p95/p99
  • проверить отказоустойчивость протокола консенсуса при падении узлов и изоляции сети
  • сформировать системный дизайн-документ с подтверждёнными бенчмарками для собеседования

Примеры запросов агенту

  • Спроектируй rate limiter с нуля и подтверди его работу нагрузочным тестом
  • Как работает Raft? Давай напишем минимальную версию с выборами лидера
  • Проверь поведение моей очереди задач при падении узлов и сбоях таймеров

Как установить system-design-from-scratch

1Через Skills CLI (Vercel)

npx skills add dotslashsimran/simcraft --skill system-design-from-scratch -a claude-code

2Вручную: положить файлы

~/.claude/skills/system-design-from-scratch/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/system-design-from-scratch/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о system-design-from-scratch

Как установить system-design-from-scratch в Claude Code?

Выполните в терминале команду npx skills add dotslashsimran/simcraft --skill system-design-from-scratch -a claude-code. Конфигурация сохранится по пути ~/.claude/skills/system-design-from-scratch/SKILL.md.

Что делает скилл system-design-from-scratch?

Он направляет разработку систем через написание исполняемого кода, симуляцию отказов в сети, замер реальных задержек и генерацию итогового дизайн-документа.

Что нужно для работы скилла?

Нужен интерпретатор Python 3.9+. Библиотека matplotlib понадобится для построения графиков нагрузки в PNG, а компилятор Go — если прототип решено писать на нём.

Исходный текст

SKILL.md · MIT
---
name: system-design-from-scratch
description: Design a backend or distributed system by building a tiny but real working version of it, proving its properties with invariant tests, a load test (throughput and p50/p95/p99 latency) and fault injection (crashed nodes, dropped or delayed messages, partitions, clock skew, full disks), then writing a design doc with the numbers, alternatives, where it breaks, how Redis, Kafka, Cassandra or etcd do it, and an interview-ready summary. Works for rate limiters, job queues with retries and visibility timeouts, consistent hashing, LSM-tree key-value stores, write-ahead logs, Raft leader election, caches with eviction policies, pub/sub, URL shorteners and similar. Use when the user says "build a rate limiter from scratch", "system design practice", "how does Raft work, let's build it", "design X and prove it", "load test my design", "what happens to X when a node dies", or is preparing for a system design interview and wants more than boxes and arrows.
---

# System design from scratch

A whiteboard design is a guess. This skill turns it into evidence: a small system that actually runs, tests that state what must always be true, a load test that measures it, and faults that try to break it. The design doc at the end only contains claims that something in the folder proved.

The sibling skill `from-scratch` teaches one concept step by step. This skill is for systems with load, failure and trade-offs. Use `from-scratch` first if the user has never seen the core idea.

## Tools in this skill

- `scripts/loadgen.py`: async load generator for a Python function or an HTTP endpoint. Open loop (`--rate`, fixed schedule, latency counted from the scheduled time) or closed loop (`--concurrency`). Reports throughput, outcome counts and p50/p90/p95/p99/p99.9 from HdrHistogram-style buckets, plus the generator's own lag. `--rates 200,400,800` sweeps load to find the knee. Text chart always, PNG with `--plot` if matplotlib is installed.
- `scripts/faultsim.py`: deterministic discrete event simulator for message passing nodes. Delay, drop, duplicate, partition, one-way block, crash and restart (disk survives), clock offset and drift, disk full, a random fault schedule (`random_faults`), and invariants checked after every event. Same seed, same run. `python3 scripts/faultsim.py --demo` shows the basics.
- `examples/rate-limiter/` and `examples/raft-election/`: two complete runs of this workflow, each with a `DESIGN.md` of real results. Read the matching one before starting a similar system.

Check what is installed first: `python3 --version`, `go version`, `python3 -c "import matplotlib"`. Default to Python 3.9+ standard library. Use Go only if it is installed and the user wants it (the scripts still work against a Go server over HTTP).

## Workflow

Do the steps in order. Show the user each step's output before moving on, and ask one question at a time when something is unclear.

1. **Requirements and numbers.** Write a short table: what the system does, scale (QPS, keys, data size), latency budget, durability and consistency needs, and what happens on failure. Then do the back-of-envelope math out loud: memory per item times items, requests per second per node, round trips per request, disk bytes per day. Note which numbers already rule a design out. Patterns and reference figures are in [reference.md](reference.md#1-numbers).

2. **Smallest correct version.** One file per component, plain Python. Make time injectable (a `clock` parameter or a faultsim node) so tests can control it. For anything with more than one node, build it as `faultsim.Node` subclasses first; only add real sockets for the load test. Leave out everything not needed to show the core trade-off, and list what was left out.

3. **Invariants and property tests.** Write down what must always be true (for example "never more than burst + rate x T admitted", "at most one leader per term", "a read after an acknowledged write returns it"). Test each over hundreds of seeded random inputs, compare against a brute force oracle where one exists, and keep one test per known weakness that shows it on purpose. [reference.md](reference.md#3-invariants-by-system) lists invariants for each common system.

4. **Load test.** Use `loadgen.py`. Prefer open loop for latency claims; closed loop hides queueing (coordinated omission). Sweep offered load to find where latency bends. Always look at the generator lag line: if it is high, the numbers describe the laptop, not the system. Say so in the doc.

5. **Fault injection.** In faultsim: crash the leader or a replica, partition minority from majority, drop 10 to 30% of messages, slow one link, skew or speed up one clock, fill one disk. Then run `random_faults` across 100+ seeds with invariants on. Plant one realistic bug (skip an fsync, forget a check) and confirm the tests catch it; if they do not, the nemesis or the invariant is too weak. Keep every failing seed as a regression test.

6. **Design doc.** Write `DESIGN.md` next to the code with these sections: requirements and numbers; what was built; invariants and test results; load results; fault results; the decision; where it breaks; what production systems do differently (cite their public docs, see [reference.md](reference.md#4-what-production-systems-do)); a five sentence interview summary that uses the measured numbers; and the commands to reproduce. Every number in it must come from a run in this session. Mark machine-dependent numbers with the machine's load.

## Rules

- Never write a result you did not get. Never round a bad number into a good one.
- Simulated time for correctness and distributed behaviour; real time only for cost and throughput, and report how busy the machine was.
- A test that has never failed proves little. Show each invariant failing at least once (a planted bug or a removed check).
- "0 failures in N seeds" means the failure rate is probably below about 3/N, not zero. Say that.
- Compare at least two designs on the same workload. The trade-off is the point.
- When citing a production system, describe only what its public docs or papers say.

© dotslashsimran · MIT · dotslashsimran/simcraft

Похожие скиллы

Все скиллы по теме «Бэкенд и API» →
qe-chaos-resilience proffesor-for-testing Скилл qe-chaos-resilience для Claude Code внедряет контролируемые сбои в распределённые системы и проверяет восстановление. Запускается при тестировании circuit breaker'ов, failover и retry-логики. CX Codex +1 123установок system-design wondelai Скилл system-design для Claude Code и Codex ведёт агента через четыре шага проектирования: требования и масштаб, схема, оценка нагрузки, компромиссы. Считает QPS, разбирает чужую архитектуру. CX Codex +1 6 800установок engineering-system-designer PeterHdd Скилл engineering-system-designer для Claude Code помогает проектировать распределённые системы и описывать их архитектуру. Включается при расчёте ёмкости, выборе хранилищ или разборе отказов. CX Codex +1 351установок design-expert personamanagmentlayer Скилл design-expert даёт агенту паттерны системного дизайна, масштабирования и распределённых систем с готовыми примерами кода на Python. CX Codex +1 178установок system-design-generator patricio0312rev Скилл system-design-generator для Claude Code собирает план архитектуры по требованиям: компоненты, потоки данных, API-контракты и масштабирование. Помогает проектировать фичи и продукты. CX Codex +1 284установок rust-distributed huiali Скилл rust-distributed помогает разбирать и проектировать распределённые системы на Rust: от Raft и 2PC до моделей согласованности и генерации ID. CX Codex +1 1установок

Из того же набора24

Весь набор →
vox-explainer Скилл vox-explainer для Claude Code собирает объясняющую графику или видео без ведущего в стиле Vox. Он включается по просьбе оформить озвучку как ролик, анимированные цитаты или статистику. CX Codex +1 ★ 541звёзд репо benchmark-honestly Скилл benchmark-honestly для Claude Code помогает проверять замеры производительности и сравнивать версии кода. Подключается на просьбы провести бенчмарк, нагрузочный тест или проверить заявление об ускорении. CX Codex +1 ★ 541звёзд репо flaky-test-killer Скилл flaky-test-killer для Claude Code ищет причину нестабильных тестов и помогает устранить её в коде. Запускает проверки под нагрузкой и сравнивает частоту сбоев до и после исправления. CX Codex +1 ★ 541звёзд репо reverse-engineer-video Скилл reverse-engineer-video для Claude Code разбирает монтаж референсного ролика и готовит план для его пересъёмки. Запускается по просьбе найти склейки, движения камеры, ритм или сравнить ремейк с оригиналом. CX Codex +1 ★ 541звёзд репо paper-to-runnable Скилл paper-to-runnable для Claude Code превращает исследовательскую статью в минимальную рабочую реализацию её основной идеи. Запускается по просьбе реализовать или воспроизвести статью, в том числе по ссылке arXiv или локальному PDF. CX Codex +1 ★ 541звёзд репо codebase-map Скилл codebase-map для Claude Code разбирает незнакомый репозиторий и собирает карту его архитектуры. Запускается по просьбе объяснить устройство проекта или проследить путь запроса. CX Codex +1 ★ 541звёзд репо api-design-review Скилл api-design-review для Claude Code проверяет дизайн HTTP API, SDK или CLI. Запускается по просьбе оценить спецификацию, эргономику SDK или риск изменения перед выпуском. CX Codex +1 ★ 541звёзд репо code-loop Скилл code-loop для Claude Code создаёт зацикленные видео из сцен three.js и шейдеров GLSL. Агент подключает его по запросу на генеративную анимацию или GIF без видимого стыка. CX Codex +1 ★ 541звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой