用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/romeerez/orchid-orm --skill type-optimizer命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | type-optimizer |
| description | Use when need to optimize TypeScript types. |
Optimize from the code in front of you. Start with proven ideas from type-optim.md, but treat each one as a candidate that must fit the current code.
--extendedDiagnostics.node .agents/skills/type-optimizer/top-type-optims.js to get the optimization list sorted by historical mean Instantiations savings..agents/skills/type-optimizer/type-optim.md.types --extendedDiagnostics after each idea.node .agents/skills/type-optimizer/update-type-optim-stats.js <optimization-number> <instantiations-diff>.previous Instantiations - new Instantiations for <instantiations-diff>: positive means the attempt improved, negative means it regressed.Instantiations.The saved list is not a blind checklist: while trying it, judge every candidate against the code in front of you. After the list ends, stop using it as guidance and focus solely on the code at hand to find new optimization ideas.
Examples in type-optim.md must be abstract and obvious. They should teach the type-system shape, not the project feature where the idea was first found.
Obj, Key, Value, Item, Input, Output.bad before good, so the reader sees the problem before the transformation.bad:
interface TargetRef<Id extends string, Keys extends string[]> {
id: Id;
keys: Keys;
}
use<
Id extends string,
Shape extends Record<string, unknown>,
Keys extends (keyof Shape & string)[],
>(fn: () => FullEndpoint<Id, Shape, Keys>): Ref<Id, Keys>;
good:
interface Needed<A, B> {
first: A;
second: B;
}
use<A, B>(fn: () => Needed<A, B>): Output<A, B>;
When the documented list is exhausted, try creative undocumented type optimization attempts. If a new idea reduces Instantiations by more than 1000 and passes checks, append it to type-optim.md, then call update-type-optim-stats.js with the new number and measured diff.
Use this template:
### <next-number>. <Imperative Title>
**stats**: {}
**when**: <code situation where it applies>
**how**: <concise transformation>
**bad**:
```ts
<costly abstract shape>
```
**good**:
```ts
<optimized abstract shape>
```
基于 SOC 职业分类