performance-regression-estimator
Finds performance hazards in a proposed solution before code is written, by severity and hot-path placement. Use when a graduated or full lane change touches data access, request handlers, scheduled jobs or a stated latency or throughput need.
- License 许可
- MIT
- 所属仓库
- Eliyce/paqad-ai
- 最近更新
- 2026-11-13
- Stars
- ★ 8
- Forks
- 0
01 前言 Front Matter
- name
- performance-regression-estimator
- metadata
- { "cacheable": "false", "model_tier": "reasoning", "paqad-meta": "skill.meta.yaml", "output_format": "markdown" }
- description
- Finds performance hazards in a proposed solution before code is written, by severity and hot-path placement. Use when a graduated or full lane change touches data access, request handlers, scheduled jobs or a stated latency or throughput need.
02 资源文件 7
- 参考文档agents/openai.yaml221 B
- 资产文件assets/output.template.md695 B
- 资产文件assets/severity-rubric.txt267 B
- 参考文档references/perf-hazards.md2.3 KB
- 脚本scripts/lint-output.sh1.3 KB
- 脚本scripts/scan-perf-smells.sh1.5 KB
- 参考文档skill.meta.yaml704 B
03 SKILL.md 正文
What It Does
Reads a proposed implementation outline and the changed files, scans for known performance hazards (N+1 queries, sync-in-async, missing pagination, suspicious caching, sequential network calls, hot-path logging), and classifies each by severity and hot-path placement.
The point is to catch latency and cost regressions during planning, not after a load test or a customer-facing slowdown.
Use This When
In the graduated and full lanes whenever the change touches data access, request handlers, scheduled jobs, or anything with a stated latency or throughput requirement. Skip when the change is purely structural (renames, moves) and exercises no new code paths.
Inputs
- Read the proposed solution at
proposed_solution_pathfirst. - Read the changed-file list to scope hazards to code that is actually changing.
- Read canonical module docs in
module_doc_pathsfor declared latency budgets and throughput targets: a hazard on a hot path with a sub-100ms budget is much more severe than the same hazard on a daily batch job. - Read
references/perf-hazards.mdbefore classifying any hazard so the catalog and severity rubric stay consistent.
Procedure
- Enumerate code paths the change introduces/modifies (handlers, jobs, consumers, libs); mark each as hot-path or not based on canonical module docs.
- Run
scripts/scan-perf-smells.sh <changed-files...>to surface candidate hazards (N+1, await-in-loop, async-map without Promise.all, deep-clone-via-JSON, log-in-hot-path, unbounded-pagination, cache-without-invalidation, sequential-fetch). - Classify each detected hazard using
assets/severity-rubric.txt:highonly when on a hot path;mediumon cold path with unbounded volume;lowotherwise. - For every
highhazard, propose a concrete remediation tied to the samefile:line. - Format per
assets/output.template.md; validate withscripts/lint-output.sh.
Output Contract
- Return a heading named
Performance Hazards. - Provide a
Hazard Maptable with columns#,Hazard,Path,On hot path?,Severity,Remediation. - Provide a
Recommended Pre-Merge Actionsordered list of thehigh-severity hazards' remediations. - Provide an
Open Questionssection listing paths whose hot-path status could not be confirmed from the available docs. - When no hazards are detected, return
Performance Hazards: none detected.exactly.
See assets/output.template.md for the canonical shape; scripts/lint-output.sh enforces it.
Escalate / Stop Conditions
- Ask when the module's hot-path classification cannot be derived from canonical docs and the proposed solution implies a tight latency budget.
- Warn when caching is being added without a documented invalidation rule: recommend either declaring the rule or removing the cache layer.
- Do not silence a
highhazard with phrases like "we'll fix it later": high hazards must either be remediated or explicitly deferred via a Decision Packet.
Resources
references/perf-hazards.mdscripts/scan-perf-smells.shscripts/lint-output.shassets/output.template.mdassets/severity-rubric.txtagents/openai.yaml
04 同仓库更多 Skills
sample-skill
Sample bundled skill fixture
processing-invoices
Turns a supplier invoice into one ledger line. Use when a supplier invoice arrives and needs booking.
processing-invoices
Turns a supplier invoice into one ledger line. Use when a supplier invoice arrives and needs booking.
understand-idea
Chat and Claude Code: Step 1 of the discover journey: clarifies the goal, who benefits, success and constraints into the idea block. Use when the journey directs it to step 1, not directly.
size-work
Chat and Claude Code: Suggest a size for a ticket from comparable finished work, as a labelled suggestion the team still owns. Use it when someone asks "how big is this?", "roughly how much work is ABC-12?", or wants a backlog item sized. It finds the team's sizing scale at first use, picks two to five of the closest finished tickets with links, and gives a size or range with the drivers behind it and a confidence of low, medium or high, lowered and explained when the area's documents are template text. Every result is labelled a suggested size, never a date or a commitment. It writes nothing into the size field unless the user says "set it", and it refuses to overwrite an existing size unless the user asks to replace it. Produces the sizing block of the record.
refine-ticket
Chat and Claude Code: Improve one or more existing tracker tickets without losing the author's intent. Use it when someone wants a ticket read, diagnosed and tidied up ("this ticket is vague", "fix up ABC-12", "split this, it's too big"). It reads each ticket in full and snapshots it with its last-updated time, says what is wrong with evidence, and proposes a field-by-field before and after change set limited to summary, description, labels, parent, links and new child tickets on a split. It writes nothing until an explicit "apply it" bound to that exact change set, re-checks the ticket for conflicting edits just before writing, never replaces rich descriptions with plain text, never deletes or closes a ticket, and reads each ticket back after applying. Produces the existing and changes blocks of the record.