[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EV9WN4A2QGEB21HPW1GEQW":3,"skill-same:01M7EV9WN4A2QGEB21HPW1GEQW":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7EV9WN4A2QGEB21HPW1GEQW","ams-performance-pro",null,"TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-performance-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: performance-pro\ndescription: Systematic performance engineering: measure, profile, optimize hotspots, and set budgets. Use when diagnosing slowness or making systems faster.\ncategory: development\n---\n\n# Performance Pro\n\n## Overview\n\nPerformance work is **measurement-driven**: profile first, optimize the hotspot, verify the gain —\nnever optimize from intuition. Most \"slow code\" is actually slow *architecture* (N+1 queries,\nchatty APIs, missing indexes, serial execution of parallelizable work), and most micro-optimizations\nare noise. This skill covers the systematic approach: defining targets, finding real bottlenecks,\nfixing them at the right level, and preventing regression.\n\nThe through-line: measure → find the bottleneck → fix at the highest-leverage level → lock it in.\n\n## When to use\n\n- Diagnosing slow endpoints, pages, or batch jobs.\n- Setting performance targets and budgets.\n- Reviewing code for performance risks.\n- Capacity planning or cost optimization.\n- Preventing performance regressions in CI.\n\n## Core concepts\n\n- **Define the target first.** \"Fast\" is not a requirement — \"p99 \u003C 300ms at 1000 rps\" is. Get\n  the SLO\u002FSLA in numbers before touching code; otherwise you can't know when you're done (or if\n  the work was worth it).\n- **Profile, don't guess.** CPU profilers (flame graphs), memory profilers, query analyzers\n  (EXPLAIN), network waterfalls — the bottleneck is *never* where intuition says. Rule of thumb:\n  the top frame of the flame graph is where the time goes; everything else is commentary.\n- **Levels of optimization (highest leverage first).**\n  1. *Algorithmic* — O(n²) → O(n log n); the 100x wins live here.\n  2. *Architectural* — kill N+1s, batch APIs, add caching, parallelize independent work.\n  3. *Data access* — indexes, query shapes, denormalization for read hotspots.\n  4. *Resource* — connection pools, memory allocation, payload sizes.\n  5. *Micro* — loop tweaks, branch prediction — only with profiler evidence, last.\n- **Latency vs throughput.** Different goals, different fixes. Latency: reduce work per request,\n  parallelize, cache. Throughput: batching, connection reuse, async pipelines, horizontal scale.\n  Know which you're optimizing — they often trade off.\n- **Caching as architecture.** What to cache (expensive, slowly-changing, frequently-read),\n  where (CDN, app, DB query cache), invalidation strategy (TTL, event-driven, versioned keys),\n  and the thundering-herd plan (stale-while-revalidate, request coalescing). Cache invalidation\n  remains one of the two hard problems — design it, don't improvise it.\n- **Budgets prevent regression.** Performance budgets (bundle size, p99 latency, query count per\n  request) enforced in CI. Without budgets, every feature ships a little slower and nobody notices\n  until users do.\n\n## Practical workflow\n\n1. **Quantify.** Reproduce the slowness with a benchmark; record baseline numbers (p50\u002Fp99, not\n   averages — averages hide tails). Define the target.\n2. **Profile the real workload.** Production-like data volume and concurrency — toy benchmarks\n   lie. Flame graphs for CPU, EXPLAIN ANALYZE for queries, waterfall for frontend.\n3. **Find the bottleneck.** The single biggest time consumer. Fix *it*, not the five small things\n   around it. Amdahl's law: optimizing 5% of runtime 10x gains 4.5% — find the 80%.\n4. **Fix at the highest level.** Algorithmic\u002Farchitectural first: can this be O(n)? batched?\n   cached? parallel? Only then descend to micro-optimization.\n5. **Verify with numbers.** Same benchmark, before\u002Fafter, statistical significance (run multiple\n   times — noise is real). Document the gain in the commit.\n6. **Lock it in.** Add the benchmark to CI with a budget; alert on regression. Performance without\n   a ratchet decays.\n\nCommon fixes by symptom:\n\n```text\nSlow endpoint, DB-heavy flame graph → EXPLAIN the queries; N+1? missing index?\n  → eager load \u002F add index \u002F denormalize read model\nHigh tail latency (p99 >> p50)      → GC pauses? retry storms? downstream timeouts?\n  → tune GC, add timeouts, cache the slow dependency\nSlow page load                      → waterfall: what blocks first paint?\n  → defer non-critical JS, preload critical assets, SSR the shell\nBatch job too slow                  → profile: usually I\u002FO-bound or single-threaded\n  → parallelize chunks, batch DB writes, stream instead of load-all\nMemory climbing                     → heap profile: what's retained?\n  → fix caches without bounds\u002FTTL, close resources, stream large payloads\n```\n\n## Common pitfalls\n\n- **Optimizing without profiling.** \"This loop looks slow\" — meanwhile 95% of time is a missing\n  DB index. Intuition about bottlenecks is reliably wrong; the profiler is reliably right.\n- **Averages hiding tails.** \"Average 100ms\" with p99 at 5s — users feel the tail. Always look\n  at percentiles.\n- **Premature optimization.** Caching, pooling, and sharding before there's a measured problem —\n  complexity without benefit. Make it work, make it right, *then* make it fast (with data).\n- **Micro-optimizing the 5%.** Shaving cycles off a function that's 2% of runtime while ignoring\n  the N+1 query that's 70%. Amdahl's law is undefeated.\n- **Caching without invalidation design.** \"Just cache it\" → stale data bugs, thundering herds\n  on expiry, unbounded memory. Cache deliberately or don't cache.\n- **Benchmarking toys.** Optimizing against 10 rows when production has 10 million — different\n  algorithms win at different scales. Benchmark at production shape.\n- **No regression guard.** The optimization lands, then six months of features erode it. Budgets\n  in CI or the win was temporary.\n","# Performance Pro\n\n## Overview\n\nPerformance work is **measurement-driven**: profile first, optimize the hotspot, verify the gain —\nnever optimize from intuition. Most \"slow code\" is actually slow *architecture* (N+1 queries,\nchatty APIs, missing indexes, serial execution of parallelizable work), and most micro-optimizations\nare noise. This skill covers the systematic approach: defining targets, finding real bottlenecks,\nfixing them at the right level, and preventing regression.\n\nThe through-line: measure → find the bottleneck → fix at the highest-leverage level → lock it in.\n\n## When to use\n\n- Diagnosing slow endpoints, pages, or batch jobs.\n- Setting performance targets and budgets.\n- Reviewing code for performance risks.\n- Capacity planning or cost optimization.\n- Preventing performance regressions in CI.\n\n## Core concepts\n\n- **Define the target first.** \"Fast\" is not a requirement — \"p99 \u003C 300ms at 1000 rps\" is. Get\n  the SLO\u002FSLA in numbers before touching code; otherwise you can't know when you're done (or if\n  the work was worth it).\n- **Profile, don't guess.** CPU profilers (flame graphs), memory profilers, query analyzers\n  (EXPLAIN), network waterfalls — the bottleneck is *never* where intuition says. Rule of thumb:\n  the top frame of the flame graph is where the time goes; everything else is commentary.\n- **Levels of optimization (highest leverage first).**\n  1. *Algorithmic* — O(n²) → O(n log n); the 100x wins live here.\n  2. *Architectural* — kill N+1s, batch APIs, add caching, parallelize independent work.\n  3. *Data access* — indexes, query shapes, denormalization for read hotspots.\n  4. *Resource* — connection pools, memory allocation, payload sizes.\n  5. *Micro* — loop tweaks, branch prediction — only with profiler evidence, last.\n- **Latency vs throughput.** Different goals, different fixes. Latency: reduce work per request,\n  parallelize, cache. Throughput: batching, connection reuse, async pipelines, horizontal scale.\n  Know which you're optimizing — they often trade off.\n- **Caching as architecture.** What to cache (expensive, slowly-changing, frequently-read),\n  where (CDN, app, DB query cache), invalidation strategy (TTL, event-driven, versioned keys),\n  and the thundering-herd plan (stale-while-revalidate, request coalescing). Cache invalidation\n  remains one of the two hard problems — design it, don't improvise it.\n- **Budgets prevent regression.** Performance budgets (bundle size, p99 latency, query count per\n  request) enforced in CI. Without budgets, every feature ships a little slower and nobody notices\n  until users do.\n\n## Practical workflow\n\n1. **Quantify.** Reproduce the slowness with a benchmark; record baseline numbers (p50\u002Fp99, not\n   averages — averages hide tails). Define the target.\n2. **Profile the real workload.** Production-like data volume and concurrency — toy benchmarks\n   lie. Flame graphs for CPU, EXPLAIN ANALYZE for queries, waterfall for frontend.\n3. **Find the bottleneck.** The single biggest time consumer. Fix *it*, not the five small things\n   around it. Amdahl's law: optimizing 5% of runtime 10x gains 4.5% — find the 80%.\n4. **Fix at the highest level.** Algorithmic\u002Farchitectural first: can this be O(n)? batched?\n   cached? parallel? Only then descend to micro-optimization.\n5. **Verify with numbers.** Same benchmark, before\u002Fafter, statistical significance (run multiple\n   times — noise is real). Document the gain in the commit.\n6. **Lock it in.** Add the benchmark to CI with a budget; alert on regression. Performance without\n   a ratchet decays.\n\nCommon fixes by symptom:\n\n```text\nSlow endpoint, DB-heavy flame graph → EXPLAIN the queries; N+1? missing index?\n  → eager load \u002F add index \u002F denormalize read model\nHigh tail latency (p99 >> p50)      → GC pauses? retry storms? downstream timeouts?\n  → tune GC, add timeouts, cache the slow dependency\nSlow page load                      → waterfall: what blocks first paint?\n  → defer non-critical JS, preload critical assets, SSR the shell\nBatch job too slow                  → profile: usually I\u002FO-bound or single-threaded\n  → parallelize chunks, batch DB writes, stream instead of load-all\nMemory climbing                     → heap profile: what's retained?\n  → fix caches without bounds\u002FTTL, close resources, stream large payloads\n```\n\n## Common pitfalls\n\n- **Optimizing without profiling.** \"This loop looks slow\" — meanwhile 95% of time is a missing\n  DB index. Intuition about bottlenecks is reliably wrong; the profiler is reliably right.\n- **Averages hiding tails.** \"Average 100ms\" with p99 at 5s — users feel the tail. Always look\n  at percentiles.\n- **Premature optimization.** Caching, pooling, and sharding before there's a measured problem —\n  complexity without benefit. Make it work, make it right, *then* make it fast (with data).\n- **Micro-optimizing the 5%.** Shaving cycles off a function that's 2% of runtime while ignoring\n  the N+1 query that's 70%. Amdahl's law is undefeated.\n- **Caching without invalidation design.** \"Just cache it\" → stale data bugs, thundering herds\n  on expiry, unbounded memory. Cache deliberately or don't cache.\n- **Benchmarking toys.** Optimizing against 10 rows when production has 10 million — different\n  algorithms win at different scales. Benchmark at production shape.\n- **No regression guard.** The optimization lands, then six months of features erode it. Budgets\n  in CI or the win was temporary.\n",{},"main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-performance-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill ams-performance-pro",{"tool":37,"command":38},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill ams-performance-pro",{"tool":40,"command":41},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill ams-performance-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-performance-pro\u002FSKILL.md",true,[],[46,53,61,68,75,82],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":57,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]