Skills for Claude Code and other AI Agents#4
Open
rudolfolah wants to merge 3 commits into
Open
Conversation
rudolfolah
commented
Jul 11, 2026
|
|
||
| Use this skill when the subject is JavaScript running in a browser page: page-load cost, interaction latency, rendering jank, long tasks, layout/paint work, or objects retained by a page. The primary reference is the [Chrome DevTools Performance features reference](https://developer.chrome.com/docs/devtools/performance/reference). | ||
|
|
||
| This is **browser-page profiling**, not Node.js process profiling. The existing JavaScript/Node.js skill covers `node --cpu-prof`, `node --heap-prof`, `--trace-gc`, V8 heap APIs, and server-side tools. Do not use those Node flags as a substitute for recording a page: they profile a Node process and its isolate. A Node `.cpuprofile` or `.heapprofile` can be opened in DevTools, but it is not a browser Performance trace and does not include the page's renderer, network, layout, paint, or user interaction. Use the Performance and Memory panels below for a browser page. |
Owner
Author
There was a problem hiding this comment.
The skill needs to be independent and should not reference other skills.
Suggested change
| This is **browser-page profiling**, not Node.js process profiling. The existing JavaScript/Node.js skill covers `node --cpu-prof`, `node --heap-prof`, `--trace-gc`, V8 heap APIs, and server-side tools. Do not use those Node flags as a substitute for recording a page: they profile a Node process and its isolate. A Node `.cpuprofile` or `.heapprofile` can be opened in DevTools, but it is not a browser Performance trace and does not include the page's renderer, network, layout, paint, or user interaction. Use the Performance and Memory panels below for a browser page. | |
| This is **browser-page profiling**, not Node.js process profiling. Node.js flags include `node --cpu-prof`, `node --heap-prof`, `--trace-gc`, V8 heap APIs, and server-side tools. Do not use those Node flags as a substitute for recording a page: they profile a Node process and its isolate. A Node `.cpuprofile` or `.heapprofile` can be opened in DevTools, but it is not a browser Performance trace and does not include the page's renderer, network, layout, paint, or user interaction. Use the Performance and Memory panels below for a browser page. |
|
|
||
| | Question | First workflow | Main evidence | | ||
| | --- | --- | --- | | ||
| | Why is an interaction or animation janky? | Performance panel, runtime recording | Main-thread tasks, frames, interactions, scripting, style/layout, paint, and user-timing markers | |
Owner
Author
There was a problem hiding this comment.
A skill could be added for profiling React apps.
Owner
Author
There was a problem hiding this comment.
There are MCPs for Unity and Godot, those can be referenced:
Use the Unity MCP if available.
Owner
Author
There was a problem hiding this comment.
This can be split into supporting files, for NVIDIA, AMD, Android, Intel, Metal.
Owner
Author
Owner
Author
There was a problem hiding this comment.
All the references to Python 3.11 and .python-version should be removed. DTrace has been supported since Python 3.6.
| @@ -0,0 +1,76 @@ | |||
| # Python Profiling Skill | |||
|
|
|||
| Use this skill when investigating CPU time, wall-clock latency, Python allocations, process memory, object growth, or interpreter-level events in the examples under `python/`. The repository compares multiple profilers around `python/program.py`; choose the narrowest tool that can answer the question instead of running every profiler by default. | |||
Owner
Author
There was a problem hiding this comment.
Suggested change
| Use this skill when investigating CPU time, wall-clock latency, Python allocations, process memory, object growth, or interpreter-level events in the examples under `python/`. The repository compares multiple profilers around `python/program.py`; choose the narrowest tool that can answer the question instead of running every profiler by default. | |
| Use this skill when investigating CPU time, wall-clock latency, Python allocations, process memory, object growth, or interpreter-level events. Choose the narrowest tool that can answer the question instead of running every profiler by default. |
Comment on lines
+6
to
+8
|
|
||
| The examples target the Python version in `python/.python-version` and use the virtual environment described in `python/README.md`: | ||
|
|
Owner
Author
There was a problem hiding this comment.
Suggested change
| The examples target the Python version in `python/.python-version` and use the virtual environment described in `python/README.md`: |
Comment on lines
+25
to
+36
| `program.py` fetches a Wikipedia page over HTTPS before parsing it. Treat a non-empty top-ten word list as the baseline preflight; `[]` means the intended parsing workload did not run and the resulting profile is not useful. The current target calls `requests.get(...)` without a descriptive `User-Agent` or `raise_for_status()`, so Wikimedia may return its small HTTP 403 robot-policy response and the program may silently print `[]`. If that happens, stop before profiling and make the workload valid: preferably use a checked-in/local fixture, or update the request to use a policy-compliant descriptive `User-Agent` and fail on non-success responses. Do not compare a rejection-response profile with a successful-page profile. | ||
|
|
||
| Even with a successful response, network, DNS, TLS, server, and response-size variance can dominate timings. For repeatable comparisons, keep the input and environment fixed; never treat one network run as a reliable regression measurement. | ||
|
|
||
| The repository's comparison runner is: | ||
|
|
||
| ```bash | ||
| ./timing.sh | ||
| ``` | ||
|
|
||
| It invokes cProfile, tracemalloc, Memray, pyinstrument, yappi, Filprofiler, psutil, and guppy3. Profiling changes both runtime and memory behavior, so compare profiles only under the same Python build, dependency versions, input, warm-up state, and command-line options. | ||
|
|
Owner
Author
There was a problem hiding this comment.
Suggested change
| `program.py` fetches a Wikipedia page over HTTPS before parsing it. Treat a non-empty top-ten word list as the baseline preflight; `[]` means the intended parsing workload did not run and the resulting profile is not useful. The current target calls `requests.get(...)` without a descriptive `User-Agent` or `raise_for_status()`, so Wikimedia may return its small HTTP 403 robot-policy response and the program may silently print `[]`. If that happens, stop before profiling and make the workload valid: preferably use a checked-in/local fixture, or update the request to use a policy-compliant descriptive `User-Agent` and fail on non-success responses. Do not compare a rejection-response profile with a successful-page profile. | |
| Even with a successful response, network, DNS, TLS, server, and response-size variance can dominate timings. For repeatable comparisons, keep the input and environment fixed; never treat one network run as a reliable regression measurement. | |
| The repository's comparison runner is: | |
| ```bash | |
| ./timing.sh | |
| ``` | |
| It invokes cProfile, tracemalloc, Memray, pyinstrument, yappi, Filprofiler, psutil, and guppy3. Profiling changes both runtime and memory behavior, so compare profiles only under the same Python build, dependency versions, input, warm-up state, and command-line options. | |
| Profiling changes both runtime and memory behavior, so compare profiles only under the same Python build, dependency versions, input, warm-up state, and command-line options. |
Owner
Author
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A set of skills that can be used by Claude Code and other AI agents. To ensure that most of the skills are usable, I used Oh My Pi with GPT 5.5 and GPT 5.6 Sol to generate programs and outfit them with performance profiling tools, only tested on a MacBook Pro. If the skills do not work, please create an issue.
Skills: