system-profile
Was er macht
Dieser Skill misst, wie ein Programm oder System arbeitet, etwa bei CPU-, Speicher-, GPU- oder Netzwerknutzung, und berichtet die Engpässe. Er ist für Entwickler gedacht, die verstehen wollen, warum etwas langsam ist.
Wann du ihn nutzt
- ✓Wenn ein Skript oder Programm langsam ist und du den Engpass finden willst.
- ✓Wenn du GPU-, Speicher- oder Verbindungsnutzung während eines Laufs prüfen willst.
- ✓Wenn du eine Leistungszusammenfassung mit den wichtigsten langsamen Stellen willst.
Link zum Skill
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/skills-codex/system-profile/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Ich möchte, dass mein Trainingsskript untersucht wird, weil es langsam ist, und ich will wissen, wo der Engpass liegt.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Agent wählt Profiling-Werkzeuge für das Ziel, etwa Python-Profiler oder GPU-Monitore, und ergänzt bei Bedarf Messcode. Er führt sie aus, wertet die Ergebnisse aus und schreibt eine Zusammenfassung.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
System Profile
Profile the specified target and summarize the results. Target: $ARGUMENTS
Instructions
You are a profiling assistant. Based on the user's target, choose appropriate profiling strategies, including writing instrumentation code when needed, then run profiling, analyze results, and produce a summary.
Step 1: Determine the profiling target
Parse $ARGUMENTS to understand what to profile. Examples:
- A Python script or module
- A running process (PID or service name)
- A specific function or code block
- An entire framework or system (e.g., "autogen", "vllm serving") — profile its end-to-end execution, identify bottlenecks across components
- "gpu" / "interconnect" / "memory" for focused profiling
If $ARGUMENTS is empty or unclear, ask the user.
Step 2: Choose profiling methods
Select from external tools and/or code instrumentation as appropriate. Don't limit yourself to the examples below — use whatever makes sense for the target.
External tools (check availability first):
- CPU:
cProfile,py-spy,line_profiler,perf stat,/usr/bin/time -v - Memory:
tracemalloc,memory_profiler,memray - GPU:
nvidia-smi,nvidia-smi dmon,nvitop,torch.profiler,nsys - Interconnect:
nvidia-smi topo -m,nvidia-smi nvlink,NCCL_DEBUG=INFO - System:
strace -c,iostat,vmstat
Code instrumentation — when external tools are insufficient, write and insert profiling code into the target. Typical scenarios:
- Timing specific code blocks (wall time vs CPU time)
- Measuring CPU-GPU or GPU-GPU transfer size, frequency, and bandwidth
- Tracking memory allocation across CPU and GPU to detect redundancy
- Wrapping NCCL collectives to measure latency and throughput
- Adding CUDA event timing around kernels
Design the instrumentation based on what you observe in the code — don't use a fixed template.
Step 3: Key dimensions to investigate
Depending on the target, focus on some or all of these:
CPU overhead
- Context switching (voluntary / involuntary)
- CPU utilization: ratio of CPU time to wall time
- Per-function execution time hotspots
Memory overhead
- CPU and GPU memory usage (allocated vs reserved vs peak)
- Redundant replication: same data living on both CPU and GPU
- Per-device allocation balance in multi-GPU setups
Interconnect & communication
- CPU-GPU transfer: frequency, per-transfer size, total volume, bandwidth achieved
- GPU-GPU transfer: P2P bandwidth, NVLink vs PCIe topology impact
- NCCL collectives: operation type, message size distribution, latency
- Communication-to-computation ratio
GPU compute
- SM utilization, kernel launch overhead
- Memory bandwidth utilization vs peak
Step 4: Instrumentation guidelines
When inserting code into the target:
- Read and understand the target code first
- Prefer wrapping (decorator, context manager, standalone runner) over inline edits
- If inline edits are necessary, mark them clearly (e.g.,
# [PROFILE]comments) - Minimize observer effect — don't instrument tight inner loops; sample instead
- Collect results into a structured log, don't scatter print statements
Step 5: Run profiling
- Check available tools and hardware topology
- Run the chosen methods, capture all output
- Save artifacts (flamegraphs, traces, logs) to
./profile_output/
Step 6: Produce the report
Part A — Profiling results (structured tables by dimension, as applicable):
- CPU overhead table
- Memory overhead table (with redundancy column)
- Interconnect table (transfer type / frequency / size / latency / bandwidth)
- Hotspots / bottleneck identification
- Actionable recommendations ranked by expected impact
Part B — Instrumentation changelog (MANDATORY): List every file that was modified or created for profiling purposes:
| File | Change type | What was added/modified | Line(s) |
|---|---|---|---|
| ... | modified | ... | ... |
| ... | created | ... | — |
This allows the user to review and revert all instrumentation changes. Offer to clean up (remove all instrumentation) when the user is done.
Häufige Fragen
Was kann er untersuchen?
Ein Skript, einen laufenden Prozess, eine Funktion, eine GPU, den Speicher oder die Verbindungen zwischen GPUs.
Ändert er meinen Code?
Er kann Messcode schreiben, um Teile des Programms zu messen. Der Skill beschreibt kein Umschreiben deiner Hauptlogik.
Was ist, wenn das Ziel unklar ist?
Der Skill fragt dich, was untersucht werden soll, bevor er beginnt.
Details
Originalbeschreibung des Autors
Profile a target (script, process, GPU, memory, interconnect) for performance analysis. Use when user says \"profile\", \"benchmark\", \"bottleneck\", or wants performance analysis.
Beliebtheit
- GitHub-Sterne
- 18k
- Platz im Ranking
- #10618
- Lizenz
- MIT
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
ablation-planner
18kHilft deinem Agenten, Ablationsstudien für eine Arbeit zu planen und die Tests auszuwählen, die Gutachter wahrscheinlich verlangen, sobald die Hauptergebnisse gut aussehen.
alphaxiv
18kLässt deinen Agenten eine Forschungsarbeit schnell anhand von AlphaXiv Zusammenfassungen lesen, mit Volltext oder LaTeX Quelle als Reserve, aus einem arXiv Link oder einer ID.
analyze-results
18kHilft deinem Agenten, Ergebnisse von Machine Learning Experimenten zu analysieren, Läufe mit einer Basis zu vergleichen und die Zahlen in klare Befunde und nächste Schritte zu übersetzen.
arxiv
18kLässt deinen Agenten auf arXiv nach wissenschaftlichen Arbeiten suchen, deren Details lesen und PDFs für ein Forschungsthema in deiner Bibliothek speichern.
Ähnliche Skills
openclaw-update
394kHilft deinem Agenten, ein bestehendes OpenClaw-Gateway zu aktualisieren, mit der Methode, die zu deiner Installation passt, während deine Sitzung weiterläuft.
diagnose-gateway
394kHilft deinem Agenten herauszufinden, warum dein OpenClaw-Gateway fehlschlägt, indem er Einstellungen, Kanäle und Ports prüft, ohne etwas zu ändern.
crabbox-apps
394kHilft deinem Agenten, eine App auf einer temporären Cloud-Maschine zu öffnen und auszuführen und ihre Ansicht in deinem Chat-Seitenpanel zu zeigen.