system-profile
O que ela faz
Esta skill mede como um programa ou sistema se comporta, como o uso de CPU, memória, GPU ou rede, e informa os gargalos. É para desenvolvedores que querem entender por que algo está lento.
Quando usar
- ✓Quando um script ou programa está lento e você quer encontrar o gargalo.
- ✓Quando você quer verificar o uso de GPU, memória ou interconexão durante uma execução.
- ✓Quando você quer um resumo de desempenho com as principais partes lentas identificadas.
Link da skill
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/skills-codex/system-profile/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Quero que o perfil do meu script de treinamento seja feito, porque ele está lento, e quero saber onde está o gargalo.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente escolhe ferramentas de perfilamento para o alvo, como perfiladores de Python ou monitores de GPU, e adiciona código de instrumentação quando necessário. Ele executa as ferramentas, analisa os resultados e escreve um resumo.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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.
Perguntas frequentes
O que ela pode perfilar?
Pode perfilar um script, um processo em execução, uma função, uma GPU, a memória ou as ligações entre GPUs.
Ela altera o meu código?
Ela pode escrever código de instrumentação para medir partes do programa. A skill não descreve a reescrita da sua lógica principal.
E se o alvo não estiver claro?
A skill pede que você esclareça o que deve ser perfilado antes de começar.
Detalhes
Descrição original do autor
Profile a target (script, process, GPU, memory, interconnect) for performance analysis. Use when user says \"profile\", \"benchmark\", \"bottleneck\", or wants performance analysis.
Popularidade
- Estrelas no GitHub
- 18 mil
- Posição no ranking
- #10618
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
ablation-planner
18 milAjuda seu agente a planejar estudos de ablação para um artigo, escolhendo os testes que os revisores provavelmente vão pedir quando os resultados principais parecerem bons.
alphaxiv
18 milPermite que seu agente leia rapidamente um artigo científico usando os resumos do AlphaXiv, com o texto completo ou o código-fonte LaTeX como reserva, a partir de um link do arXiv ou de um ID.
analyze-results
18 milAjuda seu agente a analisar resultados de experimentos de aprendizado de máquina, comparar execuções com uma linha de base e transformar os números em conclusões claras e próximos passos.
arxiv
18 milPermite que seu agente pesquise artigos acadêmicos no arXiv, leia seus detalhes e salve os PDFs na sua biblioteca para um tema de pesquisa.
Skills parecidas
openclaw-update
394 milAjuda seu agente a atualizar um OpenClaw Gateway existente, escolhendo o método que combina com a instalação e mantendo sua sessão funcionando.
diagnose-gateway
394 milAjuda seu agente a descobrir por que seu OpenClaw Gateway está falhando, verificando configurações, canais e portas sem alterar nada.
crabbox-apps
394 milAjuda seu agente a abrir e executar um app em uma máquina temporária na nuvem e depois mostrar a visualização dele no painel lateral do seu chat.