pdlc-api-mock

pdlc-api-mock is a skill for Claude Code from kanfu-panda/pdlc-skills. It costs 26 tokens per session (959 once invoked), scanned A, original, MIT.

A command that reads API design documents and creates realistic sample responses and configuration for a mock service. A mock service imitates an API so frontend code can be tested before the real backend is ready.

In plain words
What is it for?
Use it to generate mock data and service files in a frontend project's mock directory, then provide instructions for enabling them.
Why use it?
It lets frontend developers work without waiting for a live backend and includes normal, empty, boundary, paginated, and error cases.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the pdlc plugin — 38 skills, 2 hooks shipped together

Good fit Use it to generate mock data and service files in a frontend project's mock directory, then provide instructions for enabling them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kanfu-panda/pdlc-skills/pdlc-api-mock
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kanfu-panda/pdlc-skills --skill pdlc-api-mock
Clone the repo
git clone --depth 1 https://github.com/kanfu-panda/pdlc-skills

Made for: Claude Code.

Or install pdlc, the plugin that ships this one along with the rest of its 38 skills, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pdlc-api-mock

README.md
[![agentmods](https://agentmods.dev/badge/skills/kanfu-panda/pdlc-skills/pdlc-api-mock/github.svg)](https://agentmods.dev/skills/kanfu-panda/pdlc-skills/pdlc-api-mock)
Your own site
<a href="https://agentmods.dev/skills/kanfu-panda/pdlc-skills/pdlc-api-mock"><img src="https://agentmods.dev/badge/skills/kanfu-panda/pdlc-skills/pdlc-api-mock/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pdlc-api-mock

Your own site · 80×15
<a href="https://agentmods.dev/skills/kanfu-panda/pdlc-skills/pdlc-api-mock"><img src="https://agentmods.dev/badge/skills/kanfu-panda/pdlc-skills/pdlc-api-mock.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 959 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.00959
Opus 5.5 $0.00010 $0.00384
Sonnet 5.5 $0.00005 $0.00192
Haiku 4.5 $0.00003 $0.00096

Measured 16d ago against content hash bb1f808ff745, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pdlc-api-mock scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 16d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pdlc-api-mock/SKILL.md · 86 lines

What it actually says

API Mock 数据生成

⛔ IRON LAW · 不可违反的硬门禁(工具型命令)

本命令不是主链路上的阶段:不追加 history,不改 current_stage / next_step / last_phase_result,也不为此分配功能ID。以下规则不可协商:

  1. 文件必须落盘:正文要求创建的文件必须作为实际文件写入磁盘,不可仅在对话中输出(只要求在对话里输出的,照正文办)。
  2. 自检必须执行:产出后按本命令的自检项逐项核对,不得以"已经很好了"为由跳过。
  3. 防循环:修复只做一次,不递归。修不了的问题记进报告,继续往下走。

违反任一条 = 立即中止当前命令,输出违规详情,等待人工介入。

根据 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

段四:交接(Handoff)

命令完成后必须输出以下格式的最终消息:

✅ <阶段名> 完成:<主要产出物路径>
📊 自检:<通过数>/<总数> 通过(若有未通过,附要点)
📦 状态快照:docs/.pdlc-state/<feature-id>.json
👉 下一步:/pdlc-<next_step>
   (如果有分叉)或 /pdlc-<alt>(条件:<选择依据>)

规则:

  • 主流程命令(写状态机的命令;下一跳见正文里「本命令的状态机取值」)必须显式输出"下一步",不可省略
  • 工具型命令(Layer 3)可以没有 next_step,此时输出 👉 下一步:(本次流程结束,无后续)
  • 分叉场景必须说明选择条件,例如"若需补充测试用例 → /pdlc-tdd;若测试已齐 → /pdlc-review"

本命令的 handoff 输出:

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

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 16d ago Changed bb1f808ff745
  2. 20d ago Changed · -3 lines · +15 tokens per session 6d928e97e2e0
  3. 1mo ago Changed · +30 lines 457b96982a31
  4. 1mo ago First seen · 59 lines · 11 tokens per session scan A 07a4899f3889

Subscribe to this mod's changes

pdlc-api-mock is a skill published in the GitHub repository kanfu-panda/pdlc-skills (18 stars, last pushed 16d ago), licensed MIT. It adds 26 tokens to every session and 959 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

aspnet-core-service-workflow

Plan, build, and validate ASP.NET Core service surfaces for F#, C#, or mixed .NET solutions using explicit project ownership, configuration, endpoints, tests, and dotnet CLI validation.

gaelic-ghost/socket · 45 tokens

postgres-database-migration

Use this skill for planning, testing, and safely executing PostgreSQL schema migrations — especially when working with production data or shared databases. Trigger when user asks to: Test a schema migration before applying it to production Add, remove, or rename columns safely on a live table Change a column's data…

timescale/pg-aiguide · 220 tokens

design-postgis-tables

Comprehensive PostGIS spatial table design reference covering geometry types, coordinate systems, spatial indexing, and performance patterns for location-based applications.

timescale/pg-aiguide · 31 tokens

setup-timescaledb-hypertables

Use this skill when creating database schemas or tables for Timescale, TimescaleDB, TigerData, or Tiger Cloud, especially for time-series, IoT, metrics, events, or log data. Use this to improve the performance of any insert-heavy table. Trigger when user asks to: Create or design SQL schemas/tables AND…

timescale/pg-aiguide · 219 tokens

timescaledb-hyperfunctions

Use this skill when writing analytical SQL over time-series data with the TimescaleDB Toolkit (timescaledbtoolkit extension) hyperfunctions: approximate percentiles, statistical summaries, time-weighted averages, counter/gauge rates, uptime/heartbeat tracking, state durations, OHLC candlesticks, approximate distinct…

timescale/pg-aiguide · 298 tokens

pgvector-semantic-search

Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…

timescale/pg-aiguide · 190 tokens