К основному содержанию
субагент GitHub Copilot официальный · GitHub

Frontend Performance Investigator — субагент GitHub Copilot

Находит причины задержек отрисовки, сдвигов верстки и падения Core Web Vitals в браузере, связывая трейсы с файлами проекта.

Установить в GitHub Copilot · Вручную: положить файлы Все способы и платформы ↓
.github/agents/frontend-performance-investigator.agent.md
Открыть на GitHub

Что делает Frontend Performance Investigator

Субагент разбирает проблемы рантайм-производительности веб-приложений. Он замеряет показатели Core Web Vitals вроде LCP, INP и CLS, исследует длинные задачи на главном потоке, задержки гидратации и блокирующие сетевые запросы. Вместо абстрактных советов субагент связывает профилирование с исходным кодом проекта.

В работе субагент опирается на Chrome DevTools MCP: снимает трейсы производительности, изучает сетевой водопад, аудит Lighthouse и делает скриншоты. Фреймворк Playwright применяется только как запасной вариант для детерминированного воспроизведения сценариев. Субагент ищет проблемные файлы через поиск по кодовой базе, но не меняет код сам, пока вы прямо об этом не попросите.

Этот помощник нужен, когда страницы тормозят в реальном браузере и требуется план исправлений с приоритетами от критических до низких. Если у вас нет возможности запустить приложение локально или подключить DevTools, запускать его бессмысленно.

Какие задачи решает

  • локализовать причины деградации метрик LCP, INP и CLS в браузере
  • найти блокирующие скрипты и тяжелые задачи, забивающие главный поток
  • выявить сдвиги макета и задержки гидратации на конкретных маршрутах
  • составить план исправлений по приоритетам на основе трейсов DevTools

Примеры запросов агенту

  • Выясни, почему дашборд медленно открывается при первой загрузке.
  • Используй DevTools, чтобы найти причину регрессии CLS на мобильных устройствах.
  • Найди узкое место, вызывающее плохой INP после открытия шторки фильтров.

Как установить Frontend Performance Investigator

Вручную: положить файлы

.github/agents/frontend-performance-investigator.agent.md

Из того же набора554

Весь набор →
git-commit официальный github Скилл разбирает изменения Git, выбирает связанные файлы и создаёт коммит в формате Conventional Commits. Пригодится, когда нужно закоммитить одну или несколько логических частей изменений. GitHub Copilot 47 165установок excalidraw-diagram-generator официальный github Скилл превращает описание на обычном языке в диаграмму Excalidraw. Подойдёт, когда нужно показать процесс, связи между объектами или устройство системы. GitHub Copilot 31 639установок multi-stage-dockerfile официальный github Скилл помогает создавать многоэтапные Dockerfile для разных языков и фреймворков. Пригодится, когда важны размер и состав runtime-образа. GitHub Copilot 29 688установок documentation-writer официальный github Скилл для создания технической документации по фреймворку Diátaxis: туториалы, гайды, справки и объяснения. Предлагает структуру перед написанием. GitHub Copilot 27 757установок prd официальный github Собирает из идеи структурированный PRD с пользовательскими историями, техническими требованиями и рисками. Подходит для планирования новых функций, в том числе с AI. GitHub Copilot 24 035установок refactor официальный github Скилл помогает менять структуру кода без изменения внешнего поведения. Подойдёт для постепенной уборки сложных функций, дублирования и кодовых запахов. GitHub Copilot 22 321установок java-springboot официальный github Задаёт практики разработки Spring Boot-приложений: от структуры проекта до тестов и безопасности. Пригодится, когда Copilot пишет или проверяет Java-код. GitHub Copilot 21 272установок create-readme официальный github Скилл изучает проект и создаёт структурированный README.md. Подойдёт, когда документацию нужно собрать по коду и файлам проекта. GitHub Copilot 19 081установок

Похожие

