/cs2-modding:cs2-moddingfrom cs2-modding
Provides guidance for modding Cities: Skylines II, covering ECS architecture, prefab data, and common pitfalls when writing or debugging mod code.
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.
None: SKILL.md is the whole skill.
A mod is a .NET assembly the game loads through Game.Modding.IMod.
City state lives in ECS components that systems change in phases the game schedules itself, and most content is prefab data.
This skill holds a working loop and the traps an agent meets with the decompile open; look everything else up in the decompile each time.
A trap is a game fact an agent holding the decompile and the live game still gets wrong by default. A wrong move you made this session is a trap candidate when it passes two tests:
A fault in the user's own code is not a candidate. Before keeping one, confirm the game's real behaviour in the decompile or the running game, and check that no skill of this plugin already states it. A stated trap the game proves wrong is a candidate too.
Say nothing of candidates until the user's task is done.
Then hold a high bar on every candidate, most sessions ending with none: keep a stated trap you proved wrong only where following it as written sends an agent wrong, and of the rest only those that cost you several turns between the wrong move and its cause; drop one the next build, log or check caught, and any you doubt.
For the ones kept, unless the setup record reads Trap reports: off, end the closing message with this report, one bullet per trap:
I hit {one trap / N traps} this plugin's skills miss or misstate: {what they touch, in one clause}.
- {The wrong default, then the right move, in one short sentence.}
{With `gh` installed:} Want me to report {it / them} on the plugin's tracker?
{Without `gh`:} Want the issue text, one per trap, to post yourself? With `gh` installed I can post for you next time.
To stop these reports, ask me to turn them off.
Ask once per report, and post only on a yes, each trap on its own: search the open and closed issues of CitiesSkylinesModding/agents-plugins for it, and where an open one covers it, add a 👍 reaction and comment your story and game version there; where a closed one does, unless it is the issue that admitted a trap you proved wrong, post nothing and tell the user it was already judged; otherwise open an issue for that trap alone.
An issue gives the trap's wrong default, its right move, the fully qualified type whose code carries it where one does, the game version, and your story: the kind of task and the turns it cost.
Issue and comment hold nothing of the user's project: no mod name, no code, no paths.
Asked to turn reports off, write Trap reports: off into the setup record.
cs2-dev tools, as the game cycle below says.unity-devtools plugin and the debug patch cs2-modding-setup applies, which SceneFlow.log's Game configuration: Development (Mono) confirms; where either is missing, say what you did not verify.src/<Assembly>/<Namespace>/<Type>.cs with a few files one level up, so search src/**; SystemOrder.cs holds every phase registration the game makes.cs2-modding-setup keeps says where the decompile, the mod corpus and the UI bundle copy live; where one is absent or (none), route the user to that skill rather than guess a path.CSII_* environment variables locate the install; a missing one is the signal to ask.[CompilerGenerated] sits on many hand-written game classes: never skip a file for it. [symbol: none]The cs2-dev tools own it:
stop before a C# build: only a relaunch loads a build, and on Windows a build beside a running game fails to replace a Burst mod's files and leaves no managed DLL deployed.restart with mod set, and save or newCity to reach a city.pdx_mods means the subscribed copy loaded instead of your build. [symbol: Colossal.IO.AssetDatabase.ExecutableAsset]restart: a Steam started from your shell inherits its environment, tokens included, and the game's error reports upload it.restart's save: GameManager.instance.Load from the eval stalls the game.restart and test keep only the last ended run, in <user data>/.cs2-dev/previous-run/; copy it aside before the next call while it still matters.CameraController.inputEnabled is read by nothing: hold the camera still with InputManager.instance.CreateMapBarrier("Camera", …). [symbol: Game.CameraController]Success for a scenario that reached no test or is disabled: check that each test ran. [symbol: Colossal.TestFramework.TestScenario]IMod itself; with the interface only on a nested class or inherited from another assembly, the assembly is skipped and nothing logs it. [symbol: Colossal.IO.AssetDatabase.ExecutableAsset]OnLoad. [symbol: Game.Modding.ModManager]OnDispose also runs after a failed load, on that unconstructed object: a teardown touching an unset field throws there and stops every mod loading after it. [symbol: Game.Modding.ModManager]OnLoad runs in one pass, so a mod later in it is not loaded yet: register a system naming another mod's types after the pass, from MainThreadDispatcher.RegisterUpdater. [symbol: Game.Modding.ModManager]ParadoxModsDataSource.onAfterActivePlaysetOrModStatusChanged. [symbol: Colossal.IO.AssetDatabase.ParadoxModsDataSource][UpdateAfter] among them, compile and do nothing: order a system through the UpdateSystem that OnLoad receives. [symbol: Game.UpdateSystem]UpdateBefore<T, TOther> and UpdateAfter<T, TOther> run T only in a phase that registers TOther; anchored in any other, T never runs and nothing logs it. [symbol: Game.UpdateSystem]Created and Updated and destroys Deleted entities, so a GameSimulation system never sees them: react in the Modification* phase the vanilla system for that entity uses. [symbol: Game.Common.SystemOrder]GetUpdateInterval throttles only in the phases SimulationSystem updates with a frame index; anywhere else, PostSimulation included, the system runs every frame. [symbol: Game.Simulation.SimulationSystem]GameSystemBase subclass whose OnCreate skips base.OnCreate() never gets OnGameLoaded or the other load hooks. [symbol: Game.GameSystemBase]BatchesUpdated on the entity, or the renderer keeps drawing the old one. [symbol: Game.Rendering.PreCullingSystem]Temp, the tool's preview, and Deleted, entities in their last frame, as vanilla queries do. [symbol: Game.Tools.Temp] [symbol: Game.Common.Deleted]Deleted; DestroyEntity is for entities nothing else can hold. [symbol: Game.Common.Deleted]*Data value the simulation reads often has an instance twin on the entity, and the system reads the twin: check the consuming system's lookup before editing the prefab. [symbol: none]string passed as a LocalizedString becomes a localization key: wrap literal text in LocalizedString.Value. [symbol: Game.UI.Localization.LocalizedString]SetDefaults runs both for a new city and for a save written before the mod existed: tell them apart by context.purpose. [symbol: Colossal.Serialization.Entities.EntityDeserializer]cs2-dev logs tool, or else Logs/Modding.log and Logs/SceneFlow.log under the user data path, and Player.log at its root, which carries every logger's Warn and above.Player.log, and a Logs/ file only on its logger's first write; a crash's candidate line is its cause only if it is rare in that log, so count it. [symbol: Colossal.Logging.UnityLogger]Modding.log, Loaded <assembly> in <n>ms is written from a finally and proves nothing; Error initializing mod with a stack is a throw anywhere in the mod's load, OnLoad and its systems' OnCreate included, and ends the mod's load there. [symbol: Game.Modding.ModManager]SceneFlow.log, not the mod's log, and Error on state change, disabling system leaves the system running. [symbol: Game.GameSystemBase]showsErrorsInUI is true, so a mod's first Error pops a modal dialog and pauses the game: chain SetShowsErrorsInUI(false) on a logger whose errors the player need not see. [symbol: Colossal.Logging.UnityLogger]--logsEffectiveness value turns every log off: pass a level name Level declares. [symbol: Colossal.Logging.Level][DebugWatchValue] works only on an instance member of a system the world holds; on a static class or the mod class it shows nothing. [symbol: Game.Debug.DebugWatchSystem]The UI a mod ships is cs2-modding-ui; the project, its build and publishing are cs2-mod-project; provisioning every local source above is cs2-modding-setup.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub citiesskylinesmodding/agents-plugins --plugin cs2-moddingOther plugins' skills for the same job
4 skills in this plugin
/cs2-modding-setupProvisions and maintains the local ground truth for Cities: Skylines II mod development. Use when the user asks to be set up for CS2 modding, when the decompile or the readable copy of the game UI bundle needs creating or updating, when they ask which mods are worth reading for a problem, when the in-game debug menu or the UI debugging port turns out to be unavailable, or when another skill finds no local source recorded./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.