renderdoc-analyzer

A skill for examining RenderDoc capture files and tracing how a selected part of a rendered frame was produced. RenderDoc is a graphics debugging tool, and an RDC file is a saved frame capture.

In plain words
What is it for?
Use it to inspect specified draw calls, reverse-engineer vertex and pixel shaders, examine texture and buffer data, export graphics assets, and document the rendering process.
Why use it?
It provides evidence-based inspection of draw calls, shaders, textures, and rendering costs instead of relying only on the final picture or assumptions.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/hengle/renderdocmcp2/renderdoc-skill
Any agent
npx skills add Hengle/RenderDocMCP2 --skill renderdoc-skill
Clone the repo
git clone --depth 1 https://github.com/Hengle/RenderDocMCP2

Made for: Claude Code, Codex.

Per session 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,506 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00149 $0.02506
Opus 5 $0.00075 $0.01253
Sonnet 5 $0.00030 $0.00501
Haiku 4.5 $0.00015 $0.00251

Measured 2d ago against content hash 3b304be5d76c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

renderdoc-analyzer 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 2d 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.

renderdoc-Skill/SKILL.md · 180 lines

How it starts

The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RenderDoc 抓帧逆向分析

概述

此 Skill 提供从 RenderDoc 抓帧文件(.rdc)进行渲染逆向工程的完整工作流,涵盖:

  • 打开并浏览 .rdc 抓帧文件
  • 识别和定位特定渲染部件的 DrawCall
  • 逆向分析着色器(顶点 + 片元)
  • 导出贴图、模型、Shader 为 Unity 可用资产
  • 生成渲染耗时统计和完整使用文档

核心原则

⚠️ 人工决策优先

严禁自行决定分析范围。 必须由用户明确指定要分析的部件或范围:

  • 如果用户说"分析头发"→ 只分析头发相关 DrawCall
  • 如果用户说"分析全部"→ 分析所有 DrawCall
  • 如果用户说"分析这个 DrawCall"→ 只分析指定的 Event ID
  • 如果用户没有指定分析范围 → 主动询问用户要分析哪些部件,提供 DrawCall 列表供选择

⚠️ 基于证据判断

严禁凭经验猜测。 所有判断必须基于实际数据:

  • 识别 DrawCall 内容必须通过缩略图对比,不能仅凭面数猜测
  • Shader 逆向必须基于 SPIR-V/DXBC 反编译,不能凭渲染效果推测算法
  • CBuffer 参数必须从反射数据精确提取 byte offset,不能假设布局
  • 纹理用途必须通过查看实际贴图内容确认,不能仅凭 slot 名猜测

工作流

整个分析流程分为 6 个阶段。根据用户需求执行部分或全部阶段。

阶段 1:打开抓帧

  1. 检查 RenderDoc 是否在运行(ping
  2. 如未运行,使用 launch_renderdoc 启动并加载 .rdc 文件
  3. 如已运行,使用 open_capture 打开指定文件
  4. 等待 bridge 就绪(大文件可能需要 60-90 秒)
  5. 使用 get_capture_status 确认 API 类型(Vulkan/D3D11/D3D12/OpenGL)

阶段 2:帧概览与 DrawCall 识别

  1. get_frame_summary 获取帧统计(总 DrawCall 数、Dispatch 数等)
  2. get_draw_calls 获取渲染层级结构,识别主要 Render Pass
  3. identify_drawcalls 生成每个 DrawCall 的 RT 缩略图:
    • 指定 output_dir 保存缩略图 PNG
    • 指定 render_target 为主色彩 RT 的资源 ID
    • 限定 event_id_min/event_id_max 到主渲染 Pass 范围
  4. 查看缩略图逐一比对,精确识别每个 DrawCall 渲染的内容(皮肤、头发、眼睛、装备等)
  5. 将识别结果汇报给用户,等待用户指定要深入分析的部件

阶段 3:Shader 逆向分析

对用户指定的目标 DrawCall:

  1. reverse_shader 获取片元着色器完整数据:
    • SPIR-V/DXBC 反编译
    • CBuffer 反射数据(精确 byte offset)
    • 绑定纹理列表(资源 ID、尺寸、推断角色)
    • 运行时 CBuffer 值
  2. reverse_shader 获取顶点着色器数据
  3. get_pipeline_state 获取完整管线状态(RT 格式、Viewport、混合模式、深度测试等)
  4. get_bound_textures 确认纹理绑定的实际资源 ID
  5. export_drawcall 导出完整 DrawCall 数据(所有平台反汇编 + 纹理 PNG + summary.json)
  6. 查看导出的纹理图片确认每张贴图的实际内容和用途

逆向代码时的精确性要求(详见 references/workflow.md):

  • 所有 helper 函数必须 1:1 从 SPIR-V/DXBC 指令翻译
  • 所有魔法数字必须从常量池精确提取,注释来源
  • CBuffer 布局必须精确到 byte offset
  • 循环结构必须从控制流精确还原

阶段 4:Unity 资产导出

当用户要求导出到 Unity 时:

  1. 创建输出目录结构:
    <OutputName>/
    ├── <Name>.shader        # Unity ShaderLab + HLSL
    ├── Textures/            # 所有关联纹理
    └── Models/              # 网格模型 (.fbx/.obj)
    

Read the full file on GitHub · 180 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 180 lines · 149 tokens per session scan A 3b304be5d76c

Subscribe to this mod's changes

renderdoc-analyzer is a skill published in the GitHub repository Hengle/RenderDocMCP2 (21 stars, last pushed 4mo ago), licensed MIT. It adds 149 tokens to every session and 2,506 once invoked, about $0.0007 per session on Opus 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-08-30.

Related

Other skills, from other repositories

geometry-and-math

Use this skill when using Phaser 4 math and geometry utilities. Covers vectors, rectangles, circles, triangles, polygons, random number generation, angles, distance, interpolation, and snapping. Triggers on: Vector2, Rectangle, Circle, math, distance, angle, random, lerp.

phaserjs/phaser · 64 tokens

text-and-bitmaptext

Use this skill when displaying text in Phaser 4. Covers Text game objects, BitmapText, web fonts, text styling, word wrap, alignment, padding, and dynamic text content. Triggers on: Text, BitmapText, this.add.text, font, word wrap, text style.

phaserjs/phaser · 64 tokens

unity-mcp-orchestrator

Orchestrate Unity Editor via MCP (Model Context Protocol) tools and resources. Use when working with Unity projects through MCP for Unity - creating/modifying GameObjects, editing scripts, managing scenes, running tests, or any Unity Editor automation. Provides best practices, tool schemas, and workflow patterns for…

CoplayDev/unity-mcp · 72 tokens

gameobject-component-destroy

Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.

IvanMurzak/Unity-MCP · 49 tokens

assets-create-folder

Create a new folder under a parent folder inside 'Assets/'. The parent path must start with 'Assets/' and every intermediate folder in it must already exist. Refreshes the AssetDatabase at the end and returns the GUID(s) of the created folder(s).

IvanMurzak/Unity-MCP · 55 tokens

assets-prefab-save

Save the currently opened prefab edit stage back to its prefab asset without exiting the stage. Pair with 'assets-prefab-open' to enter the edit mode first.

IvanMurzak/Unity-MCP · 37 tokens