Summary
后端系统设计与数据库能力。当任务涉及系统架构、数据库设计、接口设计、权限/日志/异常/性能/部署时使用。设计 ER 图、数据表结构、接口文档、用户权限、数据流转、模块划分、API 规范、数据库索引、安全策略、部署方案,尤其适合科研系统、管理系统、数据分析平台、可视化平台、竞赛作品与软著项目。
light0305/light · Archived
>- Design or modernize a software system from an evidence-backed current-state inventory through quality attributes, architecture options, API and schema contracts, migration/rollback plans, ADRs, and verification. Use for greenfield or existing monoliths, modular monoliths, services, system/API/ database design, schema migration review, data-flow reliability, tenant/PII controls, or architecture evolution. Existing systems stay read-only until the user selects an option and authorizes exact mu…
npx skills add light0305/light --skill light-system-design
后端系统设计与数据库能力。当任务涉及系统架构、数据库设计、接口设计、权限/日志/异常/性能/部署时使用。设计 ER 图、数据表结构、接口文档、用户权限、数据流转、模块划分、API 规范、数据库索引、安全策略、部署方案,尤其适合科研系统、管理系统、数据分析平台、可视化平台、竞赛作品与软著项目。
This repository is archived — consider an actively maintained alternative.
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Guidance for distinctive, intentional visual design when building new UI or reshaping an existi…
866.4K installsBrowser automation CLI for AI agents. Use when the user needs to interact with websites, includ…
810.4K installsReview UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "chec…
617.3K installsBuild, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and …
576.5K installsDebug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe …
568.9K installsOther skills from light0305/light · top by installs.
npx skills add light0305/light
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
master
Files included with this skill beyond the listing page.
SKILL.md
14,233 B
SUMMARY.md
672 B
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.
intake as read-only access. It is not authorization to rewrite them.
UNKNOWN. Do not infer traffic, SLOs, consistency,budget, compliance, migration windows, or team capability from the phrase “system design.”
rejection/exit conditions. Stop before choosing the database, topology, compatibility policy, or migration strategy for the user.
action IDs. Keep before/after locators, SHA-256, verification, and rollback.
disposable environment explicitly placed in scope; otherwise deliver a reviewed plan and scripts.
schema_lint.py as a lexical heuristic. It is not a SQL parser,query planner, lock simulator, schema diff engine, or zero-downtime proof.
VERIFIED for checks that actually ran and retain their command,return code, locator, and hash. Use PLANNED, UNKNOWN, or UNAVAILABLE otherwise.
light.findings.v1; add noSTAGEGATES, ROUTES, stage number, or back-edge; do not attach shared.
| 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 |
Capture or preserve as UNKNOWN:
migration window;
boundaries, failure modes, versions, source locators, and freshness;
compatibility promises.
For an existing system, create an intake manifest from [templates/system-intake.template.json](templates/system-intake.template.json) and run:
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.
Produce:
environment, response, and target or UNKNOWN;
and any dominant resource; if unknown, write UNKNOWN plus the measurement plan rather than inventing numbers;
current state can be none, but the gap list still records missing evidence;
command/probe, and evidence state. A quality attribute without a fitness function is still only prose;
semantics, idempotency/deduplication, backpressure, timeout/retry, and failure handling;
Do not silently convert a code search into an architecture truth. Mark each fact as declared, observed, inferred, or unknown.
Present at least:
and exit criteria;
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:
python scripts/design_readiness.py --input templates/design-readiness.example.json \
--as-of 2026-07-05
In proposal, PASS means only readyforuserdecision=true; it never writes the selection, and the report emits a canonical optionpacketsha256 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 whose date is not later than --as-of. The walking skeleton (entry/corepath/stateboundary/observableresult/failureprobe/verification/actionids) may contain only approved actions before readyforimplementation=true.
For each option, state whether migration/deprecation is applicable. If it is applicable, the option must be replacement-first. Consumer inventory is a list of stable consumer/interface IDs, owners, usage status, evidence state, evidence locator/date, or an explicit measurement plan. Telemetry is a structured metric/source/evidence record. Rollout is a sequence of phases with entry, exit, and rollback conditions; rollback has a trigger, action, and verification. A deprecation compatibility window has start, end, and removal conditions. Plain strings do not satisfy these fields. If migration is not applicable, record why; do not leave it blank.
Use [templates/decision-authorization.template.json](templates/decision-authorization.template.json) after the user responds. Copy the selected digest emitted by design_readiness.py; a changed requirement, state model, fitness function, or selected option changes that digest and requires fresh authorization.
After authorization, produce only the selected scope:
Use [templates/architecture-package.template.md](templates/architecture-package.template.md). Treat bundled SQL/OpenAPI files as dialect/version-labeled examples, never as production defaults.
Define versioning, authn/authz boundary, error model, pagination, idempotency, compatibility window, and deprecation. Validate OpenAPI with:
python scripts/contract_validate.py --spec openapi.yaml \
--examples examples.json --json
VALIDATED requires openapi-spec-validator plus successful example-schema checks. STRUCTURE_ONLY or UNAVAILABLE is not contract validation.
Keep four tasks separate:
Run the heuristic linter only with an explicit dialect and relevant context:
python scripts/schema_lint.py --ddl migration.sql \
--dialect postgresql --server-version 18 \
--context migration-context.json --json
For authoritative diff/drift, use a real engine/tool selected for the project (for example Atlas, Skeema, Alembic, Flyway, Liquibase, or Prisma) and preserve its command/output. Do not claim this skill implements those engines.
Generate an ER view from a schema spec:
python scripts/er_diagram.py --in schema.yaml --strict --out schema.mmd
If Mermaid rendering is unavailable, report syntax/structure verification only.
Verify as applicable:
Record authorization binding, source-intake binding, implemented action IDs, artifact hashes, and verification entries in the package manifest, then run:
python scripts/architecture_lifecycle.py verify-package \
--package package-manifest.json --json
Deliver only when the package distinguishes VERIFIED, PLANNED, UNKNOWN, and UNAVAILABLE; every VERIFIED entry is evidence-backed; the manifest binds the copied authorization file, option digest, approved action IDs, and implemented action IDs; and existing-system packages bind the read-only intake-integrity.json hash. Artifact and verification locators in the manifest are resolved relative to the manifest's directory and must stay inside that package directory; ../, absolute paths to outside evidence, or current-working-directory-dependent locators are not a portable delivery package.
system-design: system boundaries, runtime interfaces, operational schema,system migration, reliability choices, ADRs.
project-structure: visible file tree and authorized file moves. Borrow itsprotection discipline; never send schema migration back to it.
data-engineering: research-data quality, lineage, transformations, splits,and data release. A service database is not a research dataset pipeline.
frontend-design: interaction and interface implementation. This skill ownsbackend/API boundaries, not UI.
research-ethics: final ethics/privacy judgment. This skill proposes designcontrols and review items only.
orchestrator: may consume delivered state; it receives no invented gate.Run every script self-test:
python scripts/architecture_lifecycle.py --selftest
python scripts/schema_lint.py --selftest
python scripts/er_diagram.py --selftest
python scripts/contract_validate.py --selftest
python scripts/design_readiness.py --selftest
Before delivery, verify:
plans instead of invented numbers.
(current_state=none).
fitness result with evidence or an honest UNKNOWN/UNAVAILABLE warning.
action IDs are in scope, the target is explicitly disposable, and rollback remains required.
implemented action IDs, and read-only intake integrity or an explicit greenfield/not-applicable reason.
replacement-first with consumer inventory, telemetry, rollout, rollback, and compatibility window.
VERIFIED item has command, return code, locator, and SHA-256.implemented and approved scope.
escape the package directory.