Skip to content

Guide · Agent skill

How to use the reverse-document agent skill for game code

Updated · written with AI from the project's own documentation and checked against our catalogue data

reverse-document is an agent skill for Claude Code, from the Donchitos/Claude-Code-Game-Studios project under the MIT licence. It makes the agent read existing game code or a prototype folder and draft documentation for it: a game design section, an architecture decision record, or a concept document describing what the code already does. This guide explains what a skill is, how to install this one, how to trigger it, and where its output needs your review.

Reverse DocumentationDonchitos/Claude-Code-Game-Studios · MIT

Quick start

  1. 1Install the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ for all projects, or into the project's .claude/skills/ folder. In the Claude apps, upload it under Settings, then Capabilities, then Skills.
  2. 2Check your code layout. Make sure the code sits in src/ for Godot, Assets/ for Unity, or Source/ for Unreal, and that the hooks/yaml-helper.sh helper is available in a bash shell.
  3. 3Pick a document type. Choose design for a game design section, architecture for an ADR, or concept for a prototype document.
  4. 4Run the skill on a path. Use /reverse-document with your type and path, for example /reverse-document design src/gameplay/combat.
  5. 5Answer the intent questions. Review the mechanics and formulas it lists, then answer its questions about why things were built that way. Unanswered items remain open in the draft.
  6. 6Review the draft. Check every formula and tuning value against the code before you treat the document as authoritative.

What an agent skill is and what this one does

An agent skill is a folder containing a SKILL.md file. The file tells a compatible agent when to use the skill and what steps to follow. This skill is described as working backwards from code and prototypes to produce documentation that is missing.

When it runs, the agent reads the code under a path you give it and first summarises the mechanics, formulas and tuning values it finds. It then asks you about intent before writing anything. For example, it may ask whether a resource drain exists for pacing or for strategy, because code records what was built but not why.

  • design: generates a game design document (GDD section)
  • architecture: generates an Architecture Decision Record (ADR)
  • concept: generates a concept document from a prototype
  • If the code is too thin to support a document, the skill stops and says so rather than inventing content

Install the reverse-document skill

You can install the skill in one of two ways. Download the ZIP from the skill's page on this directory, then either unzip it into your user skills folder or into a project's skills folder. The skill lives in a reverse-document folder, so its SKILL.md should end up at reverse-document/SKILL.md inside one of these locations.

Alternatively, if you use the Claude apps, upload the ZIP under Settings, then Capabilities, then Skills.

  • User-wide: unzip into ~/.claude/skills/
  • Single project: unzip into the project's .claude/skills/ folder
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP
~/.claude/skills/reverse-document/SKILL.md

What you need before you run it

The skill needs Claude Code or another agent that can read SKILL.md files. Your project must contain source code in the folder that matches your engine: src/ for Godot, Assets/ for Unity, or Source/ for Unreal. The skill also uses a bash shell to run a config helper, hooks/yaml-helper.sh, which it references. That helper's contents are not part of the reviewed files, so check it before relying on the config step.

The skill's allowed tools are Read, Glob, Grep, Write, Edit and a restricted Bash command for the config helper. The reviewed material lists no network use.

  • Claude Code or a compatible SKILL.md agent
  • A project folder with code in src/ (Godot), Assets/ (Unity) or Source/ (Unreal)
  • A bash shell for hooks/yaml-helper.sh

Trigger the skill with a command or a natural request

The skill is user-invocable with the form /reverse-document <type> <path>. The type is design, architecture or concept, and the path is a folder or file under your code root. The path examples in the skill are src/gameplay/combat/ for Godot, Assets/Scripts/Core/EventSystem.cs for Unity, Source/MyGame/Private/AI/ for Unreal, and prototypes/stealth-mech/ for a prototype folder.

The skill description covers requests like reverse-engineering a design doc from a feature, or documenting the why behind existing code. Be specific about the path so the agent knows which code to read.

  • Design doc: /reverse-document design src/gameplay/magic-system
  • Architecture record: /reverse-document architecture Source/MyGame/Private/EntityComponent
  • Concept doc: /reverse-document concept prototypes/vehicle-combat
  • Natural request: ask the agent to write a design doc for the combat code in src/gameplay/combat and say you want it to clarify intent first
