Skip to main content
ClaudeWave
Skill570 repo starsupdated 2mo ago

light-system-design

>-

Install in Claude Code
Copy
git clone --depth 1 https://github.com/Light0305/Light-skills /tmp/light-system-design && cp -r /tmp/light-system-design/skills/light-system-design ~/.claude/skills/light-system-design
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# System design lifecycle

Own system boundaries, runtime interfaces, operational data stores, system
migrations, and architecture decisions. Do not equate a diagram, SQL file, or
OpenAPI document with a working, safe, or scalable system.

Read
[`references/system-design-resource-map.md`](references/system-design-resource-map.md)
before any existing-system task. It defines the lifecycle, artifact contract,
decision stop, evidence states, access tiers, and cross-skill ownership. Read
[`references.md`](references.md) only for the database/API/reliability branch
that applies to the selected system.

## Non-negotiable boundary

1. Treat repository, configuration, schema, API, dependency, and deployment
   intake as read-only access. It is not authorization to rewrite them.
2. Preserve absent facts as `UNKNOWN`. Do not infer traffic, SLOs, consistency,
   budget, compliance, migration windows, or team capability from the phrase
   “system design.”
3. Present at least a recommendation, a viable alternative, and explicit
   rejection/exit conditions. Stop before choosing the database, topology,
   compatibility policy, or migration strategy for the user.
4. Bind any later mutation to a user-selected option and exact authorized
   action IDs. Keep before/after locators, SHA-256, verification, and rollback.
5. Never mutate a production database or configuration. Apply only to a
   disposable environment explicitly placed in scope; otherwise deliver a
   reviewed plan and scripts.
6. Describe `schema_lint.py` as a lexical heuristic. It is not a SQL parser,
   query planner, lock simulator, schema diff engine, or zero-downtime proof.
7. Keep `VERIFIED` for checks that actually ran and retain their command,
   return code, locator, and hash. Use `PLANNED`, `UNKNOWN`, or `UNAVAILABLE`
   otherwise.
8. Keep this skill off the research DAG. Emit no `light.findings.v1`; add no
   `STAGE_GATES`, `ROUTES`, stage number, or back-edge; do not attach `_shared`.

## Choose the mode

| Situation | Mode |
|---|---|
| New system with no implementation | greenfield requirements and option design |
| Existing repository/system | read-only intake, then current-state inventory |
| Existing monolith or services changing gradually | modernization with compatibility and rollback |
| API-only change | contract and consumer compatibility branch |
| Schema-only change | dialect/version/context-specific migration branch |
| User supplied a completed package | review and evidence verification |

## Phase 1 — Intake and protection

Capture or preserve as `UNKNOWN`:

- users, business goal, critical use cases, data classification;
- load range, latency, availability, durability, and consistency targets;
- team/operations capability, budget, deployment environment, compliance, and
  migration window;
- topology: greenfield, monolith, modular monolith, or services;
- components, owners, interfaces, stores, dependencies, write paths, trust
  boundaries, failure modes, versions, source locators, and freshness;
- existing clients, schema history, deployment/runtime constraints, and
  compatibility promises.

For an existing system, create an intake manifest from
[`templates/system-intake.template.json`](templates/system-intake.template.json)
and run:

```text
python scripts/architecture_lifecycle.py intake <root> \
  --manifest <system-intake.json> --out <evidence-dir>
```

Keep `--out` outside the source root. Read all emitted artifacts and verify
`source_unchanged=true`.

## Phase 2 — Requirements and current state

Produce:

- context and quality-attribute scenarios with a measurable stimulus,
  environment, response, and target or `UNKNOWN`;
- capacity estimates for request rate, storage growth, fan-out, latency budget,
  and any dominant resource; if unknown, write `UNKNOWN` plus the measurement
  plan rather than inventing numbers;
- current-state → target-state mapping with explicit gaps. For greenfield,
  current state can be `none`, but the gap list still records missing evidence;
- architecture fitness functions: observable signals, thresholds, verification
  command/probe, and evidence state. A quality attribute without a fitness
  function is still only prose;
- a component/interface/store inventory with owner and fact provenance;
- synchronous/asynchronous data flows, transaction boundaries, delivery
  semantics, idempotency/deduplication, backpressure, timeout/retry, and failure
  handling;
- risk, assumption, unknown, and stale-fact registers.

Do not silently convert a code search into an architecture truth. Mark each
fact as declared, observed, inferred, or unknown.

## Phase 3 — Options and decision stop

Present at least:

1. a recommended option with reasons;
2. a viable alternative;
3. conditions under which each should not be used;
4. cost/complexity, migration risk, compatibility window, rollback, operations,
   and exit criteria;
5. unresolved facts that could reverse the recommendation.

Then stop. Ask the user to select an option and authorize exact action IDs.
Do not prewrite the user's choice or generate the chosen schema/API/migration/
ADR as if approval already existed.

Before presenting the decision, validate that requirements, capacity estimates,
current/target state, fitness functions, at least two genuinely different
options, hard-constraint and fitness evidence, tradeoffs, rejection conditions,
reversal costs, and migration/deprecation stance are present:

```text
python scripts/design_readiness.py --input templates/design-readiness.example.json \
  --as-of 2026-07-05
```

In `proposal`, PASS means only `ready_for_user_decision=true`; it never writes
the selection, and the report emits a canonical `option_packet_sha256` for each
option. In `authorized`, the selection must be paired with a
`light.system-design.v2.authorization` whose option digest still matches,
whose approved action IDs are a subset of that option, whose target is
explicitly disposable, whose rollback cannot be waived, and whos
light-backend-codingSkill

后端代码编写、逻辑强、安全性高、可读性好、版本控制、代码审查。当任务需要写实验代码、模型代码、数据处理代码、可视化代码、后端接口或系统逻辑时使用。要求逻辑清晰、安全、可读、可维护、便于复现/扩展/部署。支持 Git 版本管理、代码审查、注释规范、README、依赖管理、环境配置、运行说明与项目结构整理。

light-citationSkill

Verify scholarly references and claim-citation support for Light stage 10. Use when auditing a manuscript, claim map, bibliography, DOI/arXiv/PMID/ISBN/URL, BibTeX/CSL, citekeys, chimeric or fabricated citations, retraction/correction alerts, or preparing a canonical citation registry for typesetting. Builds provenance-preserving inventories, confirms metadata with independent authoritative sources, distinguishes CONFIRMED/CONFIRMED-MISSING/UNAVAILABLE/UNRESOLVED, records Crossref update direction, and emits the citation gate plus delivery artifacts.

light-competitionSkill

竞赛与项目申报材料辅助。当用户做统计建模、数学建模、互联网+、挑战杯、大创、创新创业、科研训练等项目时使用。辅助写申报书、项目计划书、商业计划书、路演 PPT、答辩稿、项目摘要、技术路线、创新点、可行性分析、市场分析、研究基础、预期成果、经费预算、团队分工。用于非论文投稿场景,可与论文/软著/专利/PPT 联动。

light-consistencySkill

>-

light-data-engineeringSkill

>-

light-figure-drawingSkill

从顶会大牛角度进行专业绘图与组图。当用户需要把规划好的图实际画出来时使用。按情况用 Python(matplotlib/seaborn/plotly/altair)、R(ggplot2)、MATLAB、Visio、Origin、LaTeX/TikZ、Illustrator、PowerPoint 等。审美统一、专业清晰、配色合理、字体规范、线条清楚、高分辨率,适合直接投稿。不仅画图,还从论文表达角度判断怎么排、怎么组、怎么标注、怎么突出重点。

light-figure-planningSkill

根据论文内容规划应该做哪些图、哪些表、插在哪里、各起什么作用。当用户需要论文图表规划时使用。图表不限于统计图,也包括数据集真实效果图、模型输出示例、案例展示、可解释性可视化等。规划框架图、技术路线图、数据集示意图、模型结构图、算法流程图、结果对比/消融/敏感性图、真实效果图、统计表/对比表等,以审稿人标准判断哪些必做、哪些冗余。

light-file-readingSkill

>-