Agent skill

Bp Performance Optimization

by davidYichengWei in davidYichengWei/agentic-engineering-framework

提供性能优化方法论、设计原则和具体优化规则。在编写代码、优化性能瓶颈、进行 code review 时使用,涵盖 CPU、内存、I/O、并发等维度。

MITAuto-check passedDevelopment

Install Bp Performance Optimization

skills CLI
$ npx skills add davidYichengWei/agentic-engineering-framework --skill bp-performance-optimization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davidYichengWei/agentic-engineering-framework bp-performance-optimization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davidYichengWei/agentic-engineering-framework.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/bp-performance-optimization .claude/skills/bp-performance-optimization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bp-performance-optimization
GitHub stars
158
Token cost
~824 tokens
SKILL.md length
223 words
Files
9
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

提供性能优化方法论、设计原则和具体优化规则。在编写代码、优化性能瓶颈、进行 code review 时使用,涵盖 CPU、内存、I/O、并发等维度。

  • Works in 2 steps: 优化目标是否明确? → 是否已经定位瓶颈?
  • Tasks that involve Performance optimization
  • SKILL.md covers 前置检查, 核心理念, 方法论 and 设计原则, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Bp Performance Optimization is an agent skill from davidYichengWei/agentic-engineering-framework. 提供性能优化方法论、设计原则和具体优化规则。在编写代码、优化性能瓶颈、进行 code review 时使用,涵盖 CPU、内存、I/O、并发等维度。

Its SKILL.md is about 820 tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files (for example `reference/cache-and-memory.md`, `reference/expression-rules.md` and `reference/logic-rules.md`).

It sits in Development, covering Performance optimization and Code review. The repository describes itself as: 开箱即用、可按项目定制的 AI Coding Agent Skills 框架:提供通用 Workflow、可扩展的项目私有知识、自我学习闭环和问题排查能力,适配任意技术栈和工程场景。兼容主流 Coding Agent。 The licence is MIT.

When your agent uses it

  • Tasks that involve Performance optimization
  • Tasks that involve Code review

Example prompts

  • “/bp-performance-optimization”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. 优化目标是否明确?
  2. 是否已经定位瓶颈?

What it can do on your machine

Read from SKILL.md and the folder at commit 1f7ac0f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bp Performance Optimization loads about 824 tokens when it runs. Until then it costs about 26 tokens; SKILL.md has 223 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~26
When it runs · the whole SKILL.md, loaded when a task matches
~824

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davidYichengWei/agentic-engineering-framework at commit 1f7ac0f, republished under its MIT licence (© davidYichengWei). 223 words, ~824 tokens.

Download SKILL.mdSave it as .claude/skills/bp-performance-optimization/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
bp-performance-optimization
description
提供性能优化方法论、设计原则和具体优化规则。在编写代码、优化性能瓶颈、进行 code review 时使用,涵盖 CPU、内存、I/O、并发等维度。

性能优化技术

前置检查

本 skill 是参考资料,不是工作流入口。

在应用本 skill 的优化规则前,必须确认:

  1. 优化目标是否明确?

    • 具体要优化什么?延迟?吞吐?内存?
    • 当前数据是多少?目标是多少?
    • 如何测量和验证?
  2. 是否已经定位瓶颈?

    • 有 profiling 数据吗?
    • 热点在哪里?

如果以上问题不清楚:

  • 涉及代码修改 → 先走 workflow-code-generation Skill(它会引导需求澄清)
  • 仅做分析 → 先与用户确认优化目标和当前数据

核心理念

优化的本质是简化。 复杂的代码通常更大、更慢、更耗能。

方法论

阶段要点
1. 定义目标明确成功标准:延迟?吞吐?内存?功耗?
2. 设计评估糟糕的设计无法靠优化弥补
3. Profile关注消耗指标(指令数、cache miss),不只是时间
4. 算法优先先优化数据结构和算法
5. 应用规则对热点应用具体优化规则

设计原则

原则说明
简单直接避免过度抽象;能删代码比加代码好
连续优于分散vector/数组优于链表(cache 友好)
直接优于间接减少指针追逐,每次间接访问都是潜在 cache miss
独占优于共享unique_ptr 无开销;shared_ptr 有原子操作开销
扁平优于深层避免复杂继承层次和虚函数派发
Early Binding把工作提前做一次,避免重复做多次
模块化清晰契约,允许局部替换而不改架构

