pyperformance-stat-report

A report generator for existing pyperformance JSON files. pyperformance is a Python tool that measures how fast programs run.

In plain words
What is it for?
Use it to compare two or more benchmark runs, select particular tests, print console summaries, or create Excel and trend-image reports.
Why use it?
It turns raw benchmark results into comparison tables and visual reports without running the benchmarks again.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/sisibeloved/cpython-optimize-skill/pyperformance-stat-report
Any agent
npx skills add sisibeloved/cpython-optimize-skill --skill pyperformance-stat-report
Clone the repo
git clone --depth 1 https://github.com/sisibeloved/cpython-optimize-skill

Made for: Claude Code, Codex.

Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 744 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00048 $0.00744
Opus 5 $0.00024 $0.00372
Sonnet 5 $0.00010 $0.00149
Haiku 4.5 $0.00005 $0.00074

Measured 2d ago against content hash eea29825f386, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pyperformance-stat-report 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/get_stat.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/cpython-optimize-skill/skills/pyperformance-stat-report/SKILL.md · 62 lines

What it actually says

pyperformance Stat Report

负责把已存在的 pyperformance JSON 结果整理成适合人工阅读和汇报的统计产物。此 skill 只读结果,不负责跑 benchmark,也不能替代 pyperformance-result-compare 对 baseline source、CPU affinity、worker env、噪声和可信度的判断。

CinderX/JIT 性能结论必须先确认结果满足 ../using-cpython-optimize/references/pyperformance-env-contract.mdget_stat.py 只格式化已有数据。

输入

  • 两个或更多 run.json / pyperformance JSON 文件,按对比顺序传入。
  • 第一个 JSON 是 ratio 计算的 baseline。
  • 可选 benchmark 名称,用于只输出指定用例。

脚本

从已加载 skill 的目录解析 bundled helper 绝对路径,不要假设当前目录是插件根目录。保持报告输出目录为 working directory:

SKILL_DIR="/absolute/path/from-loaded-skill/pyperformance-stat-report"
SCRIPT="$SKILL_DIR/scripts/get_stat.py"
cd <report-output-directory>
python "$SCRIPT" [-c] [-b <benchmark>]... <baseline.json> <candidate.json> [more.json ...]

JSON 可以使用绝对路径,也可以使用相对报告目录的路径。未传 JSON 时脚本会扫描当前目录 *.json;正式报告中优先写显式路径。

模式

  • -c / --console-only:只打印对比表,不生成文件,不需要 openpyxlmatplotlib
  • 默认模式:打印表格,在临时目录生成完整报告后统一发布 benchmark_comparison.xlsxbenchmark_trends_part<N>.png;生成失败时保留上一套完整报告。
  • -b / --benchmarks:只保留指定的公共 benchmark;每个 benchmark 单独写一个 -b,例如 -b 2to3 -b chaos,并保持用户给定顺序。

默认产物模式需要:

python -m pip install openpyxl matplotlib

语义

  • 只比较所有有效 JSON 共有的 benchmark。
  • 第一个 JSON 必须成功加载且包含 benchmark;除 baseline 外还必须至少有一个有效 candidate。
  • 拒绝通过等价路径、符号链接或硬链接重复传入同一物理 JSON,避免自比较报告。
  • 单项 ratio 和几何平均都使用 baseline_time / current_time
  • ratio 大于 1.0 表示快于第一个 JSON;小于 1.0 表示慢于第一个 JSON。
  • 显示单位按 baseline 文件中该 benchmark 的耗时量级选择。

输出要求

使用此 skill 时必须输出:

  • 真实命令和 working directory;
  • JSON 顺序,以及哪个文件是 baseline;
  • benchmark filter(如使用);
  • 公共 benchmark 数量;
  • 生成的 benchmark_comparison.xlsx / benchmark_trends_part<N>.png 路径,或说明使用了 --console-only
  • 被跳过的 JSON 或未命中的指定 benchmark。
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 62 lines · 48 tokens per session scan A eea29825f386

Subscribe to this mod's changes

pyperformance-stat-report is a skill published in the GitHub repository sisibeloved/cpython-optimize-skill (2 stars, last pushed 4d ago), licensed MIT. It adds 48 tokens to every session and 744 once invoked, about $0.0002 per session on Opus 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

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens