reverse-document
Skill72 starsChanged 7 months agoMITView on GitHub
This skill analyzes existing implementation (code, prototypes, systems) and generates appropriate design or architecture documentation. Use this when: Format: /reverse-document <type> <path> Type options: - design → Generate a product design document (PRD section) - architecture → Generate an Architecture Decision Record (ADR) - concept → Generate a concept document from prototype Path: Directory or file to analyze - src/api/auth/ → All combat-related code - src/core/event-system.cpp → Specific file - prototypes/stealth-mech/ → Prototype directory Read and understand the code/prototype: For…
8 other projects use a version of this, 6 of them edited.
Adopted by
Most recently taken up by
- HunLuanZhiZhu/Game-Studios-Pluginedited, first seen Oct 5, 2026
- Donchitos/Claude-Code-Game-Studiosedited, first seen Sep 29, 2026
- dawn840705/codex-code-studiosedited, first seen Aug 28, 2026
- striderZA/OpenCodeGameStudiosedited, first seen Aug 10, 2026
- cenconq25/claude-code-app-studiotheir own version, first seen May 3, 2026
- pixel-cellar/Claude-Code-Game-Studiostheir own version, first seen Mar 29, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 6
- Donchitos/Claude-Code-Game-Studios★ 26k29% same
- striderZA/OpenCodeGameStudios★ 9062% same
- CoralGame/Claude-Code-Game-Studios★ 1987% same
- dawn840705/codex-code-studios★ 1762% same
- timjrobinson/Claude-Code-Construction-Manager★ 411% same
- HunLuanZhiZhu/Game-Studios-Plugin★ 162% same
Wrote their own version · 2
- pixel-cellar/Claude-Code-Game-Studios★ 338same name
- cenconq25/claude-code-app-studio★ 41same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository117 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-healthSkill
- agent-styleSkill
- angular-best-practicesSkill
- annotateSkill
- api-designSkill
- architecture-decision-recordsSkill
- aws-serverlessSkill
- backend-architectSkill
- backend-patternsSkill
- brainstormSkill
- bug-reportSkill
- changelogSkill
- claude-apiSkill
- cloud-architectSkill
- cloud-run-puppeteerSkill
- code-review-checklistSkill
- code-reviewSkill
- code-simplificationSkill
- codex-sddSkill
- commitSkill
- context-engineeringSkill
- database-architectSkill
- db-reviewSkill
- deep-interviewSkill
- design-reviewSkill
- design-systemSkill
- devops-deploySkill
- diagnoseSkill
- django-patternsSkill
- docker-patternsSkill
- dotnet-backend-patternsSkill
- dreamSkill
- drizzle-orm-expertSkill
- estimateSkill
- event-sourcing-architectSkill
- fastapi-proSkill
- fork-joinSkill
- freezeSkill
- frontend-designSkill
- frontend-patternsSkill
- frontend-ui-dark-tsSkill
- gate-checkSkill
- gemini-api-integrationSkill
- gitlab-ci-patternsSkill
- guardSkill
- handoffSkill
- hotfixSkill
- hybrid-cloud-architectSkill
- kubernetes-architectSkill
- laravel-patternsSkill
- launch-checklistSkill
- learnerSkill
- llm-app-patternsSkill
- localizeSkill
- map-systemsSkill
- map-workflowSkill
- markdown-injection-scannerSkill
- microservices-patternsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. 9 are common, 1 is distinctive, and 0 are very specific to this project.
9
Common
Most of the 7 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 70
Document user fantasy / feel
- Common: line 97
Before drafting, show what you discovered:
- Common: line 121
Wait for user to clarify intent before drafting.
- Common: line 135
Document why it exists (intent clarified with user)
- Distinctive: line 160
Wait for approval. User may request changes before writing.
- Common: line 164
When approved, write the file with special markers:
- Common: line 184
After writing, suggest next steps:
- Common: line 257
Analyze First: Read code, understand implementation
- Common: line 258
Question Intent: Ask about "why", not just "what"
- Common: line 261
Draft Document: Create doc based on reality + intent
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
1. Parse Arguments
Format: /reverse-document <type> <path>
Type options:
design→ Generate a product design document (PRD section)architecture→ Generate an Architecture Decision Record (ADR)concept→ Generate a concept document from prototype
Path: Directory or file to analyze
src/api/auth/→ All combat-related codesrc/core/event-system.cpp→ Specific fileprototypes/stealth-mech/→ Prototype directory
Examples:
/reverse-document design src/api/payment
/reverse-document architecture src/core/entity-component
/reverse-document concept prototypes/vehicle-combat2. Analyze Implementation
Read and understand the code/prototype:
For design docs (PRD):
- Identify mechanics, rules, formulas
- Extract business logic 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 business patterns
- Note what worked vs what didn't
- Find technical feasibility insights
- Document user fantasy / feel
3. Ask Clarifying Questions (Collaborative Protocol)
DO NOT just describe the code. ASK about intent:
Design questions:
- "I see a stamina system that depletes during combat. Was this for:
- Pacing (prevent spam)?
- Resource management (strategic depth)?
- Or something else?"
- "The stagger mechanic seems central. Is this a core pillar, or supporting feature?"
- "Damage scales exponentially with level. Intentional power fantasy, 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?"
- "Users seem to exploit the grappling hook for speed. Feature or bug?"
4. Present Findings
Before drafting, show what you discovered:
I've analyzed src/api/auth/. Here's what I found:
MECHANICS IMPLEMENTED:
- 3-hit combo system with timing windows
- Guard-break mechanic (heavy attack vs blocking enemy)
- Stamina system (depletes on attack/dodge, regens when idle)
- Stagger system (builds up, triggers vulnerable state)
FORMULAS DISCOVERED:
- Damage = Base * (1 + StrengthScaling * Level)
- Stagger buildup = AttackStaggerValue / (Enemy.Poise * 0.5)
- Stamina cost = BaseStaminaCost * (1 - EfficiencyBonus)
UNCLEAR INTENT AREAS:
1. Stamina system — pacing or resource management?
2. Stagger — core pillar or supporting feature?
3. Damage scaling — power fantasy or needs tuning?
Before I draft the design doc, could you clarify these points?Wait for user to clarify intent before drafting.
5. Draft Document Using Template
Based on type, use appropriate template:
| Type | Template | Output Path |
design | templates/design-doc-from-implementation.md | design/docs/[system-name].md |
architecture | templates/architecture-doc-from-code.md | docs/architecture/[decision-name].md |
concept | templates/concept-doc-from-prototype.md | prototypes/[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)
6. Show Draft and Request Approval
Collaborative protocol:
I've drafted the combat system design doc based on your code and clarifications.
[Show key sections: Overview, Mechanics, Formulas, Design Intent]
ADDITIONS I MADE:
- Documented stamina as "pacing mechanic" per your clarification
- Added edge cases not in code (what if stamina hits 0 mid-combo?)
- Flagged balance concern: exponential damage scaling at high levels
SECTIONS MARKED AS INCOMPLETE:
- "Enemy AI interaction with stagger" (not fully implemented yet)
- "Weapon variety and scaling" (only sword implemented so far)
May I write this to design/docs/combat-system.md?Wait for approval. User may request changes before writing.
7. Write Document with Metadata
When approved, write the file with special markers:
---
status: reverse-documented
date: 2026-02-13
verified-by: [User name]
---
# Combat System 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...]8. Flag Follow-Up Work
After writing, suggest next steps:
✅ Written to design/docs/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/api/* | design-doc-from-implementation.md | Business mechanics → PRD |
src/core/*, src/ai/* | architecture-doc-from-code.md | Core systems → ADR |
prototypes/* | concept-doc-from-prototype.md | Experiments → concept doc |
src/networking/* | architecture-doc-from-code.md | Technical systems → ADR |
src/ui/* | design-doc-from-implementation.md | UI/UX → design spec |
Example Session: Reverse-Document Combat Code
User: /reverse-document design src/api/auth
Agent: I'll analyze your combat implementation to create a design doc.
[Reads code, discovers mechanics, formulas]
Agent: I've analyzed src/api/auth/. Here's what I found:
[Shows mechanics, formulas, unclear areas]
Before drafting, could you clarify:
1. Stamina system intent?
2. Is stagger a core pillar?
3. Damage scaling — intentional or needs tuning?
User: 1. Stamina is for pacing, prevent button mashing
2. Stagger is core — I want deliberate combat
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/docs/combat-system.md?
User: Yes, write it.
Agent: ✅ Written to design/docs/combat-system.md
✅ Marked as [REVERSE-DOCUMENTED]
✅ Flagged damage scaling for rebalancing
Next steps:
- Update damage formula to linear scaling
- Run /balance-check to validate progression curve
- Document stagger as core pillar in product-pillars.mdCollaborative Protocol
This skill follows the collaborative design principle:
- Analyze First: Read code, understand implementation
- Question Intent: Ask about "why", not just "what"
- Present Findings: Show discoveries, highlight unclear areas
- User Clarifies: Separate intent from accidents
- Draft Document: Create doc based on reality + intent
- Show Draft: Display key sections, explain additions
- Get Approval: "May I write to [filepath]?"
- Flag Follow-Up: Suggest related work, don't auto-execute
Never assume intent. Always ask before documenting "why".
Protocol
- Question: Analyzes code, then asks about design intent — never assumes "why" from "what"
- Options: Type drives template —
design→ PRD,architecture→ ADR,concept→ concept doc - Decision: User clarifies intent for all unclear areas before the draft is written
- Draft: Draft shown with additions and uncertainty flags before saving
- Approval: "May I write to
design/docs/[system].md?" (or architecture/concept path)
Output
Deliver exactly:
- Document type —
design,architecture, orconcept(based on argument) - Generated document saved to
design/specs/[name].mdordocs/technical/[name].md - Uncertainty flags — sections where intent was inferred rather than confirmed (user must verify)
- Follow-up suggestions — related docs that are also missing
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

