pdlc-perf

pdlc-perf is a skill for Claude Code from kanfu-panda/pdlc-skills. It costs 40 tokens per session (1,902 once invoked), scanned A, original, MIT.

A workflow for finding and improving performance problems in a specified backend service or frontend application. It examines areas such as database queries, caching, response times, loading, rendering, and network use, then records its findings in a report.

In plain words
What is it for?
Use it to inspect slow queries, N+1 database access, cache behavior, API handling, memory or algorithm issues, page loading, unnecessary rerenders, large lists, and resource delivery.
Why use it?
It turns a broad performance concern into identified bottlenecks, prioritized changes, and a documented comparison of the current and proposed code. It also keeps the investigation from existing only in chat.

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 inspect slow queries, N+1 database access, cache behavior, API handling, memory or algorithm issues, page loading, unnecessary rerenders, large lists, and resource delivery.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kanfu-panda/pdlc-skills/pdlc-perf
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-perf
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-perf

README.md
[![agentmods](https://agentmods.dev/badge/skills/kanfu-panda/pdlc-skills/pdlc-perf/github.svg)](https://agentmods.dev/skills/kanfu-panda/pdlc-skills/pdlc-perf)
Your own site
<a href="https://agentmods.dev/skills/kanfu-panda/pdlc-skills/pdlc-perf"><img src="https://agentmods.dev/badge/skills/kanfu-panda/pdlc-skills/pdlc-perf/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-perf

Your own site · 80×15
<a href="https://agentmods.dev/skills/kanfu-panda/pdlc-skills/pdlc-perf"><img src="https://agentmods.dev/badge/skills/kanfu-panda/pdlc-skills/pdlc-perf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,902 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.00040 $0.01902
Opus 5.5 $0.00016 $0.00761
Sonnet 5.5 $0.00008 $0.00380
Haiku 4.5 $0.00004 $0.00190

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

Security

Grade A, and why

pdlc-perf 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 1mo 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-perf/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

性能优化

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

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

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

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

对指定服务或应用进行性能分析并提出优化方案。

分析维度

后端性能

  • 数据库层: 慢查询、N+1 问题、缺失索引、全表扫描
  • 缓存层: 缓存命中率、缓存策略(过期/淘汰)、缓存穿透/击穿/雪崩
  • 接口层: 响应时间、并发处理、连接池配置
  • 代码层: 算法复杂度、内存泄漏、不必要的序列化/反序列化

前端性能

  • 加载性能: 首屏时间、资源体积、代码分割、懒加载
  • 运行时性能: 不必要的重渲染、大列表虚拟滚动、防抖/节流
  • 网络优化: 请求合并、资源压缩、CDN 配置
  • 缓存策略: 浏览器缓存、Service Worker、本地存储

工作流程

没有测量就没有优化:改代码之前先有基线,改完之后用同一把尺子复测。

  1. 定指标与测量手段:要优化的指标(接口 p50 / p95 延迟、吞吐、查询耗时、首屏时间、包体积、内存)及能重复执行的测量命令—— 项目已有的 benchmark / 压测脚本、EXPLAIN ANALYZE、Lighthouse CLI、hyperfine、time 等。 找不到可重复的测量手段 → 只做分析、给方案,不改代码,报告里标「未测量」
  2. 测基线:同一命令至少跑 3 次取中位数,记下环境(机器、数据量、并发数)
  3. 识别瓶颈:有 profile / 慢查询日志 / 火焰图就以它为准,读代码推测只作补充,并注明是推测
  4. 一次只改一项:按投入产出比排序,逐项实施
  5. 复测:同一命令、同一环境、同样次数;没有可测提升的改动回退,不留「理论上更快」的改动
  6. 确认行为不变:跑 docs/00_standards/test-commands.yml 的 unit,测试必须仍然通过
  7. 【必须创建文件】 在 docs/04_testing/perf/ 下创建性能优化报告:<功能ID>-report.md(不针对具体功能时用 YYYYMMDD-<服务名>-report.md)

⚠️ 必须创建文件,不可仅在对话中输出。

报告格式

文档顶部包含 PDLC 追溯头:

<!-- PDLC-TRACE -->
<!-- 功能名称: <服务名> -->
<!-- 阶段: 性能优化 -->
<!-- 创建时间: <ISO 8601> -->

报告内容:

序号 位置 问题描述 优化方案 测量命令 优化前 优化后 结论

「优化前 / 优化后」填实测中位数(带单位与环境);没测的填「未测量」,结论写「未验证」,不得填预期值冒充。

创建后验证:确认文件已存在于 docs/04_testing/perf/ 目录

要求

🌐 Output language for generated artifacts

All generated artifacts (PRDs, design docs, code comments, review reports, test plans, deployment manuals, changelog entries, etc.) follow this policy:

Read the full file on GitHub · 142 lines

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. 1mo ago Changed c3f6bf1e59ff
  2. 1mo ago Changed · +4 lines · +32 tokens per session 16cea9525aa8
  3. 1mo ago Changed 5ab31f59707a
  4. 2mo ago Changed · +58 lines 0e11665f7717
  5. 3mo ago First seen · 80 lines · 8 tokens per session scan A 77612ed950de

Subscribe to this mod's changes

pdlc-perf is a skill published in the GitHub repository kanfu-panda/pdlc-skills (19 stars, last pushed 16d ago), licensed MIT. It adds 40 tokens to every session and 1,902 once invoked, about $0.0002 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

pdlc-perf compared with skills from other repositories

pdlc-perf next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pdlc-perfkanfu-panda/pdlc-skillsSkill1916d agoMITA40Claude Code
postgres-database-migrationtimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A220Cursor
timescaledb-hyperfunctionstimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A298Cursor
design-postgis-tablestimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A31Cursor
setup-timescaledb-hypertablestimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A219Cursor
migrate-postgres-tables-to-hypertablestimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A181Cursor
pgvector-semantic-searchtimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A190Cursor