一键导入
code-quality
Ensure high-quality Rust code in the Static Web Server (SWS) project
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Ensure high-quality Rust code in the Static Web Server (SWS) project
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Design or review software architecture, API contracts, data models, and module boundaries for the Static Web Server (SWS) project
Triage, debug, fix, and document issues for the Static Web Server (SWS) project — bug reports, root cause analysis, fix implementation, and regression prevention
Optimize or review performance for the Static Web Server (SWS) project — profiling, bottlenecks, resource usage, compression, and caching
Author or edit any prose for the Static Web Server (SWS) project — documentation, design docs, READMEs, PR descriptions, issue bodies, commit message bodies, or other human-readable text — following project writing conventions
Write or review Rust backend code for the Static Web Server (SWS) project — crates, modules, functions, types, error handling, and async code
Review or implement security measures for the Static Web Server (SWS) project — path traversal prevention, TLS, security headers, CORS, and input validation
| name | code-quality |
| description | Ensure high-quality Rust code in the Static Web Server (SWS) project |
Load this skill when writing, reviewing, or refactoring Rust code in the SWS project.
When to load: editing any file under src/, adding a new module, changing error handling, touching async code, or reviewing a PR that modifies Rust source.
Correctness above all. Build production-grade software, not prototypes. Prioritize correctness, reliability, and maintainability over expedient shortcuts.
Every change requires a test. Every code change must be accompanied by a test that fails before the change and passes after it. No behavioral change is complete without objective verification.
Enforce invariants explicitly. Critical assumptions and invariants must be asserted, not silently ignored. Fail fast on invalid states rather than masking defects with defensive conditionals that obscure root causes.
Own regressions end-to-end. Any test failures introduced by your change are your responsibility to investigate and resolve. Do not defer by comparing against another branch or attempting to prove the failure is pre-existing. Diagnose the failure, identify the root cause, and either fix it or provide conclusive evidence that it is unrelated.
Evidence over assumptions. Every debugging hypothesis must be validated with reproducible evidence. Never speculate, infer causality without proof, or implement fixes based on unverified assumptions. Root-cause analysis must be grounded in observable facts.
Optimize only after measurement. Performance work must be driven by profiling, benchmarks, or measurable evidence. Do not trade correctness or maintainability for speculative micro-optimizations.
.await. Acquire locks for the shortest possible duration.rust-backend skill: no block_on in async context).Every contribution should leave the codebase:
The following concerns are governed by dedicated skills — defer to them for specifics:
| Concern | Skill |
|---|---|
Error handling (Result<T>, anyhow::Context, StatusCode), unsafe policy, async runtime, file system, patterns to avoid | rust-backend/SKILL.md |
| Test organization, fixtures, handler/static-file test patterns | testing/SKILL.md |
| Profiling, allocations, hot-path optimization, benchmarking | performance/SKILL.md |
| Path traversal, TLS, security headers, CORS, input validation | security/SKILL.md |