system-profile
Поиск узких мест в производительности
Что получите
Отчёт с таблицами измерений, узкими местами, рекомендациями и обязательным перечнем созданных или изменённых файлов; графики, трассы и журналы сохраняются в ./profile_output/.
Что передать
Скрипт, идентификатор процесса, название сервиса или конкретный ресурс для исследования.
Проверен состав файлов. Запуск не тестировался. Что проверено
Оценки пользователей
Как использовать
Помогает разработчикам исследовать скорость скрипта, работающего процесса или целой системы. Разбирает нагрузку на процессор, память, GPU и обмен данными между устройствами.
- Назовите объект измерения и участок работы, где наблюдается задержка.
- Уточните, нужен ли общий обзор или исследование памяти, вычислений либо передачи данных.
- Попросите ранжировать рекомендации по ожидаемому влиянию на найденные узкие места.
Условия работы
- Методы выбираются после проверки доступных средств измерения и оборудования.
- Если внешних измерений недостаточно, скилл может добавлять измерительный код в проект; изменения перечисляются для просмотра и отката.
- После работы предлагается удалить добавленный измерительный код.
Пример запроса после установки
Исследуй производительность train.py: выясни, где теряется время между CPU и GPU, оцени расход памяти и предложи наиболее полезные изменения с перечнем добавленного измерительного кода.
Пример составлен по инструкции автора; результат запуска не проверялся.
Основание: инструкция закреплённой версииДля установки
Node.js, npm и Git для команды выше. Подключения и инструменты для работы скилла настраиваются отдельно.
Совместимые агенты
Совместимость указана для инструкций. Запуск в каждом приложении не тестировался; для веб-чата способ подключения может отличаться.
Файлы скилла
GitHubЧитать инструкцию SKILL.md
Исходный текст закреплённой версии.
--- name: system-profile description: "Profile a target (script, process, GPU, memory, interconnect) for performance analysis. Use when user says \"profile\", \"benchmark\", \"bottleneck\", or wants performance analysis." argument-hint: '<target, e.g. "train.py", "gpu", "pid 1234", "vllm serving">' --- # 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: 1. Read and understand the target code first 2. Prefer wrapping (decorator, context manager, standalone runner) over inline edits 3. If inline edits are necessary, mark them clearly (e.g., `# [PROFILE]` comments) 4. Minimize observer effect — don't instrument tight inner loops; sample instead 5. Collect results into a structured log, don't scatter print statements ### Step 5: Run profiling 1. Check available tools and hardware topology 2. Run the chosen methods, capture all output 3. 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.
Проверка и особенности
Автоматическая проверка источника и файлов
Автоматически сверены публичный репозиторий, лицензия, YAML-заголовок SKILL.md, состав папки и Git-хеш каждого файла. Исполняемые файлы и срабатывания статических правил исключены из этой партии. Ручной аудит всех инструкций и проверка работы не проводились; эта проверка не гарантирует безопасность. Команда закреплена на проверенном коммите.
Интерес к репозиторию оцениваем по звёздам и форкам GitHub. Это показатели всего репозитория, а не числа установок отдельного скилла.
- Проверка состава
- 16.09.2026
- Проверенная версия
b98fc5d6c76e- Файлы с кодом
- Не указаны в данных проверки
- Изменения на GitHub
- Нужна повторная проверкаПоследняя проверка: 11.10.2026
Репозиторий и лицензия
Это показатели всего репозитория, а не установки скилла. Снимок требует обновления.
- Последняя активность GitHub
- 07.10.2026
- Лицензия
- MIT
- Добавлен в каталог
- 16.09.2026
Полный текст лицензии
MIT License Copyright (c) 2026 wanshuiyin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Ещё в этой категории
Все в категорииОбсуждение
ПравилаПользовались этим скиллом? Делитесь опытом без регистрации. Все комментарии проверяет модератор.
