Skip to content
Development
Skill

/pdlc-perf

性能优化

From plugin
pdlc
1538 skills
Install
$ npx -y skills add kanfu-panda/pdlc-skills --skill pdlc-perf --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/pdlc-perf

Context preview

The summary Claude sees to decide when to auto-load this skill.

性能优化

SKILL.md

pdlc-perf.SKILL.md
name: pdlc-perf
description: 性能优化
argument-hint: <功能ID | 优化目标>
allowed-tools: Read, Write, Edit, Glob, Grep, Bash
layer: 3
stage: quality
produces:
  - docs/04_testing/perf/<feature-id>-report.md
requires: []
next_step: null
terminal_state: null

性能优化

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

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

分析维度

后端性能

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

前端性能

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

工作流程

1. **阅读代码**: 分析目标服务/应用的核心逻辑 2. **识别瓶颈**: 标注可能存在性能问题的代码段 3. **提出方案**: 对每个问题给出优化方案和预期收益 4. **实施优化**: 按优先级实施优化代码 5. **【必须创建文件】** 在 `docs/07_reviews/code/` 下创建性能优化报告

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

报告格式

文件名: `YYYYMMDD-<服务名>-perf-report.md`

**文档顶部包含 PDLC 追溯头**:

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

**报告内容**:

| 序号 | 位置 | 问题描述 | 影响程度 | 优化方案 | 预期收益 | |------|------|----------|----------|----------|----------|

**创建后验证**:确认文件已存在于 `docs/07_reviews/code/` 目录

要求

<!-- @include templates/prompts/output-language.md -->

  • 优化方案按投入产出比排序(性价比高的优先)
  • 给出优化前后的代码对比
  • 不要为了优化而牺牲代码可读性

优化目标: $ARGUMENTS

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

**本命令的 handoff 输出:**

✅ 性能优化报告 完成
📦 产出:docs/04_testing/perf/<feature-id>-report.md
👉 下一步:(本次流程结束,无后续)
Read more
Ships withpdlc

Author: kanfu-panda Repo: github.com/kanfu-panda/pdlc-skills License: MIT pdlc-skills turns AI software engineering into an auditable, on-disk state machine.

Get the whole plugin
Stats
15
Stars
2
Forks
Active
Maintenance
Shell
Language
MIT
License
8d ago
Last commit
4mo ago
Created

Repo: kanfu-panda/pdlc-skills

Other skills on pdlc.