Agent skill

Manage World Lifecycle

by lge-ros2 in lge-ros2/cloisim

Understand and extend the CLOiSim world load → plugin start → reset → save lifecycle.

MITAuto-check passedDevelopment

Install Manage World Lifecycle

skills CLI
$ npx skills add lge-ros2/cloisim --skill manage-world-lifecycle -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lge-ros2/cloisim manage-world-lifecycle --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lge-ros2/cloisim.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/manage-world-lifecycle .claude/skills/manage-world-lifecycle && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
manage-world-lifecycle
GitHub stars
176
Token cost
~2.7k tokens
SKILL.md length
419 words
Files
1
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

Understand and extend the CLOiSim world load → plugin start → reset → save lifecycle.

  • Works in 3 steps: If it's a Helper — inherit from… → If it's a Device — override OnReset() in… → If it's a Plugin — override OnReset() in…
  • : debugging world loading failures
  • SKILL.md covers When to Use, Lifecycle Overview, Plugin Startup Coordination and Reset Cascade, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Manage World Lifecycle is an agent skill from lge-ros2/cloisim. Understand and extend the CLOiSim world load → plugin start → reset → save lifecycle. Use when: debugging world loading failures, troubleshooting plugin startup coordination, fixing reset behavior, extending the world save pipeline, diagnosing physics mode switching issues, understanding PluginStartTracker events.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. The repository describes itself as: Unity 6 based multi-robot simulator for ROS 2, SDFormat/SDF, LiDAR, camera, depth, IMU, GPS, and large-scale robotics simulation. The licence is MIT.

When your agent uses it

  • : debugging world loading failures
  • Troubleshooting plugin startup coordination
  • Fixing reset behavior
  • Extending the world save pipeline

Example prompts

  • “/manage-world-lifecycle”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. If it's a Helper — inherit from Helper.Base and override Reset()
  2. If it's a Device — override OnReset() in your Device subclass
  3. If it's a Plugin — override OnReset() in your CLOiSimPlugin subclass

What it can do on your machine

Read from SKILL.md and the folder at commit f4c1f0b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Manage World Lifecycle loads about 2.7k tokens when it runs. Until then it costs about 85 tokens; SKILL.md has 419 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~85
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from lge-ros2/cloisim at commit f4c1f0b, republished under its MIT licence (© lge-ros2). 419 words, ~2,702 tokens.

Download SKILL.mdSave it as .claude/skills/manage-world-lifecycle/SKILL.md (or your agent's skills folder).
name
manage-world-lifecycle
description
Understand and extend the CLOiSim world load → plugin start → reset → save lifecycle. Use when: debugging world loading failures, troubleshooting plugin startup coordination, fixing reset behavior, extending the world save pipeline, diagnosing physics mode switching issues, understanding PluginStartTracker events.

Manage World Lifecycle

Reference guide for the complete CLOiSim simulation lifecycle: world loading, plugin startup coordination, runtime reset, and world state persistence.

When to Use

  • Debugging why a world fails to load or hangs during plugin startup
  • Adding a new component that needs to participate in the reset cycle
  • Understanding the PluginStartTracker event system
  • Extending WorldSaver to persist new element types
  • Diagnosing physics simulation mode switching issues
  • Coordinating multi-plugin dependencies during startup

Lifecycle Overview

┌─────────────────────────────────────────────────────────┐
│ LOAD                                                     │
│   Main.LoadWorld()                                       │
│   ├─ SDF.Root.DoParse() → parse SDF XML                │
│   ├─ Physics.simulationMode = Script                    │
│   ├─ Import.Loader.Start() → create GameObjects         │
│   ├─ Wait: worldRoot.childCount > 0                     │
│   ├─ PluginStartTracker.Bind(worldRoot)                 │
│   ├─ Physics.SyncTransforms()                           │
│   ├─ Physics.simulationMode = FixedUpdate               │
│   ├─ ResetWorld() [initial reset]                       │
│   └─ Wait: AllStarted == true                           │
├─────────────────────────────────────────────────────────┤
│ RUN                                                      │
│   Normal simulation loop                                 │
│   ├─ FixedUpdate: physics                               │
│   ├─ Update: sensors, UI                                │
│   └─ Plugins: TX/RX threads running                     │
├─────────────────────────────────────────────────────────┤
│ RESET (Ctrl+R)                                           │
│   Main.ResetSimulation()                                 │
│   ├─ SensorRenderManager.Pause()                        │
│   ├─ SimulationWorld.SignalReset()                       │
│   ├─ ResetWorld()                                       │
│   │  ├─ Helper.Base.Reset() for each helper             │
│   │  ├─ Device.Reset() for each device                  │
│   │  └─ CLOiSimPlugin.Reset() for each plugin           │
│   ├─ Wait 0.1s                                          │
│   └─ SensorRenderManager.Resume()                       │
├─────────────────────────────────────────────────────────┤
│ FULL RELOAD (Ctrl+Shift+R)                               │
│   Destroys world root, reloads from SDF                  │
├─────────────────────────────────────────────────────────┤
│ SAVE (Ctrl+Shift+S)                                      │
│   WorldSaver.Update()                                    │
│   ├─ ClearAllComments()                                 │
│   ├─ UpdateGUI() → camera pose                          │
│   ├─ UpdateModels() → model poses, static flags         │
│   └─ UpdateRoads() → road spline points                 │
└─────────────────────────────────────────────────────────┘

Plugin Startup Coordination

PluginStartTracker

Monitors all CLOiSimPlugin instances under a loaded root and fires events as they start:

csharp
// Bind to a loaded world/model root
var tracker = new PluginStartTracker();
tracker.ProgressChanged += OnPluginProgressChanged;   // (started, total)
tracker.AllStartedEvent += OnAllPluginsStarted;        // fires once
tracker.Bind(worldRoot);

// ProgressChanged fires for each plugin that completes OnStart()
// AllStartedEvent fires when StartedCount == TotalCount
Plugin Startup Flow

Each CLOiSimPlugin follows this internal sequence:

Awake()
  └─ OnAwake() [abstract] — set _type, cache components

Start() [coroutine]
  └─ OnStart() [abstract] — register ports, add threads
     ├─ RegisterTxDevice() / RegisterRxDevice()
     ├─ RegisterServiceDevice() / RegisterClientDevice()
     ├─ AddThread(port, threadFunction, device)
     └─ yield return null

  └─ Raises Started event → PluginStartTracker.OnPluginStarted()
Waiting for All Plugins
csharp
// In Main.cs — world is not considered loaded until all plugins start
private void OnAllPluginsStarted()
{
	_pluginAllStarted = true;
	BridgeManager.PrintAllocatedHistory();
}

// LoadWorld() waits in a while loop:
while (!_pluginAllStarted)
	yield return null;

Reset Cascade

ResetWorld() resets components in three phases:

csharp
void ResetModel(GameObject targetObject)
{
	// Phase 1: Reset poses (Helper.Base components)
	foreach (var helper in targetObject.GetComponentsInChildren<Helper.Base>())
		helper.Reset();
	// → Restores initial pose via PoseControl
	// → Rewinds animation state

	// Phase 2: Reset devices
	foreach (var device in targetObject.GetComponentsInChildren<Device>())
		device.Reset();
	// → Clears message queues
	// → Resets synthetic timestamps

	// Phase 3: Reset plugins
	foreach (var plugin in targetObject.GetComponentsInChildren<CLOiSimPlugin>())
		plugin.Reset();
	// → Calls OnReset() [virtual]
	// → Plugin-specific state restoration
}
SimulationWorld Reset Signal

SimulationWorld sends a reset signal to the external ROS bridge:

csharp
// Triggered by Main.ResetSimulation()
SimulationWorld.SignalReset();
// → Sets _signalReset = true
// → ClientThread sends messages.Param { "reset_simulation": true }
// → External bridge receives and resets its state

World Save Pipeline

WorldSaver serializes current scene state back to the loaded SDF XML:

csharp
// UpdateModels() for each model in scene:
// 1. Remove stale <include> elements
// 2. Remove <model> elements not present in scene
// 3. For each child in WorldRoot:
//    - Get Helper.Model → original model path
//    - Create/update <include> or <model> element
//    - Set <static> from GameObject.isStatic
//    - Set <pose> via Unity2SDF.Pose(position, rotation)

// UpdateRoads() for each road:
// 1. Remove all <road> elements
// 2. Recreate from Main.RoadsRoot children
// 3. Save spline knots as <point> elements

// UpdateGUI() for camera:
// 1. Get Camera.main transform
// 2. Convert to SDF pose via Unity2SDF.Pose()
// 3. Write to <gui><camera><pose>

Physics Mode Switching

During world loading, physics must be paused to prevent objects from falling while being constructed:

csharp
// Before construction:
Physics.simulationMode = SimulationMode.Script;
// → Physics does NOT run automatically
// → Objects can be positioned without falling

// After construction:
Physics.SyncTransforms();
// → Syncs all manually-set transforms to physics engine
Physics.simulationMode = SimulationMode.FixedUpdate;
// → Normal physics simulation resumes

Procedure: Adding a New Resetable Component

To make a new component participate in the reset cycle:

  1. If it's a Helper — inherit from Helper.Base and override Reset():

    csharp
    public class MyHelper : Base
    {
        private float _initialValue;
    
        new protected void Start()
        {
            base.Start();
            _initialValue = currentValue;
        }
    
        public new void Reset()
        {
            base.Reset(); // Resets pose
            currentValue = _initialValue;
        }
    }
  2. If it's a Device — override OnReset() in your Device subclass:

    csharp
    protected override void OnReset()
    {
        // Clear accumulated state
        _accumulatedData = 0;
    }
  3. If it's a Plugin — override OnReset() in your CLOiSimPlugin subclass:

    csharp
    protected override void OnReset()
    {
        // Reset plugin-specific state
        _commandBuffer.Clear();
    }

Procedure: Extending World Save

To save a new element type in WorldSaver:

  1. Add an Update*() method:

    csharp
    private void UpdateMyElements()
    {
        // Remove stale elements
        var staleNodes = _worldNode.SelectNodes("my_element");
        foreach (XmlNode node in staleNodes)
            _worldNode.RemoveChild(node);
    
        // Add current elements from scene
        foreach (var element in FindMyElements())
        {
            var xmlNode = _doc.CreateElement("my_element");
            xmlNode.SetAttribute("name", element.Name);
    
            // Convert pose to SDF
            var sdfPose = Unity2SDF.Pose(
                element.transform.position, element.transform.rotation);
            // Write pose to XML...
    
            _worldNode.AppendChild(xmlNode);
        }
    }
  2. Call it from Update():

    csharp
    public void Update()
    {
        ClearAllComments();
        UpdateGUI();
        UpdateModels();
        UpdateRoads();
        UpdateMyElements(); // Add here
    }
Show full SKILL.md (190 more words)Show less

Critical Pitfalls

PitfallDetailsMitigation
Plugin start order is undefinedPlugins start in parallel via background threads. Do NOT assume plugin A starts before plugin B.Use AllStartedEvent to synchronize cross-plugin dependencies.
Reset called during initial loadResetWorld() runs once during LoadWorld() before plugins finish starting.Ensure OnReset() handles being called before OnStart() completes.
Stale plugin referencesPluginStartTracker.Bind() walks the scene once at load time. Dynamically added plugins are NOT tracked.Rebind if plugins are added post-load.
Transform sync timingManual transform changes during runtime are not synced to physics automatically (autoSyncTransforms is off).Call Physics.SyncTransforms() after manual teleport operations.
Physics mode must bracket constructionObjects fall during construction if physics is FixedUpdate.Set SimulationMode.Script before creating objects, restore after.
SensorRenderManager must pause during resetSensors continue rendering during reset, producing stale/corrupt data.Always Pause() before reset, Resume() after.
WorldSaver removes XML commentsClearAllComments() strips all <!-- --> from the saved file.Don't rely on XML comments surviving save cycles.

Key Events Reference

EventSourceFired WhenListeners
CLOiSimPlugin.StartedEach pluginOnStart() coroutine completesPluginStartTracker
PluginStartTracker.ProgressChanged(int, int)TrackerEach plugin startsMain → UI progress
PluginStartTracker.AllStartedEventTrackerAll plugins startedMain → finalize load

© lge-ros2, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/manage-world-lifecycle of lge-ros2/cloisim.

Open the folder on GitHubat commit f4c1f0b

Compare with similar skills

Manage World Lifecycle next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Manage World Lifecycle compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Manage World Lifecycle this skilllge-ros2/cloisim176—~2.7kAutomated safety check: PassMIT
Vercel Composition Patternssupabase/supabase111k58 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k4 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 58 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 4 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from lge-ros2/cloisim

All 18 skills in this repo
  • Add Actor Animation

    lge-ros2/cloisim

    Add or modify SDF actors with skeletal animation and waypoint-based navigation.

    176 GitHub stars~2.4k tokensUpdated 5 days ago
    Auto-check passed
  • Add Compute Shader

    lge-ros2/cloisim

    Add a new compute or surface shader for sensor data processing or visualization.

    176 GitHub stars~2.1k tokensUpdated 5 days ago
    Auto-check passed
  • Add Mesh Import

    lge-ros2/cloisim

    Import 3D mesh files into CLOiSim via the Assimp pipeline, including collision generation and procedural meshes.

    176 GitHub stars~2k tokensUpdated 5 days ago
    Auto-check passed
  • Add Motor Controller

    lge-ros2/cloisim

    Add a new motor or drive controller for robot locomotion. An agent skill from lge-ros2/cloisim.

    176 GitHub stars~1.4k tokensUpdated 5 days ago
    Auto-check passed
  • Add New Plugin

    lge-ros2/cloisim

    Add a new CLOiSimPlugin for bridging a device to the ROS 2 transport layer.

    176 GitHub stars~1.5k tokensUpdated 5 days ago
    Auto-check passed
  • Add New Sensor

    lge-ros2/cloisim

    Add a new sensor device to CLOiSim, including the Device subclass, SDF pipeline wiring, and transport plugin.

    176 GitHub stars~1.6k tokensUpdated 5 days ago
    Auto-check passed

Categories

Questions about Manage World Lifecycle

What does Manage World Lifecycle do?

Understand and extend the CLOiSim world load → plugin start → reset → save lifecycle. Manage World Lifecycle is an agent skill from lge-ros2/cloisim. Understand and extend the CLOiSim world load → plugin start → reset → save lifecycle.

When should I use Manage World Lifecycle?

Manage World Lifecycle fits situations like: : debugging world loading failures; troubleshooting plugin startup coordination; fixing reset behavior; extending the world save pipeline.

How do I install Manage World Lifecycle in Claude Code?

Run `npx skills add lge-ros2/cloisim --skill manage-world-lifecycle -a claude-code`. Or copy the skill folder (.github/skills/manage-world-lifecycle in lge-ros2/cloisim) into .claude/skills/manage-world-lifecycle in your project. Claude Code loads it when a task matches its description.

How do I install Manage World Lifecycle in Codex?

Run `npx skills add lge-ros2/cloisim --skill manage-world-lifecycle -a codex`. Or copy the skill folder (.github/skills/manage-world-lifecycle in lge-ros2/cloisim) into .agents/skills/manage-world-lifecycle in your project. Codex loads it when a task matches its description.

Can I use Manage World Lifecycle in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lge-ros2/cloisim --skill manage-world-lifecycle -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/manage-world-lifecycle, .gemini/skills/manage-world-lifecycle, .github/skills/manage-world-lifecycle and .opencode/skills/manage-world-lifecycle in your project.

What does Manage World Lifecycle need to run?

SKILL.md names no scripts, command-line tools or credentials: Manage World Lifecycle is instructions for the agent only.

Does Manage World Lifecycle access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Manage World Lifecycle safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Manage World Lifecycle use?

Manage World Lifecycle is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Manage World Lifecycle use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Manage World Lifecycle?

Skills that share tags, products or a category with Manage World Lifecycle: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 297k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Manage World Lifecycle?

lge-ros2 (a GitHub organization) maintains it in lge-ros2/cloisim, which has 176 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on October 6, 2026.

Source: lge-ros2/cloisim on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.