perf-profile

perf-profile is a skill for Claude Code from pixel-cellar/Claude-Code-Game-Studios. It costs 36 tokens per session (1,066 once invoked), scanned A, original, MIT.

A performance profiling workflow for finding likely CPU, memory, rendering, file-loading, and network bottlenecks in a game. A performance budget is a target limit, such as a maximum frame time or memory use.

In plain words
What is it for?
Use it to inspect per-frame code, loops, allocations, physics queries, textures, object lifetimes, draw calls, loading, save files, and network messages.
Why use it?
It compares suspected costs with project targets and ranks optimization work by likely impact and effort.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

Good fit Use it to inspect per-frame code, loops, allocations, physics queries, textures, object lifetimes, draw calls, loading, save files, and network messages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pixel-cellar/claude-code-game-studios/perf-profile
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pixel-cellar/Claude-Code-Game-Studios --skill perf-profile
Clone the repo
git clone --depth 1 https://github.com/pixel-cellar/Claude-Code-Game-Studios

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for perf-profile

README.md
[![agentmods](https://agentmods.dev/badge/skills/pixel-cellar/claude-code-game-studios/perf-profile/github.svg)](https://agentmods.dev/skills/pixel-cellar/claude-code-game-studios/perf-profile)
Your own site
<a href="https://agentmods.dev/skills/pixel-cellar/claude-code-game-studios/perf-profile"><img src="https://agentmods.dev/badge/skills/pixel-cellar/claude-code-game-studios/perf-profile/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for perf-profile

Your own site · 80×15
<a href="https://agentmods.dev/skills/pixel-cellar/claude-code-game-studios/perf-profile"><img src="https://agentmods.dev/badge/skills/pixel-cellar/claude-code-game-studios/perf-profile.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,066 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.01066
Opus 5.5 $0.00014 $0.00426
Sonnet 5.5 $0.00007 $0.00213
Haiku 4.5 $0.00004 $0.00107

Measured 1mo ago against content hash af3946edbf7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

perf-profile scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/perf-profile/SKILL.md · 95 lines

What it actually says

当此技能被调用时:

  1. 确定范围根据参数:

    • 如果是系统名称:专注于该特定系统的分析
    • 如果是 full:对所有系统进行全面分析
  2. 读取性能预算 — 检查设计文档或 CLAUDE.md 中是否有现有性能目标:

    • 目标 FPS(例如 60fps = 16.67ms 帧预算)
    • 内存预算(总量和按系统)
    • 加载时间目标
    • Draw Call 预算
    • 网络带宽限制(如果是多人游戏)
  3. 分析代码库中的常见性能问题:

    CPU 分析目标:

    • _process() / Update() / Tick() 函数 — 列出所有并估算开销
    • 大集合上的嵌套循环
    • 热路径中的字符串操作
    • 每帧代码中的分配模式
    • 未优化的游戏实体搜索/排序
    • 每帧执行的昂贵物理查询(射线检测、重叠检测)

    内存分析目标:

    • 大型数据结构及其增长模式
    • 纹理/资源内存占用估算
    • 对象池 vs 实例化/销毁模式
    • 泄漏的引用(应该释放但未释放的对象)
    • 缓存大小和淘汰策略

    渲染目标(如适用):

    • Draw Call 估算
    • 重叠透明物体导致的过度绘制
    • 着色器 (Shader) 复杂度
    • 未优化的粒子系统
    • 缺失 LOD (Level of Detail) 或遮挡剔除 (Occlusion Culling)

    I/O 目标:

    • 存档/读档性能
    • 资源加载模式(同步 vs 异步)
    • 网络消息频率和大小
  4. 生成性能分析报告:

    ## 性能分析:[系统或全面]
    生成日期:[日期]
    
    ### 性能预算
    | 指标 | 预算 | 估算当前值 | 状态 |
    |------|------|-----------|------|
    | 帧时间 | [16.67ms] | [估算值] | [正常/警告/超标] |
    | 内存 | [目标] | [估算值] | [正常/警告/超标] |
    | 加载时间 | [目标] | [估算值] | [正常/警告/超标] |
    | Draw Call | [目标] | [估算值] | [正常/警告/超标] |
    
    ### 发现的热点
    | # | 位置 | 问题 | 预估影响 | 修复工作量 |
    |---|------|------|---------|-----------|
    | 1 | [文件:行号] | [描述] | [高/中/低] | [小/中/大] |
    | 2 | [文件:行号] | [描述] | [高/中/低] | [小/中/大] |
    
    ### 优化建议(按优先级排序)
    1. **[标题]** — [优化描述]
       - 位置:[文件:行号]
       - 预期收益:[估算值]
       - 风险:[低/中/高]
       - 方案:[实现方式]
    
    ### 快速见效(每个不到 1 小时)
    - [简单优化 1]
    - [简单优化 2]
    
    ### 需要进一步调查
    - [需要实际运行时分析来确定影响的领域]
    
  5. 输出报告并附带摘要:前 3 个热点、相对于预算的估算余量,以及建议的下一步行动。

规则

  • 不要先测量就优化 — 对性能的直觉是不可靠的
  • 建议必须包含预估影响 — "让它更快"不具有可操作性
  • 在目标硬件上进行分析,而不仅仅是开发机器
  • 区分 CPU 瓶颈、GPU 瓶颈和 I/O 瓶颈
  • 考虑最坏情况(最大实体数、最低配置硬件、最差网络条件)
  • 静态分析(本技能)识别候选;运行时分析确认
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 95 lines · 36 tokens per session scan A af3946edbf7d

Subscribe to this mod's changes

perf-profile is a skill published in the GitHub repository pixel-cellar/Claude-Code-Game-Studios (361 stars, last pushed 6mo ago), licensed MIT. It adds 36 tokens to every session and 1,066 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories