agentsclimarketplace

Pdlc api mock

Skill kanfu-panda/pdlc-skills/skills/pdlc-api-mock

36 slash commands that turn Claude Code into a real PDLC workflow — PRD → TDD → implement → review → ship. Hard contracts force AI to persist artifacts, write failing tests first, and run self-checks. No more "looks done" in chat.

Install
npx -y skills add kanfu-panda/pdlc-skills --skill pdlc-api-mock

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

API Mock 数据生成

SKILL.md

1.5 KB, as published. Nobody here has run it

API Mock 数据生成

<!-- @include templates/prompts/iron-law.md -->

根据 API 设计文档生成 Mock 数据和 Mock 服务配置,供前端联调使用。

工作流程

  1. 阅读 API 设计: 阅读 docs/02_design/api/ 下的 API 设计文档
  2. 生成 Mock 数据: 为每个接口生成符合数据模型的 Mock 响应
  3. 生成 Mock 配置: 根据技术栈生成对应的 Mock 服务文件
  4. 输出到指定位置: 前端应用的 mock/src/services/__mocks__/ 目录

Mock 数据要求

  • 数据要贴近真实场景,不要用 "test1"、"aaa" 之类的无意义数据
  • 列表接口至少生成 5-10 条数据
  • 覆盖各种状态:正常数据、边界数据、空数据
  • 包含分页信息
  • 错误响应也要生成 Mock

输出格式

{
  "code": 0,
  "message": "成功",
  "data": { ... }
}

要求

  • Mock 数据中的中文内容要有实际含义
  • 时间字段使用合理的时间范围
  • ID 字段使用合理的格式(UUID/数字)
  • 生成完成后告知前端同学如何启用 Mock 服务

目标接口: $ARGUMENTS

<!-- @include templates/prompts/handoff.md -->

本命令的 handoff 输出:

✅ API Mock 数据 完成
📦 产出:(生成到前端应用 mock/ 目录)
👉 下一步:(本次流程结束,无后续)

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.