benchmark-pyrefly
Skill by facebook
Runs Pyrefly benchmarks locally with Buck or Cargo, including PyTorch real-world LSP benchmarks. Covers micro, TSP, cold start, error propagation and full check timing. Aimed at developers measuring Pyrefly performance.
Install benchmark-pyrefly
Built from the published package, never by AI.
git clone --depth 1 https://github.com/facebook/pyrefly /tmp/pyrefly && mkdir -p ~/.claude/skills && cp -r /tmp/pyrefly/.agents/skills/benchmark-pyrefly ~/.claude/skills/benchmark-pyreflyRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/facebook/pyrefly /tmp/pyrefly && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/pyrefly/.agents/skills/benchmark-pyrefly ~/.gemini/antigravity-cli/skills/benchmark-pyreflyAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill runs Pyrefly performance benchmarks on a local machine using Buck or Cargo. It covers fast micro benchmarks of type-checker internals, a TSP benchmark for unopened-file solve reuse, and three heavy PyTorch benchmarks. The PyTorch benchmarks run over a pinned checkout of 15k+ Python files and measure cold start, error propagation, and full project check.
The skill also explains build modes, since debug builds run 3-10x slower and are not comparable. It says never to run two benchmarks in parallel and describes how the PyTorch source is fetched. It includes steps for updating the PyTorch pin with update_revision.sh and notes where Criterion writes output. It is aimed at developers who need to measure or compare Pyrefly performance.
Written from the project's SKILL.md and checked against it.
What it can do
- Micro benchmarksRuns fast, deterministic single-threaded benchmarks of type-checker internals.
- TSP benchmarkRuns the tsp/get_computed_type_unopened_cached benchmark for unopened-file solve reuse.
- Cold start benchmarkMeasures go-to-definition latency on a fresh server against the PyTorch checkout.
- Error propagation benchmarkMeasures how fast a type error in a distant dependent file surfaces after an edit.
- Full check benchmarkMeasures whole-project batch check throughput across all cores.
- PyTorch pin updateUpdates the pinned PyTorch revision using update_revision.sh.
- Criterion filters and flagsSelects one PyTorch bench by name and supports --list, --quick and --noplot.
What you need
- Buck2 for internal runs
- Cargo for OSS runs
- git and github.com access for the OSS PyTorch clone
- Manifold access for the internal PyTorch tarball
Try asking
- Run the pyrefly micro benchmarks with Cargo and summarize the results.
- Compare cold start and error propagation timings for Pyrefly.
- Update the PyTorch benchmark pin to a new 40-hex commit.
Good to know
- PyTorch benchmarks are slow, about 2-4 minutes per benchmark, and are manual rather than CI by default.
- Debug builds are not comparable to optimized numbers.
- Benchmarks must not run in parallel.
- Pin updates need a machine with github access, since devvm and Sandcastle have no egress.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/benchmark-pyrefly/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md7 KB
Alternatives to benchmark-pyrefly
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
benchmark-pyrefly: common questions
Can I run the Pyrefly benchmarks without Buck?
Yes. The source gives Cargo commands such as cargo bench --bench micro and cargo bench --bench pytorch for OSS use.
Why does the PyTorch benchmark need --noplot on a headless server?
The source says the plotters backend panics after a bench finishes without gnuplot or a usable font. --noplot skips report rendering and does not change timings.
Where do benchmark results go?
Criterion writes HTML plots, CSV samples and estimates.json to target/criterion/. The source says this output is ephemeral and should not be committed.
How do I install benchmark-pyrefly?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is benchmark-pyrefly free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is benchmark-pyrefly safe to use?
It scores 85 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to benchmark-pyrefly?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
