基础设施技能
提供可重用基础设施的AI技能库。零依赖,Node.js>=18。
技能
比赛优化
多模型竞争优化。N个模型独立生成,交叉审查从每个模型中提取精华,深入思考的法官融合所有贡献,对抗性审查压力测试,循证验证确认改进。
node lib/race.js ""管道:分歧→ 评估→ 汇聚→ 压力→ 验证→ \[改进后循环\]
场景 (自动检测):代码性能、代码重构、提示工程、文本优化。
关键设计:本质提取确保每个模型的输出都有贡献——没有浪费。
调用外部模型
通过统一的API网关调用任何配置的AI模型。
node lib/ai.js call "
"
node lib/ai.js list建筑
skills/ # Skill definitions (platform-agnostic)
race-optimize/
SKILL.md # Workflow definition
prompts/ # Externalized prompt templates
generate.md # Phase 1: DIVERGE
review.md # Phase 2: EVALUATE
synthesize.md # Phase 3: CONVERGE
adversarial.md # Phase 4: STRESS
score.md # Phase 5: VERIFY
criteria/ # Evaluation criteria (anchored rubrics)
code-performance.md
code-refactor.md
text-general.md
prompt-engineering.md
call-model/
SKILL.md
lib/
ai.js # Model client (283 lines, zero deps)
race.js # Race engine (~500 lines, zero deps)
config/
models.json # Model registry模型
| 别名 | 角色 | 描述 |
|---|---|---|
| claude-opus-4-6 | 赛车手 | 克劳德·奥普斯4.6 |
| gpt-5 | 赛车手 | gpt-5.2 |
| gpt-5-codex | 赛车手 | gpt-5.2 codex(代码专家) |
| claude-opus-4-5 | 赛车手 | 克劳德作品4.5 |
| deepseek | 赛车手 | deepseek R1(推理) |
| 克劳德思维 | 法官 | 克劳德作品4.6思维(综合+对抗) |
| gpt-5聊天 | 回退 | gpt-5.2聊天 |
| grok | 回退 | grok 4.1 |
设置
# 1. Clone
git clone infrastructure-skills
# 2. Configure API keys
cp .env.local.example .env.local
# Edit .env.local with your keys
# No npm install needed - zero dependencies程序化API
import { Race } from './lib/race.js';
import { AI } from './lib/ai.js';
// Race optimize
await new Race({ target: 'sort.py', goal: 'faster execution' }).run();
// Call model
const ai = new AI();
const result = await ai.call('claude-opus-4-6', 'Your prompt');