/cs2-modding:cs2-modding-setupfrom cs2-modding
Provisions and maintains a Cities: Skylines II modding environment: game decompile, developer launch options, debug patch, mod corpus, and readable UI bundle. Handles first-time setup, refresh after game updates, and targeted fixes for debug menu or UI port issues.
Ships in cs2-modding. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Five things, provisioned separately and none of them required: a decompile of the installed game, the game's developer launch options, a debug patch that lets a debugger attach to it, a mod corpus to read from, and a readable copy of the game's UI bundle, which ships as one minified line.
Take the request as it comes rather than asking the user for a keyword. No argument, or anything that reads as "set me up", runs first-time setup. A game update, a stale decompile, or "does this still match my game" is the refresh branch. "What should I read for X" consults the catalog and clones nothing unless asked. An unavailable debug menu or UI debugging port is step 3 alone — the developer launch options — with nothing else run. A UI bundle copy to create is step 5's readable-copy extra alone; one that exists but is stale is the refresh branch.
Where a command differs by platform, it is given for Windows (PowerShell) and for Linux (bash), where the game runs under Proton.
IMPORTANT: follow this skill's steps and references on anything they own — or at the very least grep them before acting on a remembered path, version or flag, because every value here is recorded or readable from the machine and the remembered one is the one that has drifted.
A trap you meet here that this skill misses goes through the cs2-modding skill's trap reports.
One file holds everything this skill provisions: ~/.cs2-modding/setup.md, which is %USERPROFILE%\.cs2-modding\setup.md on Windows.
Read it before reading any local source, here and in every other skill of this plugin.
A missing file, a missing key, or a (none) value means that source does not exist: route the user to this skill and provision it, rather than guessing a path or grepping one that is not there.
It sits in the user's home directory rather than in agent memory or in a project file for two reasons worth telling the user when you create it: only one of the two supported harnesses has persistent agent memory, and what it records belongs to the machine — one game install, one decompile, however many mod projects. State the path in plain text when you write it, because a user who does not know the file exists cannot move it or delete it.
Fixed keys, one per line, (none) for anything not provisioned:
# cs2-modding setup
Game install: C:\Program Files (x86)\Steam\steamapps\common\Cities Skylines II
Game version: 1.6.4f1
Unity version: 2022.3.71f1
Decompile root: C:\Users\<user>\Documents\cs2-decompile
Decompiled: 2026-11-10
Debug patch: applied
Launch options: set
Mod corpus root: (none)
UI bundle copy: (none)
Trap reports: on
UI bundle copy is a reformatted copy of the game's own Cities2_Data/Content/Game/UI/index.js, which ships minified to a single line and cannot be read around as it stands; step 5 makes one.
The official modding toolchain, once installed, exports the paths as environment variables: CSII_INSTALLATIONPATH (game root), CSII_MANAGEDPATH (the managed assemblies), CSII_USERDATAPATH (user data, mods, logs).
Read those first, ask the user for the game root when they are unset, and offer the platform's default install path as a suggestion to confirm rather than as an answer.
On Linux only the hand setup in linux-toolchain.md writes them, so unset variables there usually mean the toolchain was never set up: offer that before asking for paths.
The Linux defaults sit in the Steam library: the game under steamapps/common/Cities Skylines II, and the user data inside its Proton prefix, at steamapps/compatdata/949230/pfx/drive_c/users/steamuser/AppData/LocalLow/Colossal Order/Cities Skylines II.
The Unity version is the product version of Cities2.exe:
(Get-Item "$env:CSII_INSTALLATIONPATH\Cities2.exe").VersionInfo.ProductVersion
strings -el "$CSII_INSTALLATIONPATH/Cities2.exe" | grep -A1 '^ProductVersion$'
Take it from the executable and nowhere else.
The toolchain exports a CSII_UNITYVERSION too, but that is the editor version it installed for compiling mods, which drifts from the game's own — and debug patching against the drifted one breaks the game at launch. [symbol: none]
The game version is the VersionInternal string inside Game.dll; Player.log's Game version: line lags an update until the next launch:
(Select-String -Path "$env:CSII_MANAGEDPATH\Game.dll" -Pattern '\d+\.\d+\.\d+f\d+ \([0-9a-f.]+\) \[\d+\.\d+\]' -Encoding ascii).Matches.Value
grep -aoE '[0-9]+\.[0-9]+\.[0-9]+f[0-9]+ \([0-9a-f.]+\) \[[0-9]+\.[0-9]+\]' "$CSII_MANAGEDPATH/Game.dll"
Done when both versions are in hand.
The source is the user's own installed game. Nothing is downloaded, nothing copyrighted changes hands, and the artifact belongs to them.
Agree on a decompile root with the user before starting, and put it outside the game folder so a game update cannot overwrite or delete it. The output is tens of thousands of files and the run takes minutes, so confirm the location before starting rather than after.
The root is a git repository holding one commit per game version, so the diff between two of them is what an update changed. ilspycmd is pinned in it as a local tool, because another decompiler version rewrites files the game never touched and buries that diff under them.
$managed = $env:CSII_MANAGEDPATH
git init "<decompile root>"
cd "<decompile root>"
dotnet new tool-manifest
dotnet tool install ilspycmd --allow-roll-forward
dotnet ilspycmd -p -o src -r $managed (Get-ChildItem $managed -Filter *.dll).FullName
git add -A
git commit -m "<game version>"
managed="$CSII_MANAGEDPATH"
git init "<decompile root>"
cd "<decompile root>"
dotnet new tool-manifest
dotnet tool install ilspycmd --allow-roll-forward
dotnet ilspycmd -p -o src -r "$managed" "$managed"/*.dll
git add -A
git commit -m "<game version>"
-p exports each assembly as a compilable project instead of one flat file, which is what lays the tree out as src/<assembly>/<namespace>/<Type>.cs — the shape every navigation recipe in this plugin assumes.
-r points at the managed folder so cross-assembly references resolve.
Passing every assembly to one run adds a solution over them, whose projects reference one another rather than paths into the install.
--allow-roll-forward keeps the pinned version running once the .NET runtime it targets is gone.
Moving to a newer ilspycmd is a commit of its own: dotnet tool update ilspycmd, re-decompile the game version already committed, and commit that as Re-decompile with ilspycmd <version> before the next update, so the tool's changes and the game's never share one.
The game's own code is Game.dll and the Colossal.* assemblies; the rest is Unity, .NET and third-party code, worth having for reference and cheap to include in the same pass.
Done when src/Game/Game.Modding/IMod.cs exists, src/Game holds a few thousand .cs files, and the tree is committed.
Cheap, independent of everything else, and worth doing for every mod author — so raise it rather than waiting to be asked.
The flags go on the game's launch command.
On Steam that is Properties → General → Launch Options, where %command% stands for the executable and the flags follow it:
%command% --developerMode --uiDeveloperMode
| Flag | What it gives you |
|---|---|
--developerMode | The in-game debug menu, opened with TAB. Not required for anything, and the fastest way to inspect what the simulation thinks is true. |
--uiDeveloperMode | UI inspection and debugging on localhost:9444; also forces the game to keep running while unfocused. |
--burst-disable-compilation | Turns Burst compilation off. Leave it off for normal play — it slows the game down heavily — and add it when debugging a native crash, or when a debugger must step into the game's own jobified systems. |
Press hardest on --uiDeveloperMode: it is what opens the UI debugging port, which is also what the sibling coherent-gameface plugin connects to.
Done when the user confirms the flags are on their launch command; record it, since nothing readable from the game side proves it.
Write the record described above, keeping a Trap reports: off it already holds, then tell the user its path and what it is for.
Say once what Trap reports does: when an agent meets a game trap these skills miss, its closing message describes it and offers to post an issue, and Trap reports: off in the record silences that.
A user who wanted a decompile is finished at step 4. The other three are independent of it and of each other, so offer them and let the user decline:
Cities2_Data/Content/Game/UI/index.js under the install ships minified to a single line, so reading around a match needs a reformatted copy.
Copy it somewhere of the user's choosing, reformat that copy with prettier at its defaults, and record its path as UI bundle copy.
Inside the decompile root, commit it, so each later version diffs against it the way the decompile does.
index.css beside it ships the same single-line way; a session working on the game's UI reformats a copy of it next to the script's.A game update leaves the paths valid and the code behind them wrong, which is the failure mode this branch exists to catch.
Re-read the versions as in step 1 and compare them against the record:
Nothing moved → nothing is stale, so say so rather than redoing the work.
A moved game version stales three things, each guarded by its own key in the record:
Decompile root is set → delete src/ so types the update removed do not survive as stale files, then re-run step 2's managed and dotnet ilspycmd lines from the root.
A root that is not a git repository yet takes step 2's setup before that deletion, installing the version ilspycmd --version reports, and commits the tree it already holds under the recorded game version.
Its first version commit still rewrites every project file, since the old per-assembly runs pointed each one into the install.Debug patch reads applied → check it and re-apply what the update undid, as debug-patching.md says.UI bundle copy is set → remake it from the updated index.js as in step 5.
The frontend is rebuilt every patch, so a stale copy is worse than none: its module paths all still look plausible.With Decompile root set, commit its tree last, with the new game version as the message, so a UI bundle copy kept inside it lands in the same commit.
A key that is absent or (none) means the user never provisioned that one, so leave it alone rather than offering to repair something they declined.
Update the record either way, including when nothing changed, so the next session knows the check happened.
Answer from mod-catalog.md, which carries the entries, how to match a question against them, and when a corpus is worth cloning.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub citiesskylinesmodding/agents-plugins --plugin cs2-modding4 skills in this plugin
/cs2-moddingHow Cities: Skylines II is built and how a mod changes it. Use when writing or debugging CS2 mod code, when deciding how to change something the game simulates, when locating the systems, components or prefab data behind a game mechanic, when restarting the game after a build or running in-game tests, or when a mod runs at the wrong moment, breaks another mod, or does not survive a save./cs2-modding-uiThe Cities: Skylines II mod UI discipline: the C#-to-JavaScript binding layer and the game's React frontend. Use when a mod needs a panel, button or overlay in the game's UI, when exposing C# state to the frontend or invoking C# from it, when injecting into the game's own component tree, when a UI mod's bundle does not load or its styles do not apply, or when checking what the game's frontend already provides./cs2-mod-projectThe official Cities: Skylines II modding toolchain. Use when the user wants to start a CS2 mod project, when the toolchain needs setting up on Linux, when a mod build or its post-processing fails, when a mod they just built does not appear in the game, or when they are publishing or updating one.