galaxy-code-organization

Organize Galaxy script projects with modular folder structures and include order.

3|2|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/ShadowDragonSC2/Base.SC2Data --skill galaxy-code-organization-shadowdragonsc2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: galaxy-code-organization
Source: https://github.com/ShadowDragonSC2/Base.SC2Data/tree/main/.koda/skills/galaxy-code-organization
Command: npx skills add https://github.com/ShadowDragonSC2/Base.SC2Data --skill galaxy-code-organization-shadowdragonsc2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

File structure, include order, and modular layout for Galaxy script projects. Use when splitting a monolithic script into multiple files, establishing the MapScript.galaxy bootstrap chain, organizing UI into sub-files, or setting up Enums/GlobalVariables/Header/MapInit. Covers which files are auto-generated by the editor and must never be edited (MapScript.galaxy, LibHASH.galaxy, LibHASH_h.galaxy). Do not use for language syntax questions (use galaxy-language-fundamentals).

Core Features & Use Cases

  • Clear modular file organization for Galaxy scripts using include order best practices.
  • Coordinator patterns: MapScript.galaxy bootstrap, Script/ folder layout, and header forward declarations.
  • Per-part pattern, UI sub-files, and Lib/third-party separation.
  • Clear guidance on auto-generated files to avoid edits.

Quick Start

Set up your project by following the folder layout and include order described in this guide to begin modular Galaxy scripting.

Frequently Asked Questions about galaxy-code-organization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I organize Galaxy scripts into multiple files for an SC2 map?

Organize Galaxy scripts by enforcing a modular folder structure, managing include order, and defining a clear MapScript.galaxy bootstrap to split monolithic files into distinct UI and core components.

Which SC2 Galaxy files are auto-generated by the editor and must not be edited?

Auto-generated files you must never edit include MapScript.galaxy, LibHASH.galaxy, and LibHASH_h.galaxy. Safe editing practices and clear file role documentation prevent accidental corruption of these editor-managed assets.

What is the best way to structure a MapScript.galaxy bootstrap chain for SC2 mods?

The best way to structure a MapScript.galaxy bootstrap is applying coordinator patterns that establish a Script folder layout, header forward declarations, and strict include order for reliable modular execution.

When do I need a modular folder layout for my StarCraft 2 map script?

You need a modular folder layout when splitting a monolithic script into multiple files, setting up Enums and GlobalVariables, organizing UI sub-files, or separating third-party libraries from core components.

Can I use this for StarCraft 2 Galaxy script language syntax questions?

No, this is strictly for project organization, include order, and file structure. For StarCraft 2 Galaxy script language syntax questions, you should use a dedicated galaxy-language-fundamentals resource instead.