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.
npx agentmods add skills/sisibeloved/cpython-optimize-skill/pyperformance-worker-runnpx skills add sisibeloved/cpython-optimize-skill --skill pyperformance-worker-rungit clone --depth 1 https://github.com/sisibeloved/cpython-optimize-skillWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00040 | $0.01195 |
| Opus 5 | $0.00020 | $0.00598 |
| Sonnet 5 | $0.00008 | $0.00239 |
| Haiku 4.5 | $0.00004 | $0.00120 |
Grade A, and why
pyperformance-worker-run 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.
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.
How it starts
The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
pyperformance Worker Run
负责单 benchmark L2 复现,是 crash、HIR、JIT 分析的真实命令来源。
三类测试边界
- RuntimeTests 是功能测试,失败时先回到
cpython-runtime-test-run。 - test_cinderx/lib test 是集成测试,失败时不要用 pyperformance 结果遮盖。
- pyperformance 是性能测试;功能测试和集成测试未过时,只能输出调试观察,不能输出可提交性能结论。
Worker 架构 Checklist
- 先读取
../using-cpython-optimize/references/pyperformance-env-contract.md,确认 driver、manager、worker 和bench_command()子进程看到的环境变量一致。 - 使用真实
run_benchmark.py --worker,不要用交互式 import 替代。 python -m pyperformance run不是单进程执行:先有 driver/manager,再进入 benchmark worker;bench_command()还可能生成下一层子进程。sitecustomize、LD_LIBRARY_PATH、PYTHONPATH、插件开关、JIT flags 必须传到真实 worker。- CinderX worker 必须能看到系统 site-packages:确认 worker venv 的
pyvenv.cfg中include-system-site-packages = true,或用等价PYTHONPATH把系统 site-packages 放进 worker 环境。 - CinderX
.pth必须安装在 worker 可见的site-packages,且指向当前 candidate 的 CinderX;记录.pth路径和内容摘要。 - 判断 CinderX JIT 是否启用必须在 worker 内取证:
import cinderx、import _cinderx、cinderx.__file__、cinderx.get_import_error()、cinderx.is_initialized(),并和 jit.log/HIR 中的目标 benchmark 本体对应。 - Python baseline 不应误继承 CinderX 安装;如果故意比较 CinderX baseline,必须在口径里写清。
--inherit-environ至少继承代理、LD_LIBRARY_PATH、PYTHONPATH、插件开关和 JIT 关键变量。- 若
validation-skill-routerdeny 了 worker/helper 命令,不要改用简化命令绕开;先补齐pyperformance-env-contract.md要求的 worker venv /.pth/--inherit-environ/ JIT 初始化证据,再用CPYTHON_OPTIMIZE_HOOK_ACK=1前缀重试同一条真实 worker/helper 命令。 - 不能在未完成前置证据时提前加
CPYTHON_OPTIMIZE_HOOK_ACK=1;ACK 只表示已经确认真实 worker 环境可用。 - 分析阶段只增减 debug 变量,尽量保持同一真实 worker 命令。
快速 L2 命令形态
优先用仓库或容器内已有 bm/test-benchmark 快速脚本做 L2 复现,形态保持抽象:
BENCHMARK=<benchmark-selector> WARMUP=<n> PYTHONJITAUTO=<threshold> DIAG=0 /scripts/test-benchmark.sh
DIAG=0是非 debug 性能口径;只有 crash、HIR、JIT 日志定位时才切DIAG=1。- 快速 L2 可用于验证方向、复现异常或生成 worker 命令;正式性能结论仍要回到
pyperformance-suite-run的非 debug 正式命令。 - 文档和报告只写
<benchmark-selector>、<result.json>等占位,不硬编码具体 pyperformance 用例名或文件名。
故障排查 Checklist
What ships with it
4 files 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.
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.
- 2d ago First seen · 59 lines · 40 tokens per session scan A e4a269a64f47
pyperformance-worker-run is a skill published in the GitHub repository sisibeloved/cpython-optimize-skill (2 stars, last pushed 4d ago), licensed MIT. It adds 40 tokens to every session and 1,195 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.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
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.
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.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
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.
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…