add-performance-monitoring — команда для Claude Code: как установить
Команда настраивает мониторинг производительности сервиса: собирает метрики, настраивает трейсинг и оповещения. Пригодится при подготовке к боевой нагрузке.
npx claude-code-templates@latest --command performance/add-performance-monitoringЧто делает add-performance-monitoring
Сценарий разворачивает систему наблюдения за сервисом по десяти направлениям. Он помогает задать KPI и целевые показатели SLO, подключить APM-системы вроде Datadog или New Relic, а также внедрить трекинг Web Vitals (LCP, FID, CLS, TTFB) для браузера. В чеклист входит отслеживание серверных ресурсов: CPU, памяти, диска и задержек event loop.
Шаблон опирается на инструменты Read, Bash, Grep и Glob. Агент исследует проект, находит медленные запросы к базе данных, конфигурирует сбор ошибок в Sentry или Rollbar и выстраивает маршрутизацию оповещений в Slack или PagerDuty. Также команда связывает метрики с нагрузочным тестированием.
Команда поддерживает флаги --apm, --rum и --custom. Для проверки конфигураций и запуска тестов агенту нужен доступ к терминалу через Bash: без прав на выполнение системных команд автоматическая настройка остановится.
Какие задачи решает
- настроить клиентские метрики Web Vitals (LCP, FID, CLS)
- выявить медленные запросы и узкие места в базе данных
- внедрить отслеживание серверных ошибок через Sentry или Rollbar
- настроить отправку оповещений о деградации сервиса в Slack и PagerDuty
Примеры запросов агенту
- /add-performance-monitoring --apm
- /add-performance-monitoring --rum
- /add-performance-monitoring Настрой сбор метрик базы данных и отправку алертов в Slack
Как установить add-performance-monitoring
1Через claude-code-templates
npx claude-code-templates@latest --command performance/add-performance-monitoring2Вручную: положить файлы
.claude/commands/add-performance-monitoring.mdВызов — /add-performance-monitoring. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/add-performance-monitoring.mdВызов — /prompts:add-performance-monitoring. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/add-performance-monitoring.prompt.mdВручную: положить файлы
.gemini/commands/add-performance-monitoring.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Вопросы о add-performance-monitoring
Как установить add-performance-monitoring в Claude Code?
Выполните команду npx claude-code-templates@latest --command performance/add-performance-monitoring, которая создаст файл .claude/commands/add-performance-monitoring.md.
Что делает команда add-performance-monitoring?
Она инструктирует Claude Code настроить мониторинг производительности: внедрить APM, отслеживать Web Vitals, логировать серверные ресурсы и ошибки, а также сконфигурировать алерты.
Какие аргументы принимает add-performance-monitoring?
Команда принимает флаги --apm, --rum и --custom, либо текстовое описание нужного типа мониторинга.
Исходный текст
add-performance-monitoring.md · MIT
---
allowed-tools: Read, Bash, Grep, Glob
argument-hint: "[monitoring-type] | --apm | --rum | --custom"
description: Setup comprehensive application performance monitoring with metrics, alerting, and observability
---
# Add Performance Monitoring
Setup application performance monitoring: **$ARGUMENTS**
## Instructions
1. **Performance Monitoring Strategy**
- Define key performance indicators (KPIs) and service level objectives (SLOs)
- Identify critical user journeys and performance bottlenecks
- Plan monitoring architecture and data collection strategy
- Assess existing monitoring infrastructure and integration points
- Define alerting thresholds and escalation procedures
2. **Application Performance Monitoring (APM)**
- Set up comprehensive APM solution (New Relic, Datadog, AppDynamics)
- Configure distributed tracing for request lifecycle visibility
- Implement custom metrics and performance tracking
- Set up transaction monitoring and error tracking
- Configure performance profiling and diagnostics
3. **Real User Monitoring (RUM)**
- Implement client-side performance tracking and web vitals monitoring
- Set up user experience metrics collection (LCP, FID, CLS, TTFB)
- Configure custom performance metrics for user interactions
- Monitor page load performance and resource loading
- Track user journey performance across different devices
4. **Server Performance Monitoring**
- Monitor system metrics (CPU, memory, disk, network)
- Set up process and application-level monitoring
- Configure event loop lag and garbage collection monitoring
- Implement custom server performance metrics
- Monitor resource utilization and capacity planning
5. **Database Performance Monitoring**
- Track database query performance and slow query identification
- Monitor database connection pool utilization
- Set up database performance metrics and alerting
- Implement query execution plan analysis
- Monitor database resource usage and optimization opportunities
6. **Error Tracking and Monitoring**
- Implement comprehensive error tracking (Sentry, Bugsnag, Rollbar)
- Configure error categorization and impact analysis
- Set up error alerting and notification systems
- Track error trends and resolution metrics
- Implement error context and debugging information
7. **Custom Metrics and Dashboards**
- Implement business metrics tracking (Prometheus, StatsD)
- Create performance dashboards and visualizations
- Configure custom alerting rules and thresholds
- Set up performance trend analysis and reporting
- Implement performance regression detection
8. **Alerting and Notification System**
- Configure intelligent alerting based on performance thresholds
- Set up multi-channel notifications (email, Slack, PagerDuty)
- Implement alert escalation and on-call procedures
- Configure alert fatigue prevention and noise reduction
- Set up performance incident management workflows
9. **Performance Testing Integration**
- Integrate monitoring with load testing and performance testing
- Set up continuous performance testing and monitoring
- Configure performance baseline tracking and comparison
- Implement performance test result analysis and reporting
- Monitor performance under different load scenarios
10. **Performance Optimization Recommendations**
- Generate actionable performance insights and recommendations
- Implement automated performance analysis and reporting
- Set up performance optimization tracking and measurement
- Configure performance improvement validation
- Create performance optimization prioritization frameworks
Focus on monitoring strategies that provide actionable insights for performance optimization. Ensure monitoring overhead is minimal and doesn't impact application performance.
© davila7 · MIT · davila7/claude-code-templates