文档

使用方式

方式 1:Playground(零代码)

01

访问 /adapters

页面提供示例 Spec 和所有模型分组

02

编辑左侧 Spec JSON

修改 purpose / steps / inputs / output 等字段,右侧实时渲染

03

对比结果

点击模型 Tab 切换,查看各模型的 System Prompt / messages / tools / SKILL.md 等产物

04

导出

一键下载所有模型的渲染结果 JSON,直接对接你的 CI/CD

方式 2:程序化调用(TypeScript)

typescript
import { renderSkill, renderAll } from "@/app/lib/adapters";

const spec = {
  id: "code-reviewer",
  name: "Code Review Assistant",
  purpose: "Review code across multiple dimensions.",
  steps: ["理解意图", "按四维度找问题", "给建议"],
  inputs: [
    { name: "code", type: "string", description: "code body", required: true },
  ],
  output: { format: "json" as const },
};

const forClaude = renderSkill(spec, "claude");
console.log(forClaude.system);       // XML system prompt
console.log(forClaude.artifacts);    // 附带的 SKILL.md 文件

const all = renderAll(spec);         // 渲染到全部模型
const forR1  = all["deepseek-r1"];
const forKimi = all["kimi"];

方式 3:REST API

bash
curl -X POST https://prompt.solokit.run/api/adapters/render \
  -H "Content-Type: application/json" \
  -d '{
    "spec": { "id": "code-reviewer", ... },
    "targets": ["claude", "openai-chat", "deepseek-r1", "kimi"]
  }'

TIP

REST API 无需鉴权:纯函数渲染,不调用外部 LLM、不读写数据库,适合在 CI、脚本、Agent 中直接调用。