/reverse-document design src/gameplay/magic-system

Review the findings and answer the intent questions

Before drafting, the skill shows a findings summary with mechanics, formulas and unclear intent areas. Any section with nothing found reads none found in the source. The skill then waits for your answers. If you do not answer the intent questions, it does not draft the resolved version, and unanswered items are carried into the draft as open questions.

The skill also checks sufficiency first. If the target path has fewer than about 20 lines of non-boilerplate code, or no mechanics, formulas or tuning values, it stops and reports the counts. For a design capture from scratch, the skill says /design-system is the skill built to ask rather than infer.

  • Expect questions such as whether a resource system is for pacing or resource management
  • Answer 'I don't know' honestly; unanswered items stay open in the draft
  • Treat the output as a draft that needs human checking

Tips for better results

Point the skill at a focused folder rather than the whole project. A narrow path such as src/gameplay/combat gives the agent a clearer set of mechanics to summarise. The skill also resolves a workflow tier for the target system, which sets how much document is generated: a full tier produces an 8-section GDD, while a minimal tier produces a one-page brief. Check the tier before you run the skill, because a wrong tier produces the wrong artifact.

The copy of SKILL.md reviewed for this page is cut off in the middle of its final section, and the referenced files in .claude/docs/ were not included. Details of the automation modes and workflow tiers therefore come from those files, which you should read in your own project.

  • Narrow the path to one system
  • Confirm the workflow tier for that system before running
  • Read the referenced .claude/docs files in your project, since they were not reviewed here

Safety notes on scripts and network

The skill runs a script: the config helper hooks/yaml-helper.sh is called with the resolve_config option. The reviewed material says the skill uses no network. Because the helper's contents were not reviewed, read hooks/yaml-helper.sh before installing so you know what it does on your machine.

The skill can write and edit files, so generated documents will land in your project. Review changes in version control before you commit them.

  • Runs scripts: yes, via hooks/yaml-helper.sh
  • Uses network: no, according to the reviewed material
  • Can write and edit project files

What people use it for

  • Documenting a combat feature that was built without a design doc
  • Writing an ADR for the patterns and trade-offs in an inherited Unity codebase
  • Turning a Godot prototype of a stealth mechanic into a concept document
  • Recording the tuning values and formulas in a gameplay system before rebalancing

Frequently asked questions

Is reverse-document free to use?

The skill is published under the MIT licence, as stated on its page. Check the licence file in the source repository for the full terms before reuse.

What do I need to install reverse-document?

You need Claude Code or another agent that reads SKILL.md files, a project with code in src/, Assets/ or Source/, and a bash shell for the config helper. Install it by unzipping into ~/.claude/skills/ or a project's .claude/skills/ folder.

How do I install reverse-document in the Claude apps?

Download the ZIP from this page, then upload it in the Claude apps under Settings, then Capabilities, then Skills. The upload path is the one for the apps; the unzip path is for Claude Code.

Does reverse-document work with Unity, Godot and Unreal?

The skill's path conventions cover Godot's src/, Unity's Assets/ and Unreal's Source/<Module>/. It is aimed at game engine layouts, so it is not suited to non-game codebases.

Why does reverse-document refuse to write a document?

It runs a sufficiency check first. If the path has too little implementation, with no mechanics, formulas or tuning values, or fewer than about 20 lines of non-boilerplate code, it stops because there is nothing to infer the design from.

What is a better alternative if I have no code yet?

The skill's own guidance says that if the design exists only in your head, /design-system is the skill that captures it by asking rather than inferring. Use that before writing code.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use reverse-document if you have a game codebase in Godot, Unity or Unreal that lacks design or architecture docs, and you can answer questions about intent. Pick something else if you have no implementation yet, want a document you can publish without review, or work on a non-game project.

Download the skill