优化规则速查

Space-for-Time(空间换时间)
规则说明
Data Structure Augmentation添加冗余信息加速操作
Precomputation预计算并存储结果
Caching缓存频繁访问的数据
Lazy Evaluation延迟计算直到真正需要

详见 reference/space-for-time.md

Time-for-Space(时间换空间)
规则说明
Packing紧凑存储减少内存占用
Overlaying复用内存空间
Interpreters用解释器压缩程序表示

详见 reference/time-for-space.md

Loop Rules(循环优化)
规则说明
Code Motion将循环不变量移出循环
Combining Tests合并测试条件,使用哨兵
Loop Unrolling展开循环减少迭代开销
Loop Fusion合并相同范围的循环

详见 reference/loop-rules.md

Logic Rules(逻辑优化)
规则说明
Algebraic Identities用等价的更廉价表达式替换
Short-Circuiting提前终止求值
Reordering Tests廉价/常成功的测试放前面
Precompute Logical Functions查表替代逻辑计算

详见 reference/logic-rules.md

Procedure Rules(过程优化)
规则说明
Inlining内联展开减少调用开销
Exploit Common Cases快速路径处理常见情况
Tail Recursion Removal尾递归转循环
Parallelism利用硬件并行能力

详见 reference/procedure-rules.md

Expression Rules(表达式优化)
规则说明
Compile-Time Initialization编译期初始化
Strength Reduction用廉价操作替代昂贵操作
Common Subexpression Elimination消除公共子表达式
Word Parallelism利用字宽并行(位操作)

详见 reference/expression-rules.md

Cache & Memory(缓存和内存)
规则说明
AoS → SoA单字段扫描时结构体数组转数组结构体
Loop Tiling分块处理,使工作集 fit 进 cache
False Sharing多线程变量对齐到不同 cache line
Arena/Pool批量分配,避免频繁 malloc

详见 reference/cache-and-memory.md

Modern C++ Tricks
规则说明
string_view/span避免拷贝,零开销抽象
Branchless减少分支预测失败惩罚
CRTP静态多态替代虚函数
Sharded Lock分片锁减少竞争

详见 reference/modern-cpp-tricks.md


Code Review 检查清单

设计层面:

  • 数据结构是否连续紧凑?
  • 是否有不必要的抽象层或间接访问?
  • 关键路径是否简单直接?

实现层面:

  • 循环不变量是否已移出?
  • 是否有可预计算的值?
  • 测试条件顺序是否最优?
  • 是否存在重复计算?

© davidYichengWei, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files in skills/bp-performance-optimization of davidYichengWei/agentic-engineering-framework.

  • SKILL.md
  • reference/cache-and-memory.md
  • reference/expression-rules.md
  • reference/logic-rules.md
  • reference/loop-rules.md
  • reference/modern-cpp-tricks.md
  • reference/procedure-rules.md
  • reference/space-for-time.md
  • reference/time-for-space.md

Open the folder on GitHubat commit 1f7ac0f

Compare with similar skills

Bp Performance Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bp Performance Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bp Performance Optimization this skilldavidYichengWei/agentic-engineering-framework158—~824Automated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Analyzing .NET Performancedotnet/skills5.6k3 repos~3.1kAutomated safety check: PassMIT
MAUI PR Performance Analysisdotnet/maui23k—~2.4kAutomated safety check: PassMIT
Performance CheckZeroDeng01/sublinkPro1.7k—~1.8kAutomated safety check: PassMIT
Code Review Specialistluongnv89/claude-howto42k—~764Automated safety check: PassMIT

Similar skills

  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Official

    Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.

    5.6k GitHub starsUsed in 3 repos~3.1k tokens
    DevelopmentAuto-check passed
  • Official

    Interprets pinned managed benchmark evidence for a dotnet/maui pull request and writes a narrative for the performance review workflow, without running or publishing anything.

    23k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Performance Check

    ZeroDeng01/sublinkPro

    Checklist for reviewing code changes that touch queries, APIs, rendering, caching or algorithms for performance, scalability and resource-usage problems.

    1.7k GitHub stars~1.8k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Code Review Specialist

    luongnv89/claude-howto

    Reviews code for security, performance, quality and maintainability, using a checklist, a finding template and two metrics scripts.

    42k GitHub stars~764 tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Thorough Code Review

    pretend1111/claude-desktop-app

    Reviews code or recent changes for bugs, security issues, performance problems and maintainability, reporting findings by severity with the reason and a fix.

    494 GitHub starsUsed in 1 repo~502 tokens
    DevelopmentAuto-check passed

More from davidYichengWei/agentic-engineering-framework

All 14 skills in this repo
  • Architecture Design Principles

    davidYichengWei/agentic-engineering-framework

    Gives architecture design principles for system design discussions and code review: module boundaries, dependency direction, data ownership and interface rules, plus a checklist.

    158 GitHub stars~545 tokensUpdated 6 mo ago
    Auto-check passed
  • General Coding Best Practices

    davidYichengWei/agentic-engineering-framework

    A checklist of language-neutral rules for writing and reviewing code: naming, function design, control flow, resource safety, comments and logging.

    158 GitHub stars~631 tokensUpdated 6 mo ago
    Auto-check passed
  • Component Design Principles

    davidYichengWei/agentic-engineering-framework

    Chinese-language checklists for component-level design: class and module structure, public interfaces, data models, concurrency and error handling.

    158 GitHub stars~1k tokensUpdated 6 mo ago
    Auto-check passed
  • Skill Authoring Guide (Chinese)

    davidYichengWei/agentic-engineering-framework

    Chinese-language guide to writing and improving SKILL.md files: frontmatter rules, concise writing, progressive disclosure, common patterns and a pre-release checklist.

    158 GitHub stars~788 tokensUpdated 6 mo ago
    Auto-check passed
  • Self-Refinement from Corrections

    davidYichengWei/agentic-engineering-framework

    Turns mistakes you correct into proposed updates to persistent Rules and Skills so the same error does not recur in later sessions, triggered automatically or with /reflect.

    158 GitHub stars~575 tokensUpdated 6 mo ago
    Auto-check passed
  • Root-Cause Troubleshooting

    davidYichengWei/agentic-engineering-framework

    Diagnoses compile errors, runtime exceptions, failing tests, pipeline failures and production alerts from code and logs, giving a root cause before any fix.

    158 GitHub stars~646 tokensUpdated 6 mo ago
    Auto-check passed

Categories

Questions about Bp Performance Optimization

What does Bp Performance Optimization do?

提供性能优化方法论、设计原则和具体优化规则。在编写代码、优化性能瓶颈、进行 code review 时使用,涵盖 CPU、内存、I/O、并发等维度。. Bp Performance Optimization is an agent skill from davidYichengWei/agentic-engineering-framework.

When should I use Bp Performance Optimization?

Bp Performance Optimization fits situations like: tasks that involve Performance optimization; tasks that involve Code review.

How do I install Bp Performance Optimization in Claude Code?

Run `npx skills add davidYichengWei/agentic-engineering-framework --skill bp-performance-optimization -a claude-code`. Or copy the skill folder (skills/bp-performance-optimization in davidYichengWei/agentic-engineering-framework) into .claude/skills/bp-performance-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Bp Performance Optimization in Codex?

Run `npx skills add davidYichengWei/agentic-engineering-framework --skill bp-performance-optimization -a codex`. Or copy the skill folder (skills/bp-performance-optimization in davidYichengWei/agentic-engineering-framework) into .agents/skills/bp-performance-optimization in your project. Codex loads it when a task matches its description.

Can I use Bp Performance Optimization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davidYichengWei/agentic-engineering-framework --skill bp-performance-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bp-performance-optimization, .gemini/skills/bp-performance-optimization, .github/skills/bp-performance-optimization and .opencode/skills/bp-performance-optimization in your project.

What does Bp Performance Optimization need to run?

SKILL.md names no scripts, command-line tools or credentials: Bp Performance Optimization is instructions for the agent only.

Does Bp Performance Optimization access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Bp Performance Optimization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bp Performance Optimization use?

Bp Performance Optimization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bp Performance Optimization use?

About 824 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bp Performance Optimization?

Skills that share tags, products or a category with Bp Performance Optimization: Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Analyzing .NET Performance (dotnet/skills, 5.6k stars), MAUI PR Performance Analysis (dotnet/maui, 23k stars) and Performance Check (ZeroDeng01/sublinkPro, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bp Performance Optimization?

davidYichengWei (a GitHub user) maintains it in davidYichengWei/agentic-engineering-framework, which has 158 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on March 25, 2026.

Source: davidYichengWei/agentic-engineering-framework on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.