reverse-document

reverse-document is a skill for Claude Code from pixel-cellar/Claude-Code-Game-Studios. It costs 31 tokens per session (2,442 once invoked), scanned A, original, MIT.

A workflow that creates design or architecture documents by studying existing game code or prototypes. It explains how an implemented system works and records the decisions behind it.

In plain words
What is it for?
It helps document gameplay systems, software architecture, or game concepts from source code and prototypes.
Why use it?
It helps when a project was built without documentation or when you inherit code whose purpose is unclear. It also highlights dependencies, edge cases, and questions about the original intent.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit It helps document gameplay systems, software architecture, or game concepts from source code and prototypes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pixel-cellar/claude-code-game-studios/reverse-document
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 reverse-document
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 reverse-document

README.md
[![agentmods](https://agentmods.dev/badge/skills/pixel-cellar/claude-code-game-studios/reverse-document/github.svg)](https://agentmods.dev/skills/pixel-cellar/claude-code-game-studios/reverse-document)
Your own site
<a href="https://agentmods.dev/skills/pixel-cellar/claude-code-game-studios/reverse-document"><img src="https://agentmods.dev/badge/skills/pixel-cellar/claude-code-game-studios/reverse-document/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 reverse-document

Your own site · 80×15
<a href="https://agentmods.dev/skills/pixel-cellar/claude-code-game-studios/reverse-document"><img src="https://agentmods.dev/badge/skills/pixel-cellar/claude-code-game-studios/reverse-document.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,442 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.00031 $0.02442
Opus 5.5 $0.00012 $0.00977
Sonnet 5.5 $0.00006 $0.00488
Haiku 4.5 $0.00003 $0.00244

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

Security

Grade A, and why

reverse-document 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/reverse-document/SKILL.md · 262 lines

How it starts

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

逆向文档化

本技能分析现有实现(代码、原型、系统)并生成相应的设计或架构文档。适用于以下场景:

  • 你在没有先写设计文档的情况下构建了一个功能
  • 你接手了一个没有文档的代码库
  • 你原型化了一个机制并需要将其规范化
  • 你需要记录现有代码背后的 "为什么"

工作流

1. 解析参数

格式:/reverse-document <类型> <路径>

类型选项:

  • design -> 生成游戏设计文档 (GDD 章节)
  • architecture -> 生成架构决策记录 (ADR)
  • concept -> 从原型生成概念文档

路径:要分析的目录或文件

  • src/gameplay/combat/ -> 所有战斗相关代码
  • src/core/event-system.cpp -> 特定文件
  • prototypes/stealth-mech/ -> 原型目录

示例:

/reverse-document design src/gameplay/magic-system
/reverse-document architecture src/core/entity-component
/reverse-document concept prototypes/vehicle-combat

2. 分析实现

阅读并理解代码/原型:

对于设计文档 (GDD):

  • 识别机制、规则、公式
  • 提取玩法数值(伤害、冷却时间、范围)
  • 找到状态机、技能系统、成长系统
  • 检测代码中处理的边缘情况
  • 映射依赖(哪些系统之间有交互?)

对于架构文档 (ADR):

  • 识别模式(ECS、单例、观察者等)
  • 理解技术决策(线程、序列化等)
  • 映射依赖和耦合关系
  • 评估性能特征
  • 找到约束和权衡

对于概念文档(原型分析):

  • 识别核心机制
  • 提取涌现的玩法模式
  • 记录什么有效、什么无效
  • 发现技术可行性洞见
  • 记录玩家幻想 / 手感

3. 提出澄清问题(协作协议)

不要只是描述代码。要问关于意图:

设计问题:

  • "我看到一个在战斗中消耗的体力系统。这是为了:
    • 节奏控制(防止乱按)?
    • 资源管理(策略深度)?
    • 还是其他原因?"
  • "击倒机制似乎很核心。这是一个核心支柱,还是辅助功能?"
  • "伤害随等级指数缩放。是有意为之的力量幻想,还是需要重新平衡?"

架构问题:

  • "你使用了服务定位器模式。这是为了:
    • 可测试性(模拟依赖)?
    • 解耦(减少硬引用)?
    • 还是继承了现有代码?"
  • "我看到使用了手动内存管理而非智能指针。是性能需求,还是历史遗留?"

概念问题:

  • "原型强调潜行而非战斗。这是预期的核心支柱吗?"
  • "玩家似乎在利用抓钩加速。这是功能还是 Bug?"

4. 展示发现

在起草之前,展示你发现了什么:

我已经分析了 src/gameplay/combat/。以下是我的发现:

已实现的机制:
- 3 连击系统,带时机窗口
- 破防机制(重攻击 vs 格挡中的敌人)
- 体力系统(攻击/闪避时消耗,空闲时恢复)
- 击倒系统(累积触发脆弱状态)

发现的公式:
- 伤害 = 基础值 * (1 + 力量缩放 * 等级)
- 击倒累积 = 攻击击倒值 / (敌人.定力 * 0.5)
- 体力消耗 = 基础体力消耗 * (1 - 效率加成)

意图不明确的区域:
1. 体力系统 — 节奏控制还是资源管理?
2. 击倒 — 核心支柱还是辅助功能?
3. 伤害缩放 — 力量幻想还是需要调整?

在起草设计文档之前,能否请您澄清这些要点?

等待用户澄清意图后再起草。

5. 使用模板起草文档

根据类型,使用相应模板:

类型 模板 输出路径
design templates/design-doc-from-implementation.md design/gdd/[系统名称].md
architecture templates/architecture-doc-from-code.md docs/architecture/[决策名称].md
concept templates/concept-doc-from-prototype.md prototypes/[名称]/CONCEPT.md 或 design/concepts/[名称].md

Read the full file on GitHub · 262 lines

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 · 262 lines · 31 tokens per session scan A 37ddf3ae2507

Subscribe to this mod's changes

reverse-document is a skill published in the GitHub repository pixel-cellar/Claude-Code-Game-Studios (361 stars, last pushed 6mo ago), licensed MIT. It adds 31 tokens to every session and 2,442 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

playtest-report

Structured playtest report template, or turn existing playtest notes into structured feedback.

Donchitos/Claude-Code-Game-Studios · 20 tokens

godot-signals-groups

Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups: declare and emit custom signals, connect with Callables (incl. bind/one-shot), and broadcast to many nodes via groups and callgroup. Use when wiring node communication in a Godot project, replacing tight references with signals…

gamedev-skills/awesome-gamedev-agent-skills · 95 tokens

motion

Reconstruct a skeleton from calibrated mesh projections and sequential VLM joint annotations, then fit joints and skin weights. Generate motion from joint-position trajectories, rhythm and contact constraints through IK; refine bone orientation against the action, then export, retarget and validate on the target mesh.

OpenDCAI/GameFactory-3A · 0 tokens

unity-addressables

Manage Addressables groups, entries, profiles and content builds (com.unity.addressables, reflection-based).

Besty0728/Unity-Skills · 25 tokens

unity-manual-component

Manually add, configure, reorder, and copy components on GameObjects using Unity Editor UI. For one-off Inspector workflows that do not need REST automation.

Besty0728/Unity-Skills · 36 tokens

threejs-exposure-color-grading

Build a measured exposure and grading path in Three.js. Use for a 64x36 encoded luminance meter, asynchronous readback, weighted log-average exposure, asymmetric adaptation, single tone-map ownership, and a generated 32-cube post-tone-map LUT.

scottstts/Threejs-Awesome-Graphics-Agent-Skills · 60 tokens