One-click install
npx skills add https://github.com/goplus/builder --skill spx-project
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spx-project
Source: https://github.com/goplus/builder/tree/main/spx-gui/src/utils/spx/skills/spx-project
Command: npx skills add https://github.com/goplus/builder --skill spx-project

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you avoid broken or confusing spx project code by providing a clear, reliable structure for stage and sprite implementation that matches spx engine expectations.

Core Features & Use Cases

  • Project code organization: Ensures variable declarations, functions, and event handlers are ordered correctly so your spx code compiles and behaves as intended.
  • Stage vs. Sprite architecture: Guides you to treat the stage (Game in spx) as shared “world” logic and sprites as independent worker objects with proper field/method scoping.
  • Interaction and API best practices: Promotes maintainable communication via broadcast/onMsg and encourages using higher-level movement and control APIs.

Quick Start

Tell the AI: "Review my spx project structure and rewrite my stage and sprite code so declarations come first, functions come before event handlers, and cross-sprite interactions use broadcast/onMsg correctly."

Frequently Asked Questions about spx-project

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

FAQPage Schema
How do I organize my spx game project structure so the code compiles correctly?

To structure your spx game project correctly, place variable declarations first, followed by functions, and then event handlers in your main.spx and sprite files. This specific ordering ensures your code compiles and behaves predictably.

What is the best way to handle communication between sprites in spx?

The best way to handle inter-sprite communication in spx is using the broadcast and onMsg mechanisms. This decoupled approach treats sprites as independent worker objects, ensuring reliable cross-sprite interactions without tight dependencies.

How should I separate stage and sprite logic when building an spx game?

You should separate stage and sprite logic by treating the stage (Game) as shared world logic and sprites as independent worker objects. This architecture uses proper field and method scoping to maintain a clean project structure.

Why does my spx code break when I declare event handlers before functions?

Your spx code breaks because the engine enforces strict ordering requirements where variable declarations come first, functions follow, and event handlers go last. Reordering your code structure resolves these compilation failures.

Can I use higher-level movement APIs for physics in spx STEM games?

Yes, you can and should use higher-level movement and control APIs in spx STEM games. The system provides specific technical constraints for physics API usage to ensure your game functions reliably.