reverse-document

Donchitos/Claude-Code-Game-Studios · updated Apr 16, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/Donchitos/Claude-Code-Game-Studios --skill reverse-document
0 commentsdiscussion
summary

### Reverse Document

  • name: reverse-document
  • description: "Generate design or architecture documents from existing implementation. Works backwards from code/prototypes to create missing planning docs."
  • argument-hint: "<type> <path> (e.g., 'design src/gameplay/combat' or 'architecture src/core')"
skill.md
name
reverse-document
description
"Generate design or architecture documents from existing implementation. Works backwards from code/prototypes to create missing planning docs."
argument-hint
"<type> <path> (e.g., 'design src/gameplay/combat' or 'architecture src/core')"
user-invocable
true
allowed-tools
Read, Glob, Grep, Write, Edit, Bash # Read-only diagnostic skill — no specialist agent delegation needed

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

  • src/gameplay/combat/ → All combat-related code
  • src/core/event-system.cpp → Specific file
  • prototypes/stealth-mech/ → Prototype directory

Examples:

/reverse-document design src/gameplay/magic-system
/reverse-document architecture src/core/entity-component
/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 4: Present Findings

Before drafting, show what you discovered:

I've analyzed [path]/. Here's what I found:

MECHANICS IMPLEMENTED:
- [mechanic-a] with [property] (e.g. timing windows, cooldowns)
- [mechanic-b] (e.g. interaction between two states)
- [resource] system (depletes on [action], regens on [condition])
- [state] system (builds up, triggers [effect])

FORMULAS DISCOVERED:
- [Output] = [formula using discovered variables]
- [Secondary output] = [formula]

UNCLEAR INTENT AREAS:
1. [Resource] system — pacing or resource management?
2. [Mechanic] — core pillar or supporting feature?
3. [Value] scaling — intentional design or needs tuning?

Before I draft the design doc, could you clarify these points?

Wait for user to clarify intent before drafting.

Phase 5: Draft Document Using Template

Based on type, use appropriate template:

TypeTemplateOutput Path
designtemplates/design-doc-from-implementation.mddesign/gdd/[system-name].md
architecturetemplates/architecture-doc-from-code.mddocs/architecture/[decision-name].md
concepttemplates/concept-doc-from-prototype.mdprototypes/[name]/CONCEPT.md or design/concepts/[name].md

Draft structure:

  • Capture what exists (mechanics, patterns, implementation)
  • Document why it exists (intent clarified with user)
  • Identify what's missing (edge cases not handled, gaps in design)
  • Flag follow-up work (balance tuning, missing features)

Phase 6: Show Draft and Request Approval

Collaborative protocol:

I've drafted the [system-name] design doc based on your code and clarifications.

[Show key sections: Overview, Mechanics, Formulas, Design Intent]

ADDITIONS I MADE:
- Documented [mechanic] as "[intent]" per your clarification
- Added edge cases not in code (e.g., what if [resource] hits 0 mid-[action]?)
- Flagged balance concern: [scaling type] scaling at [boundary condition]

SECTIONS MARKED AS INCOMPLETE:
- "[System] interaction with [other-system]" (not fully implemented yet)
- "[Variant or feature]" (only [subset] implemented so far)

May I write this to design/gdd/[system-name].md?

Wait for approval. User may request changes before writing.

Phase 7: Write Document with Metadata

When approved, write the file with special markers:

---
status: reverse-documented
source: [path/]
date: [today]
verified-by: [User name]
---

# [System Name] Design

> **Note**: This document was reverse-engineered from the existing implementation.
> It captures current behavior and clarified design intent. Some sections may be
> incomplete where implementation is partial or intent was unclear.

[Rest of document...]

Phase 8: Flag Follow-Up Work

After writing, suggest next steps:

✅ Written to design/gdd/combat-system.md

FOLLOW-UP RECOMMENDED:
1. Run /balance-check on combat formulas (exponential scaling concern)
2. Create ADR for stamina system architecture decision
3. Implement missing edge cases:
   - Stamina depletion mid-combo behavior
   - Stagger state during dodge
4. Extend design doc when weapon variety is implemented

Would you like me to tackle any of these now?

Template Selection Logic

If analyzing...Use template...Because...
src/gameplay/*design-doc-from-implementation.mdGameplay mechanics → GDD
src/core/*, src/ai/*architecture-doc-from-code.mdCore systems → ADR
prototypes/*concept-doc-from-prototype.mdExperiments → concept doc
src/networking/*architecture-doc-from-code.mdTechnical systems → ADR
src/ui/*design-doc-from-implementation.mdUI/UX → design spec

Example Session: Reverse-Document a System

User: /reverse-document design src/gameplay/[system]

Agent: I'll analyze your [system] implementation to create a design doc.
       [Reads code, discovers mechanics, formulas]

Agent: I've analyzed src/gameplay/[system]/. Here's what I found:
       [Shows mechanics, formulas, unclear areas]

       Before drafting, could you clarify:
       1. [Resource] system intent?
       2. Is [mechanic] a core pillar?
       3. [Value] scaling — intentional or needs tuning?

User: 1. [Resource] is for pacing, prevent [unwanted behavior]
      2. [Mechanic] is core — I want [design intent]
      3. Yeah, exponential is too much, should be linear

Agent: Perfect, that clarifies the vision. Let me draft the design doc.
       [Shows draft with clarified intent]

       May I write this to design/gdd/[system-name].md?

User: Yes, write it.

Agent: ✅ Written to design/gdd/[system-name].md
       ✅ Marked as [REVERSE-DOCUMENTED]
       ✅ Flagged [value] scaling for rebalancing

       Next steps:
       - Update [formula] to [corrected scaling]
       - Run /balance-check to validate [curve]
       - Document [mechanic] as core pillar in game-pillars.md

Collaborative Protocol

This skill follows the collaborative design principle:

  1. Analyze First: Read code, understand implementation
  2. Question Intent: Ask about "why", not just "what"
  3. Present Findings: Show discoveries, highlight unclear areas
  4. User Clarifies: Separate intent from accidents
  5. Draft Document: Create doc based on reality + intent
  6. Show Draft: Display key sections, explain additions
  7. Get Approval: "May I write to [filepath]?" On approval: Verdict: COMPLETE — document generated. On decline: Verdict: BLOCKED — user declined write.
  8. Flag Follow-Up: Suggest related work, don't auto-execute

Never assume intent. Always ask before documenting "why".

how to use reverse-document

How to use reverse-document on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add reverse-document
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/Donchitos/Claude-Code-Game-Studios --skill reverse-document

The skills CLI fetches reverse-document from GitHub repository Donchitos/Claude-Code-Game-Studios and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/reverse-document

Reload or restart Cursor to activate reverse-document. Access the skill through slash commands (e.g., /reverse-document) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.530 reviews
  • Liam Torres· Dec 20, 2024

    We added reverse-document from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Chaitanya Patil· Dec 16, 2024

    reverse-document fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Hana Gill· Dec 8, 2024

    reverse-document fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Tariq Kapoor· Nov 27, 2024

    reverse-document is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Valentina Martinez· Nov 11, 2024

    Keeps context tight: reverse-document is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Piyush G· Nov 7, 2024

    reverse-document is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Shikha Mishra· Oct 26, 2024

    Keeps context tight: reverse-document is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Hana Johnson· Oct 18, 2024

    Keeps context tight: reverse-document is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Liam Reddy· Oct 2, 2024

    reverse-document is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Chinedu Ndlovu· Sep 13, 2024

    Solid pick for teams standardizing on skills: reverse-document is focused, and the summary matches what you get after install.

showing 1-10 of 30

1 / 3