galaxy-code-organization

Organize Galaxy script projects into modular structures with defined include order.

7|1|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/KimPlaybit/Starcraft-2-Editor-Skills --skill galaxy-code-organization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: galaxy-code-organization
Source: https://github.com/KimPlaybit/Starcraft-2-Editor-Skills/tree/main/.agents/skills/galaxy-code-organization
Command: npx skills add https://github.com/KimPlaybit/Starcraft-2-Editor-Skills --skill galaxy-code-organization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps teams manage large Galaxy scripting projects by enforcing a clean modular structure, defined include order, and safe boilerplate headers.

Core Features & Use Cases

  • Modular file layout and clear boundaries between core logic, headers, and generated bootstrap code.
  • Defined MapScript.galaxy bootstrap chain and forward declarations to reduce cross-file dependencies.
  • Guidance on auto-generated files (MapScript.galaxy, LibHASH.galaxy, LibHASH_h.galaxy) and how to treat them.
  • Per-file includes and organized UI/data editing modules to enable scalable collaboration.
  • Use Case: For large SC2 maps, segment code into focused modules (UI, data, triggers) with predictable build order.

Quick Start

Organize your Galaxy project by placing shared utilities, headers, and per-module scripts under a clear include order, then rely on MapScript.galaxy to bootstrap and initialize.

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 a large Galaxy script project for SC2 maps?

Organize large Galaxy script projects by separating concerns into focused modules like UI, data editing, and core logic. Use per-file includes and a defined include order to maintain a modular, scalable structure across your SC2 map scripts.

What is the recommended include order for MapScript.galaxy?

The recommended include order for MapScript.galaxy bootstraps initialization through a defined chain. It uses forward declarations and safe boilerplate headers to reduce cross-file dependencies and manage auto-generated files like LibHASH.galaxy.

How do you handle auto-generated files in Galaxy scripting?

Handle auto-generated Galaxy files like MapScript.galaxy, LibHASH.galaxy, and LibHASH_h.galaxy by treating them as defined boundaries. Rely on them for bootstrap and header declarations while keeping your custom logic in separate per-file includes.

Can I use modular code organization for team collaboration on SC2 maps?

Yes, modular code organization supports scalable collaboration on SC2 maps. By segmenting code into organized UI, data, and trigger modules with predictable build order, teams can work on separate concerns without cross-file conflicts.

Why does my Galaxy script have cross-file dependency issues?

Cross-file dependency issues in Galaxy scripts often arise from unclear include orders. Establishing forward declarations and a modular file layout with safe boilerplate headers reduces these conflicts by defining strict boundaries between core logic and headers.

When do I need modular file layout for StarCraft 2 map scripts?

You need a modular file layout for StarCraft 2 map scripts when your project grows large enough that managing core logic, UI, and data editing in a single file becomes unmaintainable. It enables predictable build order and scalable development.