Skip to content
cccskills
FreePublished on GitHub

perf-profile

Review game code for likely performance bottlenecks in processing, memory, rendering, and data loading. Compare available estimates with configured limits and produce ranked optimization recommendations, including expected impact, effort, risks, and areas needing runtime measurement.

OriginalShow the original description

Performance profiling — find bottlenecks, measure against budgets, produce ranked optimization recommendations.

See how to install

Good for

  • Finding performance bottleneck candidates in one game system
  • Reviewing performance across the whole game
  • Comparing available estimates with configured performance limits
  • Prioritizing optimizations by impact and effort

Files included (1)

  • SKILL.md10.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

!bash "${CLAUDE_SKILL_DIR}/../../hooks/yaml-helper.sh" resolve_config --keys performance.enforce,automation,workflow

Resolved above — use as-is. No block → defaults in .claude/docs/config-resolution.md.

Performance Profile

Every AskUserQuestion call follows .claude/docs/automation-modes.md (collaborative asks always · guided major-only · autonomous logs and proceeds; automation_always_ask categories always prompt).

Insufficient input — check this before producing any report

If the inputs this skill needs do not exist, the answer is "could not run" — not a filled-in report. Check first, and stop if the check fails.

  1. List the inputs this skill reads (data files, prior reports, profiler output, test results, registries, source code).
  2. For each, record FOUND or ABSENT — not "assumed present".
  3. If any input required for a section is ABSENT, that section is NOT ASSESSED — NO DATA. Do not estimate it, do not infer it from an adjacent artifact, and do not leave a mandated cell to be filled by whoever reads the template next.
  4. If every required input is ABSENT, stop and report NOT ASSESSED — NO DATA as the whole verdict, naming what was missing and which skill produces it.

A verdict of NOT ASSESSED is a success. It is the correct, useful answer to "what does the data say?" when there is no data. The failure mode this prevents is specific: a report whose verdict enum has no "could not run" state produces false clean passes — an asset audit returning COMPLIANT on a project with no assets and no standards, or a performance profile reporting ">99% headroom against a 16.67ms budget" with zero profiler data and no budget ever set.

Absence of evidence is never evidence of absence. A scan that finds no matches because there are no files to scan has not verified anything. Say which of the two happened — a reader cannot tell from a green result.


Phase 0: Resolve Budget Enforcement

performance.enforce decides what a budget violation means in this run. It does not change which budgets are measured — performance.target_framerate, frame_budget_ms, draw_call_limit and memory_ceiling_mb are profiled the same way at every level:

ValueEffect on this profile's findings
warn (default)Violations are reported as findings. They do not block; CI logs them without failing.
blockViolations are blockers. Say so explicitly in the report — a block project treats an over-budget system as release-stopping, and /gate-check will FAIL the Polish gate on it.
offBudgets are informational only. Still report measured values, but do not raise violations as findings or recommendations to fix.

Only warn, block and off are recognized. Surface any other value to the user and fall back to warn rather than guessing.

The value is locally overridable (/settings --local performance.enforce=block), so use the resolved block above rather than reading project.yaml — a teammate's stricter local setting is meant to bite on their machine only.

Phase 1: Determine Scope

Read the argument:

  • System name → focus profiling on that specific system
  • full → run a comprehensive profile across all systems

Phase 2: Load Performance Budgets

Read the committed budgets from config first — they are the project's record of what it agreed to, and design docs are the fallback, not the source:

(cd "${CLAUDE_SKILL_DIR}/../../.." && source .claude/hooks/yaml-helper.sh 2>/dev/null &&
  echo "performance.target_framerate: $(get_effective_yaml_key performance.target_framerate)" &&
  echo "performance.frame_budget_ms: $(get_effective_yaml_key performance.frame_budget_ms)" &&
  echo "performance.draw_call_limit: $(get_effective_yaml_key performance.draw_call_limit)" &&
  echo "performance.memory_ceiling_mb: $(get_effective_yaml_key performance.memory_ceiling_mb)")

Run it as one command: it loads the helper from the project root, so it works when the session was started in a subfolder. An empty value after a key means that budget is not set.

Written as four literal keys rather than a loop over leaf names, deliberately. The dead-settings audit matches the full dotted key, so a loop building performance.$k leaves three of the four spelled nowhere and the audit reports them DEAD while this skill reads them. Spell each key out in full.

Resolve these budgets from project.yaml, not from prose. Phase 0 above states these four budgets "are profiled the same way at every level". Sending the reader to "design docs or CLAUDE.md" instead means a user who set performance.target_framerate: 60 in project.yaml has it ignored by the one skill that profiles against budgets. The keys resolve correctly — this phase has to actually ask for them.

Then fall back to design docs or CLAUDE.md for anything config does not carry:

  • Target FPS (e.g., 60fps = 16.67ms frame budget)
  • Memory budget (total and per-system)
  • Load time targets
  • Draw call budgets
  • Network bandwidth limits (if multiplayer)

A metric with no committed budget is NOT ASSESSED, not a pass. Do not measure against the template's [16.67ms] placeholder — an unset budget is not a budget that was met, and reporting headroom against a number nobody chose is the exact fabrication this skill's own header warns about.


Phase 3: Analyze Codebase

CPU Profiling Targets:

  • _process() / Update() / Tick() functions — list all and estimate cost
  • Nested loops over large collections
  • String operations in hot paths
  • Allocation patterns in per-frame code
  • Unoptimized search/sort over game entities
  • Expensive physics queries (raycasts, overlaps) every frame

Memory Profiling Targets:

  • Large data structures and their growth patterns
  • Texture/asset memory footprint estimates
  • Object pool vs instantiate/destroy patterns
  • Leaked references (objects that should be freed but aren't)
  • Cache sizes and eviction policies

Rendering Targets (if applicable):

  • Draw call estimates
  • Overdraw from overlapping transparent objects
  • Shader complexity
  • Unoptimized particle systems
  • Missing LODs or occlusion culling

I/O Targets:

  • Save/load performance
  • Asset loading patterns (sync vs async)
  • Network message frequency and size

Phase 4: Generate Profiling Report

Write the report to production/polish/[scope]-report-[date].md, asking first per the Collaboration Protocol: "May I write this profiling report to production/polish/[scope]-report-[date].md?" Create the directory if absent.

Name the destination — do not just render the template into the conversation. A profile that lives only in the transcript is gone the moment the session ends, and no two runs can be compared. production/polish/ is the same location /team-polish writes, deliberately: a profile taken by either route belongs in one place, or the comparison this skill exists to enable cannot be made.

If a NOT ASSESSED section survives into the report, keep it in the written file. A profile whose gaps are edited out on the way to disk reads, later, as a complete measurement.

## Performance Profile: [System or Full]
Generated: [Date]

### Performance Budgets
| Metric | Budget | Estimated Current | Status |
|--------|--------|-------------------|--------|
| Frame time | [16.67ms] | [estimate] | [OK/WARNING/OVER/NOT ASSESSED] |
| Memory | [target] | [estimate] | [OK/WARNING/OVER/NOT ASSESSED] |
| Load time | [target] | [estimate] | [OK/WARNING/OVER/NOT ASSESSED] |
| Draw calls | [target] | [estimate] | [OK/WARNING/OVER/NOT ASSESSED] |

### Hotspots Identified
| # | Location | Issue | Estimated Impact | Fix Effort |
|---|----------|-------|------------------|------------|

### Optimization Recommendations (Priority Order)
1. **[Title]** — [Description]
   - Location: [file:line]
   - Expected gain: [estimate]
   - Risk: [Low/Med/High]
   - Approach: [How to implement]

### Quick Wins (< 1 hour each)
- [Simple optimization 1]

### Requires Investigation
- [Area that needs actual runtime profiling to confirm impact]

Output the report with a summary: top 3 hotspots, estimated headroom against each budget that is set — for a metric with none, no budget set — headroom not assessed — and recommended next action.


Phase 5: Scope and Timeline Decision

Activate this phase only if any hotspot has Fix Effort rated M or L.

Present significant-effort items and ask the user to choose for each:

  • A) Implement the optimization (proceed with fix now or schedule it — at workflow: minimal, which has no sprints, add it to the brief's build order)
  • B) Reduce feature scope (run /scope-check [feature] to analyze trade-offs)
  • C) Accept the performance hit and defer to Polish phase (log as known issue)
  • D) Escalate to technical-director for an architectural decision (run /architecture-decision)