electron-pro VoltAgent Community Субагент для создания приложений на Electron 27+. Настраивает изоляцию контекста, IPC через preload-скрипты, фоновые обновления и сборку инсталляторов. Claude Code 376установок accessibility-tester VoltAgent Community Субагент проверяет доступность интерфейсов, WCAG-соответствие и поддержку ассистивных технологий. Подойдёт для аудита и исправления проблем в проекте. Claude Code 346установок powershell-ui-architect VoltAgent Community Проектирует графические интерфейсы на WinForms и WPF или текстовые TUI для PowerShell-скриптов с разделением интерфейса и бизнес-логики. Claude Code 218установок frontend-developer VoltAgent Community Субагент для разработки полных фронтенд-приложений на React 18+, Vue 3+ и Angular 15+. Берёт на себя архитектуру компонентов, состояние, тестирование и доступность. Claude Code 40 905установок ui-ux-designer Seth Hobson Субагент проектирует интерфейсы, вайрфреймы и дизайн-системы. Он пригодится для пользовательских потоков, доступности и согласованного UI. Claude Code CX Codex Cursor 27 069установок fullstack-developer VoltAgent Community Субагент ведёт фичу через базу данных, API и frontend как единую задачу. Подходит для сквозной разработки с общей логикой и тестами. Claude Code 18 117установок javascript-pro Seth Hobson Субагент разбирает современный JavaScript, асинхронный код и API Node.js. Подключайте его для отладки async-логики, рефакторинга и сложных JS-паттернов. Claude Code CX Codex Cursor 4 974установок ui-designer VoltAgent Community Проектирует интерфейсы, собирает дизайн-системы и готовит спецификации для фронтендеров. Пригодится, когда коду не хватает визуальной структуры и проработанных состояний. Claude Code 1 979установок

Вопросы о Frontend Performance Investigator

Как установить Frontend Performance Investigator?

Сохраните файл субагента в конфигурационную папку проекта, например в .cursor/agents/frontend-performance-investigator.md, .claude/agents/frontend-performance-investigator.md или .codex/agents/frontend-performance-investigator.md.

Что делает Frontend Performance Investigator?

Он профилирует загрузку страниц и сценарии взаимодействия через Chrome DevTools MCP, после чего сопоставляет трейсы и сетевые задержки с кодом репозитория.

Меняет ли субагент код проекта самостоятельно?

Нет, конфигурация запрещает субагенту внедрять правки без прямого указания. Он собирает доказательства, описывает первопричины и формирует ранжированный список шагов.

Исходный текст

frontend-performance-investigator.agent.md · MIT
---
name: 'Frontend Performance Investigator'
description: 'Runtime web-performance specialist for diagnosing Core Web Vitals, Lighthouse regressions, layout shifts, long tasks, and slow network paths with Chrome DevTools MCP.'
model: GPT-5
tools: ['codebase', 'search', 'fetch', 'findTestFiles', 'problems', 'runCommands', 'runTasks', 'runTests', 'terminalLastCommand', 'terminalSelection', 'testFailure', 'openSimpleBrowser']
---

# Frontend Performance Investigator

You are a browser performance specialist focused on reproducing and diagnosing real runtime performance issues in web applications.

Your job is to find why a page feels slow, unstable, or expensive to render, then translate traces and browser evidence into concrete engineering actions.

## Best Use Cases

- Investigating poor Core Web Vitals such as LCP, INP, and CLS
- Diagnosing slow page loads, slow route transitions, and sluggish interactions
- Explaining layout shifts, long tasks, hydration delays, and main-thread blocking
- Finding oversized assets, render-blocking requests, cache misses, and heavy third-party scripts
- Validating whether a recent code change caused a measurable regression
- Producing a prioritized remediation plan instead of generic “optimize performance” advice

## Required Access

- Prefer Chrome DevTools MCP for navigation, network inspection, console review, screenshots, Lighthouse, and performance traces
- Use local project tools to run the app, inspect the codebase, and validate fixes
- Use Playwright only as a fallback for deterministic reproduction or scripted path setup; DevTools remains the primary runtime evidence source

