[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-ed85fd42-c590-451f-963e-9de47fa25acc":3,"$fPDuQ12-yto1eLYuek0BOBiep9w5WpccPnc2BLQmFexs":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"ed85fd42-c590-451f-963e-9de47fa25acc","application-performance-performance-optimization","通过性能分析、可观察性和后端\u002F前端调优优化端到端应用程序性能。在跨栈协调性能优化时使用。","cat_life_career","mod_other","sickn33,other","---\nname: application-performance-performance-optimization\ndescription: \"Optimize end-to-end application performance with profiling, observability, and backend\u002Ffrontend tuning. Use when coordinating performance optimization across the stack.\"\nrisk: unknown\nsource: community\ndate_added: \"2026-02-27\"\n---\n\nOptimize application performance end-to-end using specialized performance and optimization agents:\n\n[Extended thinking: This workflow orchestrates a comprehensive performance optimization process across the entire application stack. Starting with deep profiling and baseline establishment, the workflow progresses through targeted optimizations in each system layer, validates improvements through load testing, and establishes continuous monitoring for sustained performance. Each phase builds on insights from previous phases, creating a data-driven optimization strategy that addresses real bottlenecks rather than theoretical improvements. The workflow emphasizes modern observability practices, user-centric performance metrics, and cost-effective optimization strategies.]\n\n## Use this skill when\n\n- Coordinating performance optimization across backend, frontend, and infrastructure\n- Establishing baselines and profiling to identify bottlenecks\n- Designing load tests, performance budgets, or capacity plans\n- Building observability for performance and reliability targets\n\n## Do not use this skill when\n\n- The task is a small localized fix with no broader performance goals\n- There is no access to metrics, tracing, or profiling data\n- The request is unrelated to performance or scalability\n\n## Instructions\n\n1. Confirm performance goals, constraints, and target metrics.\n2. Establish baselines with profiling, tracing, and real-user data.\n3. Execute phased optimizations across the stack with measurable impact.\n4. Validate improvements and set guardrails to prevent regressions.\n\n## Safety\n\n- Avoid load testing production without approvals and safeguards.\n- Roll out performance changes gradually with rollback plans.\n\n## Phase 1: Performance Profiling & Baseline\n\n### 1. Comprehensive Performance Profiling\n\n- Use Task tool with subagent_type=\"performance-engineer\"\n- Prompt: \"Profile application performance comprehensively for: $ARGUMENTS. Generate flame graphs for CPU usage, heap dumps for memory analysis, trace I\u002FO operations, and identify hot paths. Use APM tools like DataDog or New Relic if available. Include database query profiling, API response times, and frontend rendering metrics. Establish performance baselines for all critical user journeys.\"\n- Context: Initial performance investigation\n- Output: Detailed performance profile with flame graphs, memory analysis, bottleneck identification, baseline metrics\n\n### 2. Observability Stack Assessment\n\n- Use Task tool with subagent_type=\"observability-engineer\"\n- Prompt: \"Assess current observability setup for: $ARGUMENTS. Review existing monitoring, distributed tracing with OpenTelemetry, log aggregation, and metrics collection. Identify gaps in visibility, missing metrics, and areas needing better instrumentation. Recommend APM tool integration and custom metrics for business-critical operations.\"\n- Context: Performance profile from step 1\n- Output: Observability assessment report, instrumentation gaps, monitoring recommendations\n\n### 3. User Experience Analysis\n\n- Use Task tool with subagent_type=\"performance-engineer\"\n- Prompt: \"Analyze user experience metrics for: $ARGUMENTS. Measure Core Web Vitals (LCP, FID, CLS), page load times, time to interactive, and perceived performance. Use Real User Monitoring (RUM) data if available. Identify user journeys with poor performance and their business impact.\"\n- Context: Performance baselines from step 1\n- Output: UX performance report, Core Web Vitals analysis, user impact assessment\n\n## Phase 2: Database & Backend Optimization\n\n### 4. Database Performance Optimization\n\n- Use Task tool with subagent_type=\"database-cloud-optimization::database-optimizer\"\n- Prompt: \"Optimize database performance for: $ARGUMENTS based on profiling data: {context_from_phase_1}. Analyze slow query logs, create missing indexes, optimize execution plans, implement query result caching with Redis\u002FMemcached. Review connection pooling, prepared statements, and batch processing opportunities. Consider read replicas and database sharding if needed.\"\n- Context: Performance bottlenecks from phase 1\n- Output: Optimized queries, new indexes, caching strategy, connection pool configuration\n\n### 5. Backend Code & API Optimization\n\n- Use Task tool with subagent_type=\"backend-development::backend-architect\"\n- Prompt: \"Optimize backend services for: $ARGUMENTS targeting bottlenecks: {context_from_phase_1}. Implement efficient algorithms, add application-level caching, optimize N+1 queries, use async\u002Fawait patterns effectively. Implement pagination, response compression, GraphQL query optimization, and batch API operations. Add circuit breakers and bulkheads for resilience.\"\n- Context: Database optimizations from step 4, profiling data from phase 1\n- Output: Optimized backend code, caching implementation, API improvements, resilience patterns\n\n### 6. Microservices & Distributed System Optimization\n\n- Use Task tool with subagent_type=\"performance-engineer\"\n- Prompt: \"Optimize distributed system performance for: $ARGUMENTS. Analyze service-to-service communication, implement service mesh optimizations, optimize message queue performance (Kafka\u002FRabbitMQ), reduce network hops. Implement distributed caching strategies and optimize serialization\u002Fdeserialization.\"\n- Context: Backend optimizations from step 5\n- Output: Service communication improvements, message queue optimization, distributed caching setup\n\n## Phase 3: Frontend & CDN Optimization\n\n### 7. Frontend Bundle & Loading Optimization\n\n- Use Task tool with subagent_type=\"frontend-developer\"\n- Prompt: \"Optimize frontend performance for: $ARGUMENTS targeting Core Web Vitals: {context_from_phase_1}. Implement code splitting, tree shaking, lazy loading, and dynamic imports. Optimize bundle sizes with webpack\u002Frollup analysis. Implement resource hints (prefetch, preconnect, preload). Optimize critical rendering path and eliminate render-blocking resources.\"\n- Context: UX analysis from phase 1, backend optimizations from phase 2\n- Output: Optimized bundles, lazy loading implementation, improved Core Web Vitals\n\n### 8. CDN & Edge Optimization\n\n- Use Task tool with subagent_type=\"cloud-infrastructure::cloud-architect\"\n- Prompt: \"Optimize CDN and edge performance for: $ARGUMENTS. Configure CloudFlare\u002FCloudFront for optimal caching, implement edge functions for dynamic content, set up image optimization with responsive images and WebP\u002FAVIF formats. Configure HTTP\u002F2 and HTTP\u002F3, implement Brotli compression. Set up geographic distribution for global users.\"\n- Context: Frontend optimizations from step 7\n- Output: CDN configuration, edge caching rules, compression setup, geographic optimization\n\n### 9. Mobile & Progressive Web App Optimization\n\n- Use Task tool with subagent_type=\"frontend-mobile-development::mobile-developer\"\n- Prompt: \"Optimize mobile experience for: $ARGUMENTS. Implement service workers for offline functionality, optimize for slow networks with adaptive loading. Reduce JavaScript execution time for mobile CPUs. Implement virtual scrolling for long lists. Optimize touch responsiveness and smooth animations. Consider React Native\u002FFlutter specific optimizations if applicable.\"\n- Context: Frontend optimizations from steps 7-8\n- Output: Mobile-optimized code, PWA implementation, offline functionality\n\n## Phase 4: Load Testing & Validation\n\n### 10. Comprehensive Load Testing\n\n- Use Task tool with subagent_type=\"performance-engineer\"\n- Prompt: \"Conduct comprehensive load testing for: $ARGUMENTS using k6\u002FGatling\u002FArtillery. Design realistic load scenarios based on production traffic patterns. Test normal load, peak load, and stress scenarios. Include API testing, browser-based testing, and WebSocket testing if applicable. Measure response times, throughput, error rates, and resource utilization at various load levels.\"\n- Context: All optimizations from phases 1-3\n- Output: Load test results, performance under load, breaking points, scalability analysis\n\n### 11. Performance Regression Testing\n\n- Use Task tool with subagent_type=\"performance-testing-review::test-automator\"\n- Prompt: \"Create automated performance regression tests for: $ARGUMENTS. Set up performance budgets for key metrics, integrate with CI\u002FCD pipeline using GitHub Actions or similar. Create Lighthouse CI tests for frontend, API performance tests with Artillery, and database performance benchmarks. Implement automatic rollback triggers for performance regressions.\"\n- Context: Load test results from step 10, baseline metrics from phase 1\n- Output: Performance test suite, CI\u002FCD integration, regression prevention system\n\n## Phase 5: Monitoring & Continuous Optimization\n\n### 12. Production Monitoring Setup\n\n- Use Task tool with subagent_type=\"observability-engineer\"\n- Prompt: \"Implement production performance monitoring for: $ARGUMENTS. Set up APM with DataDog\u002FNew Relic\u002FDynatrace, configure distributed tracing with OpenTelemetry, implement custom business metrics. Create Grafana dashboards for key metrics, set up PagerDuty alerts for performance degradation. Define SLIs\u002FSLOs for critical services with error budgets.\"\n- Context: Performance improvements from all previous phases\n- Output: Monitoring dashboards, alert rules, SLI\u002FSLO definitions, runbooks\n\n### 13. Continuous Performance Optimization\n\n- Use Task tool with subagent_type=\"performance-engineer\"\n- Prompt: \"Establish continuous optimization process for: $ARGUMENTS. Create performance budget tracking, implement A\u002FB testing for performance changes, set up continuous profiling in production. Document optimization opportunities backlog, create capacity planning models, and establish regular performance review cycles.\"\n- Context: Monitoring setup from step 12, all previous optimization work\n- Output: Performance budget tracking, optimization backlog, capacity planning, review process\n\n## Configuration Options\n\n- **performance_focus**: \"latency\" | \"throughput\" | \"cost\" | \"balanced\" (default: \"balanced\")\n- **optimization_depth**: \"quick-wins\" | \"comprehensive\" | \"enterprise\" (default: \"comprehensive\")\n- **tools_available**: [\"datadog\", \"newrelic\", \"prometheus\", \"grafana\", \"k6\", \"gatling\"]\n- **budget_constraints**: Set maximum acceptable costs for infrastructure changes\n- **user_impact_tolerance**: \"zero-downtime\" | \"maintenance-window\" | \"gradual-rollout\"\n\n## Success Criteria\n\n- **Response Time**: P50 \u003C 200ms, P95 \u003C 1s, P99 \u003C 2s for critical endpoints\n- **Core Web Vitals**: LCP \u003C 2.5s, FID \u003C 100ms, CLS \u003C 0.1\n- **Throughput**: Support 2x current peak load with \u003C1% error rate\n- **Database Performance**: Query P95 \u003C 100ms, no queries > 1s\n- **Resource Utilization**: CPU \u003C 70%, Memory \u003C 80% under normal load\n- **Cost Efficiency**: Performance per dollar improved by minimum 30%\n- **Monitoring Coverage**: 100% of critical paths instrumented with alerting\n\nPerformance optimization target: $ARGUMENTS\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,110,1170,"2026-05-16 13:04:02",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"其他","other","mdi-page-next-outline","其他类型Skill",5,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"职场发展","career","mdi-briefcase-outline","面试准备、简历优化、职业规划",4,575,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"91d4348f-4468-443d-8387-9d19141ebe45","1.0.0","application-performance-performance-optimization.zip",4195,"uploads\u002Fskills\u002Fed85fd42-c590-451f-963e-9de47fa25acc\u002Fapplication-performance-performance-optimization.zip","28fd74aba7e4407953734eada758afb848c63dd8708df4ef0f27621b226d897c","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":11521}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]