If multiple items are deferred to Polish (choice C), record them under ### Deferred to Polish.


Verdict

Close every run that produced a report — whether or not Phase 5 ran — with: Verdict: COMPLETE — performance profile generated (saved to production/polish/[scope]-report-[date].md if the write was approved). The only other outcome is the NOT ASSESSED — NO DATA path above.


Phase 6: Next Steps

  • If bottlenecks require architectural change: run /architecture-decision.
  • If scope reduction is needed: run /scope-check [feature].
  • To schedule optimizations: run /sprint-plan update (at workflow: minimal, which has no sprints, add them to the brief's build order instead).

Rules

  • Never optimize without measuring first — gut feelings about performance are unreliable
  • Recommendations must include estimated impact — "make it faster" is not actionable
  • Profile on target hardware, not just development machines
  • Static analysis (this skill) identifies candidates; runtime profiling confirms

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

adopt

FreeSummary

Audit an existing project's design documents and supporting files to check whether their formats work with the template's skills. Get a numbered migration plan that prioritizes gaps and required changes, rather than simply listing what exists.

  • Checking existing documents before adopting a project template
  • Auditing game design documents or architecture decision records
  • Prioritizing gaps in project tracking and configuration files
Donchitos/Claude-Code-Game-Studios26.8KUpdated Oct 8, 2026

Document a technical decision in an architecture decision record, or ADR. Capture its context, alternatives, and consequences, assign a record number, and distinguish a proposed decision from an accepted one so dependent work reflects its actual status.

  • Recording the reasons behind a technical choice
  • Documenting alternatives and consequences of a design decision
  • Creating numbered records alongside existing architecture decisions
Donchitos/Claude-Code-Game-Studios26.8KUpdated Oct 8, 2026

Review whether game design requirements are covered by documented architecture decisions. Identify missing coverage, conflicting decisions, and engine compatibility concerns, with an optional matrix linking requirements to development stories and tests.

  • Find game requirements without architecture decisions
  • Check for conflicts between architecture decisions
  • Review compatibility with the pinned engine version
Donchitos/Claude-Code-Game-Studios26.8KUpdated Oct 8, 2026

art-bible

FreeSummary

Create a game's art direction document, defining its visual rules, mood, shapes, colors, and production standards. Review and approve sections individually, with guidance that connects character, environment, and interface design to the game's concept and technical constraints.

  • Defining a game's core visual identity before asset production
  • Documenting character, environment, and interface design rules
  • Aligning asset standards with engine and performance limits
Donchitos/Claude-Code-Game-Studios26.8KUpdated Oct 8, 2026

asset-audit

FreeSummary

Audit game asset files for naming rules, size limits, formats, and broken references. Receive a report of measured violations and suggested fixes, with clear explanations of checks that lack data or cannot be assessed for the engine.

  • Checking image and audio naming conventions
  • Finding files that exceed asset size limits
  • Investigating missing references and potentially unused assets
Donchitos/Claude-Code-Game-Studios26.8KUpdated Oct 8, 2026

asset-spec

FreeSummary

Turn game design documents and character profiles into asset specifications and image generation prompts. Define appearance, dimensions, file formats, and naming rules, then maintain an asset list that tracks progress and identifies shared assets.

  • List the visual assets needed for a game
  • Define consistent character and environment asset specifications
  • Prepare image generation prompts from an art direction guide
Donchitos/Claude-Code-Game-Studios26.8KUpdated Oct 8, 2026

See all skills by Donchitos

Report a problem with this skill