{"data":{"slug":"github-donchitos-claude-code-game-studios-claude-skills-perf-profile-e2a7dcd18941","title":"Performance Profile Analysis","summary":"Identify performance bottlenecks, measure against budgets, and generate optimization recommendations. The deliverable includes a report with findings, and the analysis is scoped to specific systems or a full project profile.","url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-perf-profile-e2a7dcd18941","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-donchitos-claude-code-game-studios-claude-skills-perf-profile-e2a7dcd18941","markdown_url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-perf-profile-e2a7dcd18941.md","download_url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-perf-profile-e2a7dcd18941\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before running, ensure that the required inputs such as profiler output, test results, and performance budgets are present. If any required input is absent, the report will state 'NOT ASSESSED \u2014 NO DATA' and specify which inputs were missing.","instructions":"---\nname: perf-profile\ndescription: \"Performance profiling \u2014 find bottlenecks, measure against budgets, produce ranked optimization recommendations.\"\nargument-hint: \"[system-name or 'full']\"\nuser-invocable: true\nallowed-tools: Read, Glob, Grep, Write, Bash(bash \"*\/.claude\/skills\/perf-profile\/..\/..\/hooks\/yaml-helper.sh\" resolve_config *), Bash(bash \"*\/.claude\/skills\/perf-profile\/..\/..\/hooks\/yaml-helper.sh\" get_effective_yaml_key *)\nmodel: sonnet\n---\n\n!`bash \"${CLAUDE_SKILL_DIR}\/..\/..\/hooks\/yaml-helper.sh\" resolve_config --keys performance.enforce,automation,workflow`\n\nResolved above \u2014 use as-is. No block \u2192 defaults in\n`.claude\/docs\/config-resolution.md`.\n\n# Performance Profile\n\nEvery `AskUserQuestion` call follows `.claude\/docs\/automation-modes.md`\n(collaborative asks always \u00b7 guided major-only \u00b7 autonomous logs and proceeds;\n`automation_always_ask` categories always prompt).\n\n## Insufficient input \u2014 check this before producing any report\n\n**If the inputs this skill needs do not exist, the answer is \"could not run\" \u2014\nnot a filled-in report.** Check first, and stop if the check fails.\n\n1. List the inputs this skill reads (data files, prior reports, profiler output,\n   test results, registries, source code).\n2. For each, record `FOUND` or `ABSENT` \u2014 not \"assumed present\".\n3. If any input required for a section is ABSENT, that section is\n   **`NOT ASSESSED \u2014 NO DATA`**. Do not estimate it, do not infer it from an\n   adjacent artifact, and do not leave a mandated cell to be filled by whoever\n   reads the template next.\n4. If **every** required input is ABSENT, stop and report\n   **`NOT ASSESSED \u2014 NO DATA`** as the whole verdict, naming what was missing and\n   which skill produces it.\n\n**A verdict of `NOT ASSESSED` is a success.** It is the correct, useful answer to\n\"what does the data say?\" when there is no data. The failure mode this prevents is\nspecific: a report whose verdict enum has no \"could not run\" state produces\n**false clean passes** \u2014 an asset audit returning COMPLIANT on a project with no\nassets and no standards, or a performance profile reporting \">99% headroom against\na 16.67ms budget\" with zero profiler data and no budget ever set.\n\n**Absence of evidence is never evidence of absence.** A scan that finds no\nmatches because there are no files to scan has not verified anything. Say which of\nthe two happened \u2014 a reader cannot tell from a green result.\n\n---\n\n## Phase 0: Resolve Budget Enforcement\n\n`performance.enforce` decides what a budget violation *means* in this run. It\ndoes not change which budgets are measured \u2014 `performance.target_framerate`,\n`frame_budget_ms`, `draw_call_limit` and `memory_ceiling_mb` are profiled the\nsame way at every level:\n\n| Value | Effect on this profile's findings |\n|-------|-----------------------------------|\n| `warn` (default) | Violations are reported as findings. They do not block; CI logs them without failing. |\n| `block` | Violations are **blockers**. Say so explicitly in the report \u2014 a `block` project treats an over-budget system as release-stopping, and `\/gate-check` will FAIL the Polish gate on it. |\n| `off` | Budgets are informational only. Still report measured values, but do not raise violations as findings or recommendations to fix. |\n\nOnly `warn`, `block` and `off` are recognized. Surface any other value to the\nuser and fall back to `warn` rather than guessing.\n\n> The value is locally overridable (`\/project-settings --local performance.enforce=block`),\n> so use the resolved block above rather than reading `project.yaml` \u2014 a\n> teammate's stricter local setting is meant to bite on their machine only.\n\n## Phase 1: Determine Scope\n\nRead the argument:\n\n- System name \u2192 focus profiling on that specific system\n- `full` \u2192 run a comprehensive profile across all systems\n\n---\n\n## Phase 2: Load Performance Budgets\n\n**Read the committed budgets from config first** \u2014 they are the project's\nrecord of what it agreed to, and design docs are the fallback, not the source:\n\n```bash\nbash \"${CLAUDE_SKILL_DIR}\/..\/..\/hooks\/yaml-helper.sh\" get_effective_yaml_key performance.target_framerate\nbash \"${CLAUDE_SKILL_DIR}\/..\/..\/hooks\/yaml-helper.sh\" get_effective_yaml_key performance.frame_budget_ms\nbash \"${CLAUDE_SKILL_DIR}\/..\/..\/hooks\/yaml-helper.sh\" get_effective_yaml_key performance.draw_call_limit\nbash \"${CLAUDE_SKILL_DIR}\/..\/..\/hooks\/yaml-helper.sh\" get_effective_yaml_key performance.memory_ceiling_mb\n```\n\nRun each line as its own plain command, one key per call: the helper moves to\nthe project root itself, so it works when the session was started in a\nsubfolder, and this skill pre-approves that form only (a `source` or `cd ... &&`\nwrapper asks the user every time). Empty output means that budget is not set.\n\n> **Resolve these budgets from `project.yaml`, not from prose.** Phase 0 above\n> states these four budgets \"are profiled the same way at every level\". A user\n> who set `performance.target_framerate: 60` in `project.yaml` has it ignored if\n> the budget is read from design docs or CLAUDE.md instead.\n\nThen fall back to design docs or CLAUDE.md for anything config does not carry:\n\n- Target FPS (e.g., 60fps = 16.67ms frame budget)\n- Memory budget (total and per-system)\n- Load time targets\n- Draw call budgets\n- Network bandwidth limits (if multiplayer)\n\n**A metric with no committed budget is `NOT ASSESSED`, not a pass.** Do not\nmeasure against the template's `[16.67ms]` placeholder \u2014 an unset budget is not\na budget that was met, and reporting headroom against a number nobody chose is\nthe exact fabrication this skill's own header warns about.\n\n---\n\n## Phase 3: Analyze Codebase\n\n**CPU Profiling Targets:**\n- `_process()` \/ `Update()` \/ `Tick()` functions \u2014 list all and estimate cost\n- Nested loops over large collections\n- String operations in hot paths\n- Allocation patterns in per-frame code\n- Unoptimized search\/sort over game entities\n- Expensive physics queries (raycasts, overlaps) every frame\n\n**Memory Profiling Targets:**\n- Large data structures and their growth patterns\n- Texture\/asset memory footprint estimates\n- Object pool vs instantiate\/destroy patterns\n- Leaked references (objects that should be freed but aren't)\n- Cache sizes and eviction policies\n\n**Rendering Targets (if applicable):**\n- Draw call estimates\n- Overdraw from overlapping transparent objects\n- Shader complexity\n- Unoptimized particle systems\n- Missing LODs or occlusion culling\n\n**I\/O Targets:**\n- Save\/load performance\n- Asset loading patterns (sync vs async)\n- Network message frequency and size\n\n---\n\n## Phase 4: Generate Profiling Report\n\n**Write the report to `production\/polish\/[scope]-report-[date].md`**, asking first\nper the Collaboration Protocol: *\"May I write this profiling report to\n`production\/polish\/[scope]-report-[date].md`?\"* Create the directory if absent.\n\n> **Name the destination \u2014 do not just render the template into the\n> conversation.** A profile that lives only in the transcript is gone the moment\n> the session ends, and no two runs can be compared. `production\/polish\/`\n> is the same location `\/team-polish` writes, deliberately: a profile taken by\n> either route belongs in one place, or the comparison this skill exists to enable\n> cannot be made.\n>\n> If a `NOT ASSESSED` section survives into the report, keep it in the written\n> file. A profile whose gaps are edited out on the way to disk reads, later, as a\n> complete measurement.\n\n\n```markdown\n## Performance Profile: [System or Full]\nGenerated: [Date]\n\n### Performance Budgets\n| Metric | Budget | Estimated Current | Status |\n|--------|--------|-------------------|--------|\n| Frame time | [16.67ms] | [estimate] | [OK\/WARNING\/OVER\/NOT ASSESSED] |\n| Memory | [target] | [estimate] | [OK\/WARNING\/OVER\/NOT ASSESSED] |\n| Load time | [target] | [estimate] | [OK\/WARNING\/OVER\/NOT ASSESSED] |\n| Draw calls | [target] | [estimate] | [OK\/WARNING\/OVER\/NOT ASSESSED] |\n\n### Hotspots Identified\n| # | Location | Issue | Estimated Impact | Fix Effort |\n|---|----------|-------|------------------|------------|\n\n### Optimization Recommendations (Priority Order)\n1. **[Title]** \u2014 [Description]\n   - Location: [file:line]\n   - Expected gain: [estimate]\n   - Risk: [Low\/Med\/High]\n   - Approach: [How to implement]\n\n### Quick Wins (< 1 hour each)\n- [Simple optimization 1]\n\n### Requires Investigation\n- [Area that needs actual runtime profiling to confirm impact]\n```\n\nOutput the report with a summary: top 3 hotspots, estimated headroom against\neach budget that is set \u2014 for a metric with none, `no budget set \u2014 headroom not\nassessed` \u2014 and recommended next action.\n\n---\n\n## Phase 5: Scope and Timeline Decision\n\nActivate this phase only if any hotspot has Fix Effort rated M or L.\n\nPresent significant-effort items and ask the user to choose for each:\n\n- **A) Implement the optimization** (proceed with fix now or schedule it \u2014 at `workflow: minimal`, which has no sprints, add it to the brief's build order)\n- **B) Reduce feature scope** (run `\/scope-check [feature]` to analyze trade-offs)\n- **C) Accept the performance hit and defer to Polish phase** (log as known issue)\n- **D) Escalate to technical-director for an architectural decision** (run `\/architecture-decision`)\n\nIf multiple items are deferred to Polish (choice C), record them under `### Deferred to Polish`.\n\n---\n\n## Verdict\n\nClose every run that produced a report \u2014 whether or not Phase 5 ran \u2014 with:\nVerdict: **COMPLETE** \u2014 performance profile generated (saved to\n`production\/polish\/[scope]-report-[date].md` if the write was approved). The only\nother outcome is the `NOT ASSESSED \u2014 NO DATA` path above.\n\n---\n\n## Phase 6: Next Steps\n\n- If bottlenecks require architectural change: run `\/architecture-decision`.\n- If scope reduction is needed: run `\/scope-check [feature]`.\n- To schedule optimizations: run `\/sprint-plan update` (at `workflow: minimal`, which has no sprints, add them to the brief's build order instead).\n\n### Rules\n- Never optimize without measuring first \u2014 gut feelings about performance are unreliable\n- Recommendations must include estimated impact \u2014 \"make it faster\" is not actionable\n- Profile on target hardware, not just development machines\n- Static analysis (this skill) identifies candidates; runtime profiling confirms\n","use_cases":["Identify CPU and memory bottlenecks in a game engine","Measure frame rate and memory usage against project budgets","Generate optimization recommendations for a rendering pipeline"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/Donchitos\/Claude-Code-Game-Studios\/blob\/abc0de79d6ceb0b5d7aa693945849b3937afbe6a\/.claude\/skills\/perf-profile\/SKILL.md","source_commit":"abc0de79d6ceb0b5d7aa693945849b3937afbe6a","license":null,"version":null,"listing_approved_at":"2026-11-18","created_at":"2026-11-17T18:32:29.000000Z","updated_at":"2026-11-18T12:52:01.000000Z","seo_title":"Performance Profile Analysis Tool","seo_description":"Find system bottlenecks, measure performance against budgets, and get ranked optimization recommendations.","seo_keywords":["performance profiling","system optimization","frame rate analysis","memory usage tracking","bottleneck detection"]}}