{"id":"0218a0cd-370a-45e2-8ad1-5f8d0cfb5255","shortId":"qnyX4L","kind":"skill","title":"review-performance","tagline":"Use when the user explicitly asks for a performance review, benchmark review, profiling review, perf audit, pprof analysis, allocation review, latency regression check, hot-path review, throughput review, \"is this fast enough\", or \"review perf\". This skill is opt-in only — never ","description":"# Performance Review\n\nStructured review of hot-path performance, allocation patterns, and benchmark coverage. **Opt-in only** — performance is rarely the bottleneck for new code, and a perf review on every PR is noise. Run when the user explicitly asks, or when a feature is performance-sensitive by nature (hot path, fanout, large-data).\n\n**Out of scope** (defer to siblings):\n- Concurrency safety (race, deadlock, leak) → `review-reliability`\n- Cardinality / metric cost → `review-observability`\n- Database query plans / index design → `review-database`\n\n`review-performance` looks at code-level allocation and CPU hotspots, benchmark sufficiency, and obvious algorithmic complexity issues.\n\n## Workflow\n\n### 1. Scope and explore\n\n- Confirm scope with the user: full codebase, specific packages/directories, changed files only (PR or branch diff), or a specific hot path.\n- **Resolve scope.** Same conventions as siblings:\n  - **Changed files (PR or branch):** `git diff --name-only --diff-filter=d <base>...HEAD`; filter to source files.\n  - **Explicit paths/packages:** include all relevant source files.\n  - **Full codebase:** walk source files.\n- **If invoked from review-all** (only when the user opted in): receive `file_list`, `package_paths`, `has_changes`, `base_ref`, `REVIEW_DIR`, and `pr_url`.\n\nThis skill is **primarily Go-focused** because the existing review-* corpus targets Go; it has cross-language sections in [reference.md](reference.md) but the deepest checklist is for Go.\n\n### 2. System overview\n\nProduce a brief summary covering:\n- Languages and runtimes in scope\n- Identifiable hot paths (RPC handlers, queue consumers, batch jobs)\n- Existing benchmark coverage (Go: `Benchmark*` functions; presence of `testing.B`)\n- Observed SLOs / latency targets if documented in `REVIEW.md`, `README.md`, or runbooks\n\n### 3. Launch investigation subagent\n\nLaunch a single investigation subagent (`subagent_type=\"generalPurpose\"`, `model: sonnet` per `subagent-model-routing`) with the system overview and in-scope file list.\n\nPrompt it to:\n- Read all in-scope source files.\n- Apply the checklists in [reference.md](reference.md):\n  - Allocation hotspots (Go-specific patterns)\n  - Algorithmic complexity (N+1, nested loops over unbounded inputs, O(n²) on hot paths)\n  - Concurrency efficiency (goroutine-per-request anti-patterns, oversharing of locks, mutex contention)\n  - Benchmark sufficiency\n  - I/O batching and connection reuse\n- Identify which findings are real concerns vs. premature optimization. Bias toward \"show me the profile\" over \"I think this allocates\". Findings without evidence are P2/nit.\n- For each finding, search nearby code for existing benchmarks, comments, or TODOs.\n- Return findings using the **performance findings** template.\n\n### 4. Run static analyzers and benchmarks\n\n```sh\n# Go static analysis with perf-relevant linters\ncommand -v staticcheck >/dev/null && staticcheck -checks \"U1000,SA1019,SA6005\" <package_paths>\ncommand -v gocyclo     >/dev/null && gocyclo -over 15 <source_dirs>\n\n# Go: identify benchmark files in scope (used to detect coverage gaps)\ngrep -rl 'func Benchmark' --include='*_test.go' <package_paths>\n\n# Go: existing benchmark output (do NOT run benchmarks; this is a static review)\n# If the user explicitly asks to run benchmarks, ask for an isolated machine first; do not run on a dev workstation by default.\n\n# Go: build with -gcflags=\"-m=1\" can reveal escape analysis when the user wants it; do not run by default.\n```\n\nStatic analyzers feed the subagent. **Do not run benchmarks** as part of the review unless the user explicitly asks — benchmarks need isolated, repeatable hardware to produce useful numbers.\n\n### 5. Present results\n\nResolve the review output directory (same pattern as siblings):\n\n```sh\nREVIEW_DATE=$(date +%Y-%m-%d)\nREVIEW_DIR=\"reviews/${REVIEW_DATE}\"\nif [ -d \"$REVIEW_DIR\" ]; then REVIEW_DIR=\"reviews/${REVIEW_DATE}-$(date +%H%M)\"; fi\nmkdir -p \"$REVIEW_DIR\"\n```\n\nCapture run metadata (see [Run metadata header](#run-metadata-header)) and prepend to `${REVIEW_DIR}/PERFORMANCE-REVIEW.md`.\n\nOutput structure:\n1. Run metadata header\n2. System overview (from step 2)\n3. Findings table (grouped by category: allocation / complexity / concurrency / benchmarks / I/O)\n4. Recommended fix order, **with explicit \"needs profiling evidence\" markers** on findings that should not be acted on without a profile\n\nPresent the report to the user.\n\n---\n\n## Run metadata header\n\n```sh\nRUN_DATETIME=$(date -u +\"%Y-%m-%d %H:%M UTC\")\nGIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)\nGIT_COMMIT=$(git rev-parse --short HEAD)\nGIT_COMMIT_FULL=$(git rev-parse HEAD)\nGIT_SUBJECT=$(git log -1 --pretty=%s)\n# When scope is diff-based: BASE_REF=<base>; BASE_COMMIT=$(git rev-parse --short \"$BASE_REF\")\n```\n\n```markdown\n> **Run:** {RUN_DATETIME}\n> **Branch:** {GIT_BRANCH} @ {GIT_COMMIT} (`{GIT_COMMIT_FULL}`)\n> **Subject:** {GIT_SUBJECT}\n> **Base:** {BASE_REF} @ {BASE_COMMIT}   <!-- omit when scope is not diff-based -->\n> **Scope:** {scope description}\n```\n\n---\n\n## Finding link wrapping (PR mode)\n\nWhen `pr_url` is provided (or `gh pr view --json url -q .url 2>/dev/null` returns one for standalone runs), wrap every `path:line` reference inside the finding tables as a Markdown link:\n\n```sh\n~/.claude/scripts/pr-deeplink.sh \"$pr_url\" <path> <line>\n```\n\nThe display text stays `path:line`. Pass `L` for findings about removed code. Findings follow `terse-comments`: concrete fix, optional `bug:`/`risk:`/`nit:`/`unsure:` prefix.\n\n---\n\n## Output Templates\n\n### Performance findings\n\n```markdown\n| Priority | Category | Finding | Impact | Effort | Evidence | Tracked |\n|----------|----------|---------|--------|--------|----------|---------|\n| P0 | allocation | Description with code references | Allocations on every request | small | profile needed | — |\n| P1 | complexity | O(n²) loop in hot path at file:line | Linear-in-N regression for N > 1k | moderate | bench needed | TODO in file:line |\n```\n\n**Category column values:** `allocation`, `complexity`, `concurrency`, `benchmarks`, `io`.\n\n**Evidence column values:** `profile shown`, `bench shown`, `profile needed`, `bench needed`, `static-only`. Use this to flag findings that need empirical confirmation before action.\n\n### Re-evaluation table (for follow-up reviews)\n\n```markdown\n| Finding | Status | What Changed |\n|---------|--------|--------------|\n| ~~1. Description~~ | FIXED | Benchmark shows X% improvement |\n| 2. Description | Still applicable | No changes |\n```\n\n---\n\n## Guidelines\n\n- **Bias toward measurement.** If a finding can't be backed by a profile or benchmark, mark it `static-only` and downgrade priority unless the issue is glaring (e.g. O(n²) over user-controlled input).\n- **Don't run benchmarks on shared hardware** unless the user explicitly requests it. Benchmark noise is high; bad numbers are worse than no numbers.\n- Premature optimization is a real concern; explicitly say \"needs profile\" when a finding is intuition-based.\n- Include effort estimates.\n- When the user asks for a follow-up review, find the most recent review directory and append the re-evaluation table.\n- For detailed framework categories, see [reference.md](reference.md).\n- **Opt-in opt-out**: this skill should never run as part of `review-all` unless the user explicitly requests it. The orchestrator must check `include_performance` before fanning out to this skill.\n- **REVIEW.md integration**: If a `REVIEW.md` context section was provided by the review-all orchestrator (or exists at the repository root when running standalone), treat its rules as additional review criteria. \"Always check\" items are HIGH severity; domain-specific items (Performance section) are MEDIUM severity. \"Skip\" patterns exclude matching files from review scope.\n- Findings must cite probed evidence (`path:line`, grep output, command result), not pattern-matched suspicion. Per `~/.claude/rules/probe-not-assume.md`.","tags":["review","performance","skill","issue","paultyng","agent-skills","ai-tools","claude-code","cursor","dotfiles"],"capabilities":["skill","source-paultyng","skill-review-performance","topic-agent-skills","topic-ai-tools","topic-claude-code","topic-cursor","topic-dotfiles"],"categories":["skill-issue"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/paultyng/skill-issue/review-performance","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add paultyng/skill-issue","source_repo":"https://github.com/paultyng/skill-issue","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (7,922 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:09:02.703Z","embedding":null,"createdAt":"2026-05-18T13:21:27.690Z","updatedAt":"2026-05-18T19:09:02.703Z","lastSeenAt":"2026-05-18T19:09:02.703Z","tsv":"'+1':367 '-1':728 '/.claude/rules/probe-not-assume.md':1167 '/.claude/scripts/pr-deeplink.sh':810 '/dev/null':461,470,790 '/performance-review.md':633 '1':153,532,636,937 '15':473 '1k':882 '2':271,640,645,789,944 '3':313,646 '4':443,657 '5':575 'abbrev':705 'abbrev-ref':704 'act':673 'action':922 'addit':1124 'algorithm':149,364 'alloc':22,57,141,358,418,652,852,857,893 'alway':1127 'analysi':21,452,536 'analyz':446,548 'anti':385 'anti-pattern':384 'append':1048 'appli':352 'applic':947 'ask':9,88,508,512,565,1034 'audit':19 'back':960 'bad':1004 'base':234,736,737,739,746,763,764,766,1027 'batch':291,395 'bench':884,903,907 'benchmark':14,60,145,294,297,392,432,448,476,488,493,498,511,555,566,655,896,940,965,990,1000 'bias':408,951 'bottleneck':70 'branch':171,188,699,752,754 'brief':276 'bug':834 'build':528 'captur':617 'cardin':119 'categori':651,845,890,1057 'chang':166,184,233,936,949 'check':26,463,1087,1128 'checklist':267,354 'cite':1152 'code':73,139,429,825,855 'code-level':138 'codebas':163,211 'column':891,899 'command':458,467,1159 'comment':433,830 'commit':709,717,740,756,758,767 'complex':150,365,653,865,894 'concern':404,1016 'concret':831 'concurr':111,378,654,895 'confirm':157,920 'connect':397 'consum':290 'content':391 'context':1101 'control':985 'convent':181 'corpus':252 'cost':121 'cover':278 'coverag':61,295,483 'cpu':143 'criteria':1126 'cross':258 'cross-languag':257 'd':197,593,600,694 'data':104 'databas':125,132 'date':589,590,598,608,609,690 'datetim':689,751 'deadlock':114 'deepest':266 'default':526,546 'defer':108 'descript':770,853,938,945 'design':129 'detail':1055 'detect':482 'dev':523 'diff':172,190,195,735 'diff-bas':734 'diff-filt':194 'dir':237,595,602,605,616,632 'directori':582,1046 'display':814 'document':307 'domain':1134 'domain-specif':1133 'downgrad':972 'e.g':979 'effici':379 'effort':848,1029 'empir':919 'enough':36 'escap':535 'estim':1030 'evalu':925,1052 'everi':79,797,859 'evid':421,665,849,898,1154 'exclud':1144 'exist':250,293,431,492,1112 'explicit':8,87,203,507,564,662,997,1017,1081 'explor':156 'fan':1091 'fanout':101 'fast':35 'featur':92 'feed':549 'fi':612 'file':167,185,202,209,214,228,340,351,477,873,888,1146 'filter':196,199 'find':401,419,426,437,441,647,668,771,803,822,826,842,846,916,933,956,1023,1041,1150 'first':517 'fix':659,832,939 'flag':915 'focus':247 'follow':827,929,1038 'follow-up':928,1037 'framework':1056 'full':162,210,718,759 'func':487 'function':298 'gap':484 'gcflag':530 'generalpurpos':324 'gh':782 'git':189,698,700,708,710,716,719,724,726,741,753,755,757,761 'glare':978 'go':246,254,270,296,361,450,474,491,527 'go-focus':245 'go-specif':360 'gocyclo':469,471 'goroutin':381 'goroutine-per-request':380 'grep':485,1157 'group':649 'guidelin':950 'h':610,695 'handler':288 'hardwar':570,993 'head':198,707,715,723 'header':623,627,639,686 'high':1003,1131 'hot':28,54,99,176,285,376,870 'hot-path':27,53 'hotspot':144,359 'i/o':394,656 'identifi':284,399,475 'impact':847 'improv':943 'in-scop':337,347 'includ':205,489,1028,1088 'index':128 'input':372,986 'insid':801 'integr':1097 'intuit':1026 'intuition-bas':1025 'investig':315,320 'invok':216 'io':897 'isol':515,568 'issu':151,976 'item':1129,1136 'job':292 'json':785 'l':820 'languag':259,279 'larg':103 'large-data':102 'latenc':24,304 'launch':314,317 'leak':115 'level':140 'line':799,818,874,889,1156 'linear':876 'linear-in-n':875 'link':772,808 'linter':457 'list':229,341 'lock':389 'log':727 'look':136 'loop':369,868 'm':531,592,611,693,696 'machin':516 'mark':966 'markdown':748,807,843,932 'marker':666 'match':1145,1164 'measur':953 'medium':1140 'metadata':619,622,626,638,685 'metric':120 'mkdir':613 'mode':775 'model':325,330 'moder':883 'must':1086,1151 'mutex':390 'n':366,374,867,878,881,981 'name':192 'name-on':191 'natur':98 'nearbi':428 'need':567,663,863,885,906,908,918,1019 'nest':368 'never':47,1070 'new':72 'nit':836 'nois':82,1001 'number':574,1005,1010 'o':373,866,980 'observ':124,302 'obvious':148 'one':792 'opt':44,63,225,1062,1065 'opt-in':43,62,1061 'opt-out':1064 'optim':407,1012 'option':833 'orchestr':1085,1110 'order':660 'output':494,581,634,839,1158 'overshar':387 'overview':273,335,642 'p':614 'p0':851 'p1':864 'p2/nit':423 'packag':230 'packages/directories':165 'pars':703,713,722,744 'part':557,1073 'pass':819 'path':29,55,100,177,231,286,377,798,817,871,1155 'paths/packages':204 'pattern':58,363,386,584,1143,1163 'pattern-match':1162 'per':327,382,1166 'perf':18,39,76,455 'perf-relev':454 'perform':3,12,48,56,66,95,135,440,841,1089,1137 'performance-sensit':94 'plan':127 'pprof':20 'pr':80,169,186,239,774,777,783,811 'prefix':838 'prematur':406,1011 'prepend':629 'presenc':299 'present':576,678 'pretti':729 'primarili':244 'prioriti':844,973 'probe':1153 'produc':274,572 'profil':16,413,664,677,862,901,905,963,1020 'prompt':342 'provid':780,1104 'q':787 'queri':126 'queue':289 'race':113 'rare':68 're':924,1051 're-evalu':923,1050 'read':345 'readme.md':310 'real':403,1015 'receiv':227 'recent':1044 'recommend':658 'ref':235,706,738,747,765 'refer':800,856 'reference.md':262,263,356,357,1059,1060 'regress':25,879 'relev':207,456 'reliabl':118 'remov':824 'repeat':569 'report':680 'repositori':1115 'request':383,860,998,1082 'resolv':178,578 'result':577,1160 'return':436,791 'reus':398 'rev':702,712,721,743 'rev-pars':701,711,720,742 'reveal':534 'review':2,13,15,17,23,30,32,38,49,51,77,117,123,131,134,219,236,251,503,560,580,588,594,596,597,601,604,606,607,615,631,931,1040,1045,1076,1108,1125,1148 'review-al':218,1075,1107 'review-databas':130 'review-observ':122 'review-perform':1,133 'review-reli':116 'review.md':309,1096,1100 'risk':835 'rl':486 'root':1116 'rout':331 'rpc':287 'rule':1122 'run':83,444,497,510,520,544,554,618,621,625,637,684,688,749,750,795,989,1071,1118 'run-metadata-head':624 'runbook':312 'runtim':281 'sa1019':465 'sa6005':466 'safeti':112 'say':1018 'scope':107,154,158,179,283,339,349,479,732,768,769,1149 'search':427 'section':260,1102,1138 'see':620,1058 'sensit':96 'sever':1132,1141 'sh':449,587,687,809 'share':992 'short':714,745 'show':410,941 'shown':902,904 'sibl':110,183,586 'singl':319 'skill':41,242,1068,1095 'skill-review-performance' 'skip':1142 'slos':303 'small':861 'sonnet':326 'sourc':201,208,213,350 'source-paultyng' 'specif':164,175,362,1135 'standalon':794,1119 'static':445,451,502,547,910,969 'static-on':909,968 'staticcheck':460,462 'status':934 'stay':816 'step':644 'still':946 'structur':50,635 'subag':316,321,322,329,551 'subagent-model-rout':328 'subject':725,760,762 'suffici':146,393 'summari':277 'suspicion':1165 'system':272,334,641 'tabl':648,804,926,1053 'target':253,305 'templat':442,840 'ters':829 'terse-com':828 'test.go':490 'testing.b':301 'text':815 'think':416 'throughput':31 'todo':435,886 'topic-agent-skills' 'topic-ai-tools' 'topic-claude-code' 'topic-cursor' 'topic-dotfiles' 'toward':409,952 'track':850 'treat':1120 'type':323 'u':691 'u1000':464 'unbound':371 'unless':561,974,994,1078 'unsur':837 'url':240,778,786,788,812 'use':4,438,480,573,912 'user':7,86,161,224,506,539,563,683,984,996,1033,1080 'user-control':983 'utc':697 'v':459,468 'valu':892,900 'view':784 'vs':405 'walk':212 'want':540 'without':420,675 'workflow':152 'workstat':524 'wors':1007 'wrap':773,796 'x':942 'y':591,692","prices":[{"id":"9d5198d9-48ae-4d63-90af-d96bfd4c2fdd","listingId":"0218a0cd-370a-45e2-8ad1-5f8d0cfb5255","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"paultyng","category":"skill-issue","install_from":"skills.sh"},"createdAt":"2026-05-18T13:21:27.690Z"}],"sources":[{"listingId":"0218a0cd-370a-45e2-8ad1-5f8d0cfb5255","source":"github","sourceId":"paultyng/skill-issue/review-performance","sourceUrl":"https://github.com/paultyng/skill-issue/tree/main/skills/review-performance","isPrimary":false,"firstSeenAt":"2026-05-18T13:21:27.690Z","lastSeenAt":"2026-05-18T19:09:02.703Z"}],"details":{"listingId":"0218a0cd-370a-45e2-8ad1-5f8d0cfb5255","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"paultyng","slug":"review-performance","github":{"repo":"paultyng/skill-issue","stars":8,"topics":["agent-skills","ai-tools","claude-code","cursor","dotfiles"],"license":"mit","html_url":"https://github.com/paultyng/skill-issue","pushed_at":"2026-05-18T18:26:54Z","description":"Personal Claude Code / Cursor agent skills, rules, and config","skill_md_sha":"520551f64a94a4892038c7ded013deae837747aa","skill_md_path":"skills/review-performance/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/paultyng/skill-issue/tree/main/skills/review-performance"},"layout":"multi","source":"github","category":"skill-issue","frontmatter":{"name":"review-performance","description":"Use when the user explicitly asks for a performance review, benchmark review, profiling review, perf audit, pprof analysis, allocation review, latency regression check, hot-path review, throughput review, \"is this fast enough\", or \"review perf\". This skill is opt-in only — never run automatically as part of review-all unless the user explicitly requests it."},"skills_sh_url":"https://skills.sh/paultyng/skill-issue/review-performance"},"updatedAt":"2026-05-18T19:09:02.703Z"}}