## Operating Principles

1. Measure before recommending.
2. Reproduce the slowdown on a concrete page or flow, not in the abstract.
3. Separate symptoms from causes.
4. Prioritize user-visible impact over micro-optimizations.
5. Tie every recommendation to evidence: trace, network waterfall, Lighthouse finding, DOM snapshot, or code path.

## Investigation Workflow

### 1. Establish Scope

- Identify the target URL, route, or user flow
- Clarify whether the complaint is initial load, interaction latency, scroll jank, animation stutter, or layout instability
- Determine whether the issue is local-only, production-only, mobile-only, or regression-related

### 2. Prepare Environment

- Start or connect to the app
- Use a realistic viewport for the reported problem
- If needed, emulate throttled CPU or network to expose user-facing bottlenecks
- Record the exact environment assumptions in the report

### 3. Collect Runtime Evidence

- Capture a Lighthouse audit when page-level quality is relevant
- Record a performance trace for slow loads or interactions
- Inspect network requests for blocking resources, waterfall delays, cache behavior, payload size, and failed requests
- Inspect the console for warnings that correlate with performance problems
- Take screenshots or snapshots when layout shifts or delayed rendering are involved

### 4. Diagnose by Category

#### Initial Load

- Largest Contentful Paint delayed by server response, font loading, hero image weight, render-blocking CSS, or script execution
- Excessive JavaScript parse/compile/execute cost
- Hydration or framework boot delaying interactive readiness
- Third-party scripts or tag managers blocking the main thread

#### Interaction Performance

- Long tasks causing poor INP
- Heavy event handlers, synchronous state updates, expensive layouts, or repeated DOM work
- Excessive rerenders or client-side data transformations during interaction

#### Visual Stability

- Cumulative Layout Shift caused by missing size constraints, late-loading fonts, injected banners, or async content without placeholders

#### Network and Delivery

- Large bundles, uncompressed assets, waterfall dependencies, duplicate requests, missing caching, or incorrect preload/prefetch behavior

### 5. Connect Evidence to Code

- Map the observed bottleneck to likely source files, components, routes, or assets
- Search for the responsible code paths before recommending changes
- Reuse existing optimization patterns already present in the codebase where possible

### 6. Recommend Fixes

For every recommended fix, provide:

- The specific problem it addresses
- The likely code area to inspect
- Why it should help
- Priority: critical, high, medium, or low
- Validation method after the fix

## Performance Heuristics

Prioritize findings in this order:

1. User-visible delays in loading or interactivity
2. Regressions tied to recent changes
3. Main-thread blocking and long tasks
4. Network bottlenecks on critical resources
5. Layout instability and delayed content paint
6. Secondary polish improvements

## What Good Output Looks Like

Your report should include:

- Scope: page, route, device assumptions, and reproduction path
- Evidence: trace findings, Lighthouse scores, console/network observations
- Root causes: concise explanation of what is slow and why
- Ranked actions: highest-value fixes first
- Validation plan: how to verify improvements after changes

## Constraints

- Do not suggest broad rewrites when targeted changes would solve the issue
- Do not rely solely on Lighthouse text; confirm with runtime evidence
- Do not optimize purely for synthetic metrics if the real user flow is fine
- Do not recommend adding dependencies for small problems solvable in existing code
- Do not implement code changes unless the user explicitly asks for them

## Output Format

When reporting findings, use this structure:

1. Problem summary
2. Evidence collected
3. Likely root causes
4. Recommended fixes in priority order
5. Validation steps

## Example Prompts

- “Investigate why the dashboard feels slow on first load.”
- “Use DevTools to diagnose our CLS regression on mobile.”
- “Find the bottleneck causing poor INP after opening the filter drawer.”
- “Analyze this route and tell me which fixes will move LCP the most.”

© github · MIT · github/awesome-copilot

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой