Agent skill

Zhihu Performance Regression Review

by zly2006 in zly2006/zhihu-plus-plus

Review and fix Zhihu++ functional regressions caused by performance optimizations.

AGPL-3.0Auto-check passedBackend & APIs

Install Zhihu Performance Regression Review

skills CLI
$ npx skills add zly2006/zhihu-plus-plus --skill zhihu-performance-regression-review -a claude-code

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

GitHub CLI
$ gh skill install zly2006/zhihu-plus-plus zhihu-performance-regression-review --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/zly2006/zhihu-plus-plus.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/zhihu-performance-regression-review .claude/skills/zhihu-performance-regression-review && 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
zhihu-performance-regression-review
GitHub stars
4.2k
Token cost
~868 tokens
SKILL.md length
142 words
Files
2
Skills in repo
11
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Review and fix Zhihu++ functional regressions caused by performance optimizations.

  • Works in 5 steps: 固定基线 → 拆解缓存生命周期 → 分阶段测真实路径 → …
  • A change trades correctness
  • SKILL.md covers 交付门禁, 1. 固定基线, 2. 拆解缓存生命周期 and 3. 分阶段测真实路径, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Zhihu Performance Regression Review is an agent skill from zly2006/zhihu-plus-plus. Review and fix Zhihu++ functional regressions caused by performance optimizations. Use when a change trades correctness, selection, rendering, scrolling, navigation, or state completeness for laziness, caching, recycling, batching, deferred work, or reduced data structures; also use when deciding whether restoring older behavior would really regress performance. Requires cache-lifetime analysis, real-path staged benchmarks, functional regression coverage, and before/after evidence before implementation or PR…

Its SKILL.md is about 870 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Backend & APIs, covering Performance optimization and Caching. It works with Android. The repository describes itself as: Zhihu++ | 知乎++: Ad-free, low cost, AI powered zhihu android 3rd-party client. 去广告、占用低、AI大模型的新时代知乎安卓端体验. The licence is AGPL-3.0.

When your agent uses it

  • A change trades correctness
  • State completeness for laziness
  • Reduced data structures
  • Also use when deciding whether restoring older behavior would really regress performance

Example prompts

  • “/zhihu-performance-regression-review”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. 固定基线
  2. 拆解缓存生命周期
  3. 分阶段测真实路径
  4. 比较候选方案
  5. 决策与交付

What it can do on your machine

Read from SKILL.md and the folder at commit eb9d9a7. 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

Zhihu Performance Regression Review loads about 868 tokens when it runs. Until then it costs about 140 tokens; SKILL.md has 142 words of instructions outside code blocks.

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

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 zly2006/zhihu-plus-plus at commit eb9d9a7, republished under its AGPL-3.0 licence (© zly2006). 142 words, ~868 tokens.

Download SKILL.mdSave it as .claude/skills/zhihu-performance-regression-review/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
zhihu-performance-regression-review
description
Review and fix Zhihu++ functional regressions caused by performance optimizations. Use when a change trades correctness, selection, rendering, scrolling, navigation, or state completeness for laziness, caching, recycling, batching, deferred work, or reduced data structures; also use when deciding whether restoring older behavior would really regress performance. Requires cache-lifetime analysis, real-path staged benchmarks, functional regression coverage, and before/after evidence before implementation or PR delivery.

Zhihu++ 性能回归复核

交付门禁

回归修复必须先在相对基线运行同一测试并确认失败,再验证修复后通过;不得用编译成功、静态推理或只覆盖新 helper 的测试替代红到绿证据。一次性逻辑应留在真实调用点。

把“功能正确”和“性能不回退”作为同一个验收目标。不要默认保留现有优化实现,也不要默认恢复旧实现;先用真实生命周期和测量结果选择改动最小、契约最完整的方案。

LazyColumn 列表动画边界

animateItem 只有挂在 LazyColumn 的直接 item 根节点上,才能观察到 item 重排或移除后的位移动画。把它放在 item 内部卡片、AnimatedVisibility 或卡片自身上,只会影响子树布局,不能驱动兄弟 item 的列表动画。排查时先确认 item(key) 的根节点和稳定 key,再检查状态列表是否以不可变新列表触发重组。

1. 固定基线

  1. 记录当前分支、回归来源 commit/PR 和修改前工作区状态。
  2. 在改代码前运行用户感知路径的基准,保存设备、变体、输入、预热次数和原始样本。
  3. 写出被破坏的产品契约,例如“全选覆盖完整文档”,不要把当前实现细节当成契约。
  4. 增加一个修改前必定失败、修复后通过的最小功能测试;测试必须经过修改前失败验证。

2. 拆解缓存生命周期

逐层回答以下问题,并用源码、计数器或计时验证:

  • 缓存保存什么:输入转换、AST、测量结果、布局结果、绘制结果,还是仅占位高度?
  • 缓存归谁持有:进程、页面、父组合、子组合、列表项还是单次调用?
  • 什么事件会失效:宽度、字体、主题、节点内容、滚出视口、导航或进程重建?
  • 回收后重建是否命中缓存?Compose remember 只在对应组合仍存活时有效,不能把父层高度缓存误认为子内容布局缓存。
  • 缓存命中是否仍执行测量、布局或绘制?对象复用不等于用户路径没有成本。

至少区分四类样本:

  1. 冷启动首次执行。
  2. 同一存活组合内重复执行。
  3. 内容回收或组合销毁后重新创建。
  4. 用户触发完整能力时的按需执行,例如全选、跳转或滚回已读区域。

如果强化回归测试覆盖的是用户真实会连续执行的动作,CI 失败应视为实现尚未闭环,不能通过删除动作或缩窄产品契约换取通过。先确认失败是否暴露了缓存回收、身份重建或状态跨动作丢失,再修实现;只有证据证明该动作不属于受支持行为时,才能调整测试。例子:长文全选后继续滚动检查范围再复制是正常使用路径,离屏节点在滚动中更换导致复制为空时,应稳定选择数据或节点身份,不能退回只测“全选后立即复制”。

完整能力存在多个等价入口时,先列出并验证它们是否共享同一个状态机,不能只为其中一个入口增加旁路状态。例子:全文范围既可能来自“全选”,也可能来自用户持续拖动选择手柄;如果只在点击“全选”后切换到完整文档状态,拖动路径仍会丢失离屏内容,而且同一份选区会出现两套互不兼容的语义。应让长按、拖动、全选、滚动和复制共享同一个选择源,并分别覆盖至少一个菜单入口和一个直接交互入口。

文本选择修复必须保存并实际查看进入选中状态后的截图,不能用“长按命令执行成功”、复制结果正确、测试 tag 存在或未选中页面截图代替视觉证据。截图至少要证明选区背景覆盖了目标字符,开始和结束手柄处于合理位置;涉及划线、高亮、链接等特殊 inline 节点时,还必须在该节点上真实长按并拖动一次,再截图检查选区是否能进入、跨出和保持可见。没有看过这些选中态画面,不得宣布选择问题已修复。

3. 分阶段测真实路径

先定位阶段成本,再解释端到端数字:

  • 输入解码或 HTML 转换
  • 文档结构构建
  • 文本、公式和富内容测量
  • 布局
  • 绘制与首帧
  • 回收、重建和交互动作

基准必须命中真实输入和真实 UI 路径;不要预构造结果、跳过布局绘制或只测无关内部函数。先预热,再在同一设备、构建和输入上采集多次原始样本。报告中同时保留中位数和样本分布,不用单次最好结果下结论。

功能测试和性能测试只要 Compose JVM 能覆盖,就优先在 JVM 上执行,减少 AVD 构建、启动和占用;JVM 性能数字不能直接当作手机性能结论,必须定期用同一输入、同一测量边界在真实手机或少量 AVD 样本上校准倍率,再用该倍率换算手机门槛。AVD 只用于建立或刷新倍率、验证平台特有行为和最终抽查,不能每轮优化都依赖 AVD。例子:桌面端完整布局与绘制为 30 ms,只有同场景 Android 样本证明倍率约为 3 倍时,才能把它对应到约 90 ms 的手机预算;换机器、Compose 版本或渲染路径后应重新校准。

4. 比较候选方案

至少审查以下三类方案,删除无法证明必要性的分支:

  1. 恢复完整行为:如果重复布局确实被有效缓存,优先恢复自然、语义完整的实现。
  2. 按需完整化:首屏保持惰性,在用户触发完整能力时再 materialize;必须测触发延迟,并确认公开 API 能稳定表达该状态机。
  3. 数据与视觉解耦:布局保持惰性,完整文档能力由 AST 或状态层提供;必须验证选择范围、复制内容、无障碍和语义树仍符合产品契约。

以下信号说明方案过于 hack,应继续寻找替代方案:

  • 用不可见 UI 冒充数据层状态。
  • 依赖内部 API、时序等待或上下文菜单实现细节。
  • 只修“复制出来的字符串”,却没有恢复用户看到的选择范围或手柄行为。
  • 为保留性能丢失结构语义、格式或无障碍信息。

如果相关代码已经用可复现数据注明“恢复全文布局”会造成秒级首帧或 OOM,就必须把这条证据当成候选方案的硬性否决条件,不能因为删除现有 hack 后代码更短而重新提出全量物化。此时应修复惰性结构与框架状态的边界,让真实渲染节点继续作为唯一内容源;代码简洁只在正确性和已验证性能边界内比较。例子:离屏富内容已证明不能常驻时,应让选择状态跨节点卸载保存并在节点回来时重接,而不是关闭延迟渲染换取默认选择。

不过,不要仅因实现形式不漂亮就否决它。如果公共框架没有表达完整契约的接口,窄范围、带回归测试且性能证据充分的桥接方案可以保留;必须在代码注释中说明框架边界和触发条件。

5. 决策与交付

选择同时满足以下条件的唯一方案:

  • 功能回归测试通过,覆盖真实长内容和离屏部分。
  • 修改前后的首帧、滚动、回收后重建和目标交互均有可比较数据。
  • 没有依靠与瓶颈无关的微基准宣称“无回归”。
  • 新增状态、抽象和请求都对应已验证的产品行为;删除薄包装和猜测性兼容。
  • 按项目规定完成构建、格式化、设备验证和 PR 检查。

在 PR 中写清:根因、缓存生命周期、原始性能样本、功能测试的修改前失败证据、最终方案为何优于其余候选。不要只写百分比或“体感无变化”。

© zly2006, AGPL-3.0. 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 1 other file in .agents/skills/zhihu-performance-regression-review of zly2006/zhihu-plus-plus.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit eb9d9a7

Compare with similar skills

Zhihu Performance Regression Review 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.

Zhihu Performance Regression Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Zhihu Performance Regression Review this skillzly2006/zhihu-plus-plus4.2k—~868Automated safety check: PassAGPL-3.0
Cloudflare Workers Performancesecondsky/claude-skills227—~1.6kAutomated safety check: PassMIT
Keybase RPC Log Analysiskeybase/client9.3k—~3kAutomated safety check: PassBSD-3-Clause
Performance CheckZeroDeng01/sublinkPro1.7k—~1.8kAutomated safety check: PassMIT
Eviction Policy Regret Auditben-manes/caffeine18k—~18kAutomated safety check: NotesApache-2.0
Content-Hash File Cache Patternaffaan-m/ECC277k5 repos~1.4kAutomated safety check: PassMIT

Similar skills

  • Cloudflare Workers Performance

    secondsky/claude-skills

    Cloudflare Workers performance optimization with CPU, memory, caching, bundle size.

    227 GitHub stars~1.6k tokensUpdated 13 days ago
    Backend & APIsAuto-check passed
  • Captures a clean Keybase service log and analyzes it for redundant, duplicated or looping RPCs, then checks whether a caching fix reduced the calls.

    9.3k GitHub stars~3k tokensUpdated yesterday
    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
  • Searches synthetic workloads for cases where Caffeine's adaptive eviction policy falls short of its achievable hit rate, then classifies each gap by cause.

    18k GitHub stars~18k tokensUpdated today
    DevelopmentAuto-check: notes
  • Caches slow file processing results in Python keyed by a SHA-256 hash of the file content, so renames still hit the cache and edits invalidate it automatically.

    277k GitHub starsUsed in 5 repos~1.4k tokens
    DevelopmentAuto-check passed
  • Performance Optimization

    ThibautBaissac/rails_ai_agents

    Identifies and fixes Rails performance issues including N+1 queries, slow queries, and memory problems.

    665 GitHub stars~1.2k tokensUpdated 4 mo ago
    DevelopmentAuto-check: notes

More from zly2006/zhihu-plus-plus

All 11 skills in this repo
  • Zhihu Pp AI Slop Cleaner

    zly2006/zhihu-plus-plus

    A skill your agent uses for Zhihu++ maintenance work that scans Kotlin main sources for low-call functions, structurally similar function bodies, dead code, pure forwarding wrappers, pointless…

    4.2k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Zhihu Instrument Test Governance

    zly2006/zhihu-plus-plus

    Audit, add, migrate, or remove Zhihu++ Android instrument tests under app/src/androidTest.

    4.2k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • GitHub PR Assets

    zly2006/zhihu-plus-plus

    Manage screenshots and other visual assets for GitHub pull requests.

    4.2k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Launch On Device

    zly2006/zhihu-plus-plus

    Build, install, and launch the Zhihu++ Android app on a connected device using ADB.

    4.2k GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Picky User

    zly2006/zhihu-plus-plus

    以 subagent 启动的 UI 挑剔用户评审。Use when the user, AGENTS, or the current task requires “挑剔的用户”.

    4.2k GitHub stars~744 tokensUpdated today
    Auto-check passed
  • Release Latex Fork

    zly2006/zhihu-plus-plus

    Release the LaTeX fork used by Zhihu++. An agent skill from zly2006/zhihu-plus-plus.

    4.2k GitHub stars~1.8k tokensUpdated today
    Auto-check passed

Works with

Questions about Zhihu Performance Regression Review

What does Zhihu Performance Regression Review do?

Review and fix Zhihu++ functional regressions caused by performance optimizations. Zhihu Performance Regression Review is an agent skill from zly2006/zhihu-plus-plus. Review and fix Zhihu++ functional regressions caused by performance optimizations.

When should I use Zhihu Performance Regression Review?

Zhihu Performance Regression Review fits situations like: A change trades correctness; state completeness for laziness; reduced data structures; also use when deciding whether restoring older behavior would really regress performance.

How do I install Zhihu Performance Regression Review in Claude Code?

Run `npx skills add zly2006/zhihu-plus-plus --skill zhihu-performance-regression-review -a claude-code`. Or copy the skill folder (.agents/skills/zhihu-performance-regression-review in zly2006/zhihu-plus-plus) into .claude/skills/zhihu-performance-regression-review in your project. Claude Code loads it when a task matches its description.

How do I install Zhihu Performance Regression Review in Codex?

Run `npx skills add zly2006/zhihu-plus-plus --skill zhihu-performance-regression-review -a codex`. Or copy the skill folder (.agents/skills/zhihu-performance-regression-review in zly2006/zhihu-plus-plus) into .agents/skills/zhihu-performance-regression-review in your project. Codex loads it when a task matches its description.

Can I use Zhihu Performance Regression Review 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 zly2006/zhihu-plus-plus --skill zhihu-performance-regression-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/zhihu-performance-regression-review, .gemini/skills/zhihu-performance-regression-review, .github/skills/zhihu-performance-regression-review and .opencode/skills/zhihu-performance-regression-review in your project.

What does Zhihu Performance Regression Review need to run?

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

Does Zhihu Performance Regression Review 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 Zhihu Performance Regression Review 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 Zhihu Performance Regression Review use?

Zhihu Performance Regression Review is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Zhihu Performance Regression Review use?

About 868 tokens (SKILL.md is roughly 3.5k 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 Zhihu Performance Regression Review?

Skills that share tags, products or a category with Zhihu Performance Regression Review: Cloudflare Workers Performance (secondsky/claude-skills, 227 stars), Keybase RPC Log Analysis (keybase/client, 9.3k stars), Performance Check (ZeroDeng01/sublinkPro, 1.7k stars) and Eviction Policy Regret Audit (ben-manes/caffeine, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Zhihu Performance Regression Review?

zly2006 (a GitHub user) maintains it in zly2006/zhihu-plus-plus, which has 4,229 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 10, 2026.

Source: zly2006/zhihu-plus-plus on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.