se-dev-script
In-game (programmable block, aka PB) script development for Space Engineers version 1. Search script code for examples and patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
In-game (programmable block, aka PB) script development for Space Engineers version 1. Search script code for examples and patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Allows reading the decompiled C# code of Space Engineers version 1
Mod development for Space Engineers version 1. Search mod code for examples and patterns.
Plugin development for Space Engineers version 1. Search plugin code from PluginHub (client) and MagnetarHub (server) for examples and patterns.
Allows reading the decompiled C# code of the Space Engineers Dedicated Server
Torch plugin development for Space Engineers version 1. Search TorchAPI/Torch source code, plugin API, managers, commands, and server UI patterns.
High level overview of Space Engineers (version 1) related development. Start here to understand the ecosystem (game client, dedicated server, Pulsar, Magnetar, Torch, PluginHub, MagnetarHub, Quasar) and to route to the right se-dev-* skill for in-game scripts, mods, plugins, the Magnetar PluginSdk, and decompiled code/handbook reference.
| name | se-dev-script |
| description | In-game (programmable block, aka PB) script development for Space Engineers version 1. Search script code for examples and patterns. |
| license | MIT |
| allowed-tools | Read, Bash(*Prepare.bat*), Bash(*prepare.sh*), Bash(*Clean.bat*), Bash(*clean.sh*), Bash(*uv run search_scripts.py *), Bash(*uv run list_scripts.py*), Bash(*uv run index_scripts.py*), Bash(command -v graphify*), Bash(graphify*), Bash(*busybox* grep *), Bash(*busybox* find *), Bash(*busybox* cat *), Bash(*busybox* head *), Bash(*busybox* tail *), Bash(*busybox* ls*), Bash(*busybox* wc *), Bash(*busybox* sort *), Bash(*busybox* uniq *), Bash(*busybox* tree*) |
In-game (programmable block, aka PB) script development for Space Engineers version 1.
⚠️ CRITICAL: Commands run in UNIX shell. Use bash syntax. On Windows this is BusyBox; on Linux use native shell.
Examples:
test -f file.txt && echo existsls -la | head -10if exist file.txt (echo exists) - Will NOT workActions:
Prepare.bat on Windows, prepare.sh on Linux)search_scripts.pyCheck these patterns in order - first match wins:
| Priority | Pattern | Example | Route |
|---|---|---|---|
| 1 | Empty or bare invocation | se-dev-script | Show this help |
| 2 | Prepare keywords | se-dev-script prepare, se-dev-script setup, se-dev-script init | prepare |
| 3 | Bash/shell keywords | se-dev-script bash, se-dev-script grep, se-dev-script cat | bash |
| 4 | Search keywords | se-dev-script search, se-dev-script find class, se-dev-script lookup | search |
⚠️ CRITICAL: Before running ANY commands, read CommandExecution.md to avoid common mistakes that cause command failures.
If Prepare.DONE file missing in this folder, you MUST run one-time preparation steps first. See the prepare action.
prepare.shUse only names matching the PB API whitelist: PBApiWhitelist.txt
Whitelist was exported from game version 1.208.015 using MDK2's Mdk.Extractor.
In-game (PB) scripts released on Steam Workshop or Mod.IO, mostly on former. In-game scripts compiled by game on loading into PB or world loading (if PB has script loaded) with PB Script API whitelist enforced, which guarantees safety and security. Scripts cannot crash game, since any exception caught and script killed by game. Scripts can still lag game if no specific resource usage enforcement set up by player or server admin.
Script's source code size limited to 100,000 bytes when player loads it. ScriptDev plugin can load more from local file into offline (local) games for testing, so scripts can be tested without source code compression, useful to get fully detailed exception tracebacks.
Use the se-dev-game-code skill to search game's decompiled code. You may need this to
understand how game's internals work and how to script it properly. Stick to game code
searches corresponding to names on PB API whitelist for efficiency.
Preparation builds a separate Graphify graph for the local PB script folder (or
SE_DEV_SCRIPT_PROJECT_ROOT). With the fast Rust clustering backend (Python 3.12 via uv,
provisioned automatically) prepare builds it automatically; this corpus is tiny so it is
quick either way. Where the fast backend is unavailable it stays opt-in with
SE_DEV_GRAPHIFY=1; SE_DEV_GRAPHIFY=0 disables it. Read on demand — skip for normal
search work: build via GraphifyPrepare.md, query via
GraphifyUsage.md.
Data/ — junction/symlink to per-user persistent script data folder (%USERPROFILE%\.se-dev\script on Windows, ~/.se-dev/script on Linux). Persistent skill data lives here:
Data/scripts.json — quick inventory of all installed PB scripts.Data/script_hashes.json — per-script aggregate sha1 used by indexer for change detection.Data/CodeIndex/ — full Tree-sitter C# index (one CSV per category, plus hierarchy trees).LocalScripts/ — junction/symlink to game's local-script folder (%AppData%\SpaceEngineers\IngameScripts\local on Windows, Proton appdata equivalent on Linux),
game's local-PB-script folder.Script.cs file
inside each numeric workshop folder. Workshop folder resolved from SE_GAME_ROOT
(env var) or Steam registry entry for app id 244850.Search source code of Steam and local PB scripts for examples and patterns:
# Search for patterns
uv run search_scripts.py class declaration Program
uv run search_scripts.py method usage Main
uv run search_scripts.py class children MyGridProgram
# Count results before viewing (useful for large result sets)
uv run search_scripts.py class usage Program --count
# Limit number of results
uv run search_scripts.py class usage GridTerminalSystem --limit 30
Before searching, ensure index exists. If Data/CodeIndex/ missing, run:
uv run list_scripts.py # quick inventory (always cheap)
uv run index_scripts.py # full code index (incremental: only changed scripts reparsed)
Re-indexing after new subscriptions: When you subscribe to new scripts on Steam Workshop,
load them in world once (so game downloads them), then re-run the two commands above
(or Prepare.bat). Indexer hashes each script's .cs files and only reparses
scripts whose hash changed since previous run, so reruns are fast.
See search action for complete documentation.
Follow the detailed instructions in:
Original source of this skill: https://github.com/CometWorks/skills