简介
Frontend waits while backend is late. This skill builds a usable mock from the contract so both move in parallel.
我能做什么
- 🛤️ Generate mock routes by path.(交付:Route table)
- 📦 Build field-conformant fake data.(交付:Response samp)
- ⏱️ Support delay/error injection.(交付:Fault inject)
- 🔀 Give multi-status responses.(交付:Status set)
- 🧰 Provide local stub bootstrap.(交付:Stub code)
- 🧪 List sync self-test points.(交付:Self-test)
我不能做什么
- Does not replace real backend logic.
- No guarantee of final API parity.
- Does not do real auth validation.
触发词(≥10 个)
- "api mock"
- "interface stub"
- "frontend sync"
- "fake data"
- "mock server"
- "mock api"
- "api simulate"
- "mock data"
- "sync stub"
- "local stub"
输入规范
- 必填项:Endpoint list (path/method/resp fields).
- 可选项:Expected delay / error rate.
- 输入格式示例:GET /api/user returns id,name,avatar.
输出规范(结构化交付物)
使用示例(≥3 个)
示例 1:User API
7w4.net小葱技能。
输入:GET /api/user
输出:Route + sample JSON; inject 500 for errors.
示例 2:Delay
输入:slow net
输出:delay=800ms simulate weak network.
示例 3:Bootstrap
输入:run local
输出:json-server/express stub code.
异常处理
- Missing endpoint list: returns required hint.
- Secret contract input: reminds to mask.
- Out of scope: states boundary.
限制与免责声明
- No local filesystem access; requests only least-privilege permissions needed for the task.
- Does not collect sensitive user data (secrets, passwords, personal privacy).
- Output is a structured reference artifact, not professional legal/financial/medical advice.
- All examples are generated in a sandbox semantic; no real external write operations.
- Usable in domestic network environments; no reliance on blocked overseas services.
升级版规划(Pay Skill 预留)
Upgrade to paid once the creator billing channel opens.
Free (published, fully usable): 生成 Mock API 与示例响应。
Pro (paid upgrade): 提供契约驱动 Mock、动态数据与集成测试桩。
Upgrade path: Once the creator billing channel opens, this skill flips to Pro billing with no SKILL.md edit.