Chuyển đến nội dung
Skillpedia
Tài liệu kỹ thuật33k · #8476

reverse-document

Skill này làm gì

Skill này đọc code game hoặc nguyên mẫu hiện có và viết tài liệu thiết kế hoặc kỹ thuật chưa từng được viết. Skill dành cho nhóm đã xây dựng tính năng mà không có tài liệu, hoặc nhận một dự án không có tài liệu nào.

Khi nào nên dùng

  • ✓Khi một tính năng được xây dựng mà không có tài liệu thiết kế và nhóm cần nó ngay bây giờ.
  • ✓Khi nhóm nhận một codebase không có tài liệu và cần hiểu nó.
  • ✓Khi một cơ chế nguyên mẫu cần được chính thức hóa thành thiết kế bằng văn bản.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/reverse-document/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy viết tài liệu thiết kế cho code chiến đấu trong src/gameplay/combat, dựa trên những gì nó thực sự làm.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill nhận loại tài liệu và đường dẫn đến code, đọc phần triển khai, rồi viết tài liệu tương ứng: một phần thiết kế, một bản ghi quyết định kiến trúc hoặc một ghi chú khái niệm. Skill hỏi xác nhận trước khi lưu.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

Câu hỏi thường gặp

Skill có thể viết những loại tài liệu nào?

Nó có thể viết một phần thiết kế, một bản ghi quyết định kiến trúc, hoặc một tài liệu khái niệm từ nguyên mẫu.

Skill có ghi lại lý do đằng sau code không?

Nó ghi lại code làm gì. Lý do được suy ra từ phần triển khai, nên bạn cần rà soát lại.

Skill có ghi tệp mà không hỏi không?

Không. Việc ghi tuân theo cài đặt tự động hóa của dự án, có thể yêu cầu bạn phê duyệt.

Chi tiết

Mô tả gốc của tác giả

Generate missing design or architecture docs from existing implementation — works backwards from code and prototypes.

repo: Donchitos/Claude-Code-Game-Studios

Độ phổ biến

Sao GitHub
33k
Vị trí xếp hạng
#8476
Giấy phép
MIT
Cập nhật
18/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự