typescript-best-practices
Apply disciplined TypeScript modeling and boundary parsing. Use when reading or editing TypeScript.
- License 许可
- MIT
- 最近更新
- 2026-11-02
- Stars
- ★ 22
- Forks
- 1
01 前言 Front Matter
- name
- typescript-best-practices
- description
- Apply disciplined TypeScript modeling and boundary parsing. Use when reading or editing TypeScript.
03 SKILL.md 正文
TypeScript Best Practices
- Parse unknown external data at the boundary; keep
unknownuntil validated. - Prefer discriminated unions for mutually exclusive states and exhaustive handling for closed variants.
- Give domain meaning to primitives when accidental mixing would be costly.
- Avoid widening useful literal information and avoid
anyas an escape hatch. - Let callers consume one coherent return shape instead of correlated optional fields.
- Use generics only when they express a real relationship between inputs and outputs.
- Keep async/error states explicit at the public boundary.
- Test behavior through exported APIs, not private helper choreography.
04 同仓库更多 Skills
why
Recover why a system or decision exists by triangulating source history and connected evidence. Use for rationale archaeology and historical questions.
unslop
Cut AI tells, filler prose, superficial -ing phrases, and bloated commentary from writing and code. Use for all written deliverables and code cleanup.
technical-writing
Write maintainable technical docs, RFCs, READMEs, PR descriptions, and commit messages. Use for durable engineering prose.
teach
Teach a subsystem or change so the reader can reason about it, combining how and why evidence. Use for real understanding rather than summary.
tdd
Write a minimal failing test before implementation, make it pass with the simplest code, and refactor cleanly. Use when implementing bug fixes or features with clear verification targets.
swarm
Fan out independent slices or coverage partitions and aggregate them with owner verification. Use for large audits, races, and parallel work.