my-ts-rules
SKILL.md
严格 TypeScript 技能指令
当你(AI)在编写或重构 TypeScript 代码时,必须遵守以下规则:
- 禁止使用 any: 即使是复杂的类型也必须定义 interface 或 type。
- 显式返回类型: 所有的函数(包括箭头函数)必须显式标注返回类型。
- 优先使用 Unknown: 在处理不确定类型时,使用
unknown而不是any。
示例
❌ const add = (a, b) => a + b
✅ const add = (a: number, b: number): number => a + b
Weekly Installs
3
Repository
soberlevi/my-skillsFirst Seen
Mar 2, 2026
Security Audits
Installed on
opencode3
gemini-cli3
claude-code3
github-copilot3
codex3
kimi-cli3