mcpField
S
se-dev-mod

se-dev-mod

github.com/cometworksDevelopment10128 installsUpdated 5d ago
Repository

About se-dev-mod

A skill for developing mods for Space Engineers version 1. It helps developers prepare a local setup, run shell commands, and search installed mod code for examples.

Key features

  1. 01Prepare the mod development environment
  2. 02Run commands through bash
  3. 03Search mod source code
  4. 04Index mod code

Use cases

  1. 01Set up a local mod development environment
  2. 02Find examples of class or method usage
  3. 03Inspect code in installed mods

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/cometworks/skills --skill se-dev-mod

After installing, type/se-dev-modin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

.python-version
Clean.bat
clean.sh
CommandExecution.md
CommandExecutionDetails.md
common-posix.sh
cs_indexer.py
hierarchy_tree.py
index_mods.py
list_mods.py
mod_paths.py
ModApiWhitelist.txt
ModTemplate.md
Prepare.bat
Prepare.md
prepare.sh
pyproject.toml
search_mods.py
summarize_whitelist.py
Troubleshooting.md
UtilityScripts.md
uv.lock
actions/
bash.md
prepare.md
search.md

Details

From the project README

SE Dev Mod Skill

Mod development for Space Engineers version 1.

⚠️ CRITICAL: Commands run in a UNIX shell. Use bash syntax. On Windows this is BusyBox; on Linux use the native shell.

Examples:

  • ✅ test -f file.txt && echo exists
  • ✅ ls -la | head -10
  • ❌ if exist file.txt (echo exists) - This will NOT work

Actions:

  • prepare: Run one-time preparation (Prepare.bat on Windows, prepare.sh on Linux)
  • bash: Run UNIX shell commands via busybox
  • search: Search mod code using search_mods.py

Routing Decision

Check these patterns in order - first match wins:

PriorityPatternExampleRoute
1Empty or bare invocationse-dev-modShow this help
2Prepare keywordsse-dev-mod prepare, se-dev-mod setup, se-dev-mod initprepare
3Bash/shell keywordsse-dev-mod bash, se-dev-mod grep, se-dev-mod catbash
4Search keywordsse-dev-mod search, se-dev-mod find class, se-dev-mod lookupsearch

Getting Started

⚠️ CRITICAL: Before running ANY commands, read CommandExecution.md to avoid common mistakes that cause command failures.

If Prepare.DONE file is missing in this folder, you MUST run one-time preparation steps first. See prepare action.

Essential Documentation

  • CommandExecution.md - ⚠️ READ THIS FIRST - Windows command execution details; on Linux keep bash syntax and use prepare.sh

Mod Development

Use only names matching Mod API whitelist: ModApiWhitelist.txt Whitelist exported from game version 1.208.015 using MDK2's Mdk.Extractor.

Mods released on Steam Workshop or Mod.IO, mostly the former. Game compiles mods on world loading with Mod API whitelist enforced, supposed to guarantee safety and security. Mods may still crash game with an exception.

Use se-dev-game-code to read the exact code you call. If the se-dev-game-book handbook is installed, read it first to learn how a game system works and which types take part; without it, search the game code for that too. Server-side mod logic uses se-dev-server-code and se-dev-server-book the same way. Stick to game code searches corresponding to names on Mod API whitelist for efficiency.

Graphify Graph

Preparation builds a separate Graphify graph for the local mod folder (or SE_DEV_MOD_PROJECT_ROOT). With the fast Rust clustering backend (Python 3.12 via uv, provisioned automatically) prepare builds it automatically; this corpus is small 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.

Folder Structure

  • Data/ — junction/symlink to per-user persistent mod data folder (%USERPROFILE%\.se-dev\mod on Windows, ~/.se-dev/mod on Linux). Persistent skill data lives here:
    • Data/mods.json — quick inventory of all installed mods (workshop_id, path, has_scripts, ...).
    • Data/mod_hashes.json — per-mod aggregate sha1 used by indexer for change detection.
    • Data/CodeIndex/ — full Tree-sitter C# index (one CSV per category, plus hierarchy trees).
  • LocalMods/ — junction/symlink to game's local-mod folder (%AppData%\SpaceEngineers\Mods on Windows, Proton appdata equivalent on Linux).
  • Steam Workshop content read in-place from Steam folder; not copied or symlinked into skill. Workshop folder resolved from SE_GAME_ROOT (env var) or Steam registry entry for app id 244850.

References

Mod Code Search

Search source code of Steam and local mods for examples and patterns:

# Search for patterns
uv run search_mods.py class declaration MyBlock
uv run search_mods.py method usage Update
uv run search_mods.py class children MyGameLogicComponent

# Count results before viewing (useful for large result sets)
uv run search_mods.py class usage Init --count

# Limit number of results
uv run search_mods.py class usage Init --limit 10

Before searching, ensure index exists. If Data/CodeIndex/ missing, run:

uv run list_mods.py     # quick inventory (always cheap)
uv run index_mods.py    # full code index (incremental: only changed mods reparsed)

Re-indexing after new subscriptions: When you subscribe to new mods on Steam Workshop, load them in a world once (so game downloads them), then re-run the two commands above (or just Prepare.bat). Indexer hashes each mod's .cs files and only reparses mods whose hash changed since previous run, so reruns are fast.

See search action for complete documentation.

Action References

Follow detailed instructions in:

Remarks

Original source of this skill: https://github.com/CometWorks/skills

Comments

Markdown supported