Skip to content
Skillpedia
Documentation33k Β· #8476

reverse-document

What it does

This skill reads existing game code or a prototype and writes the design or technical document that was never written. It is for teams who built features without documents, or inherited a project with none.

When to use it

  • βœ“When a feature was built without a design document and the team needs one now.
  • βœ“When a team inherits a codebase with no documentation and needs to understand it.
  • βœ“When a prototype mechanic has to be formalized into a written design.

Skill link

https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/reverse-document/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/reverse-document/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œWrite a design document for the combat code in src/gameplay/combat, based on what it actually does.”

5 new skills a week. 1 minute to read.

How it works

The skill takes a document type and a path to the code, reads the implementation, and writes the matching document: a design section, an architecture decision record or a concept note. It asks for confirmation before saving.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Reverse Documentation

This skill analyzes existing implementation (code, prototypes, systems) and generates appropriate design or architecture documentation. Use this when:

  • You built a feature without writing a design doc first
  • You inherited a codebase without documentation
  • You prototyped a mechanic and need to formalize it
  • You need to document "why" behind existing code

Workflow

Phase 1: Parse Arguments

Format: /reverse-document <type> <path>

Type options:

  • design β†’ Generate a game design document (GDD section)
  • architecture β†’ Generate an Architecture Decision Record (ADR)
  • concept β†’ Generate a concept document from prototype

Path: Directory or file to analyze, under the code root β€” src/ Godot, Assets/ Unity, Source/<Module>/ Unreal (.claude/docs/code-root-resolution.md)

  • src/gameplay/combat/ β†’ All combat-related code (Godot)
  • Assets/Scripts/Core/EventSystem.cs β†’ Specific file (Unity)
  • Source/MyGame/Private/AI/ β†’ A module folder (Unreal)
  • prototypes/stealth-mech/ β†’ Prototype directory

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

Automation mode: Resolve modes.automation (project.local.yaml β†’ project.yaml β†’ default collaborative). Every AskUserQuestion call and every file write follows .claude/docs/automation-modes.md (collaborative asks always Β· guided major-only Β· autonomous logs and proceeds; automation_always_ask categories always prompt).

Resolved above β€” use as-is. No block β†’ defaults in .claude/docs/config-resolution.md.

Resolve the workflow tier for the target system: map <path> to a system name, then use the system_overrides row for that system if the block above lists one, else the project workflow value. It sets how much document is generated β€” see Phase 5. Semantics of each tier are in .claude/docs/workflow-modes.md.

Resolve the tier β€” do not assume it. workflow-modes.md defines what each tier means, but it cannot say what this project is set to; take that from the block above. The consequence is large here β€” at full this skill writes an 8-section GDD and at minimal a one-page brief, so a wrong tier produces the wrong artifact entirely.

Examples:

/reverse-document design src/gameplay/magic-system
/reverse-document architecture Source/MyGame/Private/EntityComponent
/reverse-document concept prototypes/vehicle-combat

Phase 2: Analyze Implementation

Read and understand the code/prototype:

For design docs (GDD):

  • Identify mechanics, rules, formulas
  • Extract gameplay values (damage, cooldowns, ranges)
  • Find state machines, ability systems, progression
  • Detect edge cases handled in code
  • Map dependencies (what systems interact?)

For architecture docs (ADR):

  • Identify patterns (ECS, singleton, observer, etc.)
  • Understand technical decisions (threading, serialization, etc.)
  • Map dependencies and coupling
  • Assess performance characteristics
  • Find constraints and trade-offs

For concept docs (prototype analysis):

  • Identify core mechanic
  • Extract emergent gameplay patterns
  • Note what worked vs what didn't
  • Find technical feasibility insights
  • Document player fantasy / feel

Phase 3: Ask Clarifying Questions

DO NOT just describe the code. ASK about intent:

Design questions:

  • "I see a [resource] system that depletes during [activity]. Was this for:
    • Pacing (prevent spam)?
    • Resource management (strategic depth)?
    • Or something else?"
  • "The [mechanic] seems central. Is this a core pillar, or supporting feature?"
  • "[Value] scales exponentially with [factor]. Intentional design, or needs rebalancing?"

Architecture questions:

  • "You're using a service locator pattern. Was this chosen for:
    • Testability (mock dependencies)?
    • Decoupling (reduce hard references)?
    • Or inherited from existing code?"
  • "I see manual memory management instead of smart pointers. Performance requirement, or legacy?"

Concept questions:

  • "The prototype emphasizes stealth over combat. Is that the intended pillar?"
  • "Players seem to exploit the grappling hook for speed. Feature or bug?"

Phase 3b: Sufficiency Check β€” is there enough here to document?

Run this before Phase 4, and stop here if it fails. This skill infers a design from an implementation, so when the implementation is thin there is nothing to infer from β€” and the template below wi

FAQ

What document types can it write?

It can write a design section, an architecture decision record, or a concept document from a prototype.

Does it document the reasons behind the code?

It documents what the code does, and the reasons are inferred from the implementation, so review them.

Does it save files without asking?

No. Writes follow the project's automation setting, which can require your approval.

Details

Original description by the author

Generate missing design or architecture docs from existing implementation β€” works backwards from code and prototypes.

repo: Donchitos/Claude-Code-Game-Studios

Popularity

GitHub stars
33k
Ranking position
#8476
License
MIT
Updated
10/18/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills