Agent skill

Add New Sensor

by lge-ros2 in lge-ros2/cloisim

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

MITAuto-check passed

Install Add New Sensor

skills CLI
$ npx skills add lge-ros2/cloisim --skill add-new-sensor -a claude-code

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

GitHub CLI
$ gh skill install lge-ros2/cloisim add-new-sensor --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/add-new-sensor .claude/skills/add-new-sensor && 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
add-new-sensor
GitHub stars
176
Token cost
~1.6k tokens
SKILL.md length
315 words
Files
1
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 7 steps: Create the Device Class → Add Noise Support (Optional) → Add the Implement Extension Method → …
  • : adding a new sensor type
  • SKILL.md covers When to Use, Procedure and Checklist
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Add New Sensor is an agent skill from lge-ros2/cloisim. Add a new sensor device to CLOiSim, including the Device subclass, SDF pipeline wiring, and transport plugin. Use when: adding a new sensor type, implementing a new SDF sensor, creating a new device class.

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

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

  • : adding a new sensor type
  • Implementing a new SDF sensor
  • Creating a new device class

Example prompts

  • “/add-new-sensor”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Create the Device Class
  2. Add Noise Support (Optional)
  3. Add the Implement Extension Method
  4. Add the Import Case
  5. Create the Plugin
  6. Verify the SDF Package
  7. Verify SDF Plugin Resolution

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

Add New Sensor loads about 1.6k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 315 words of instructions outside code blocks.

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

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). 315 words, ~1,643 tokens.

Download SKILL.mdSave it as .claude/skills/add-new-sensor/SKILL.md (or your agent's skills folder).
name
add-new-sensor
description
Add a new sensor device to CLOiSim, including the Device subclass, SDF pipeline wiring, and transport plugin. Use when: adding a new sensor type, implementing a new SDF sensor, creating a new device class.

Add a New Sensor Device

End-to-end procedure for adding a new sensor type to CLOiSim. This requires coordinated changes across 4 layers: Device, Implement, Import, and Plugin.

When to Use

  • Adding a new SDF-defined sensor type (e.g., force/torque, magnetometer, altimeter)
  • Porting a sensor from another simulator or from ROS sensor_msgs
  • The SDFormat package already supports the sensor type, or you will add support

Procedure

1. Create the Device Class

Create Assets/Scripts/Devices/MyNewSensor.cs:

csharp
/*
 * Copyright (c) 2026 LG Electronics Inc.
 *
 * SPDX-License-Identifier: MIT
 */

using UnityEngine;
using messages = cloisim.msgs;

namespace SensorDevices
{
	public partial class MyNewSensor : Device
	{
		private messages.MyMessage _msg;

		// Per-axis noise holders (if applicable)
		private Noise _noiseX;

		protected override void OnAwake()
		{
			Mode = ModeType.TX_THREAD;
			DeviceName = name;
		}

		protected override void OnStart()
		{
			// Cache initial transforms, register with managers
		}

		protected override void OnReset()
		{
			// Restore initial state
		}

		protected override void InitializeMessages()
		{
			_msg = new messages.MyMessage();
			_msg.Stamp = new messages.Time();
			// Allocate all nested sub-messages explicitly
		}

		protected override void SetupMessages()
		{
			_msg.EntityName = DeviceName;
		}

		// For timer-polled TX_THREAD: override GenerateMessage
		protected override void GenerateMessage()
		{
			// Populate message fields from current state
			_msg.Stamp.Set(GetNextSyntheticTime());
			PushDeviceMessage<messages.MyMessage>(_msg);
		}

		// For event-driven TX_THREAD: call EnqueueMessage() from
		// async callbacks instead, and let default GenerateMessage drain the queue

		private void FixedUpdate()
		{
			// Physics-based sensing here (IMU, force/torque)
			// Apply noise: _noiseX.Apply<float>(ref value, Time.fixedDeltaTime);
		}
	}
}

Key decisions:

  • Timer-polled (IMU, GPS): override GenerateMessage() to build + push messages directly. TX thread calls it at UpdateRate.
  • Event-driven (camera, lidar): call EnqueueMessage() from async callbacks (e.g., AsyncGPUReadback). Default GenerateMessage() drains the queue.
  • Physics-based: use FixedUpdate() for transform/velocity sampling. Non-physics: use Update().
2. Add Noise Support (Optional)

If the sensor needs noise, add setup methods:

csharp
public void SetupNoise(in SDFormat.Noise noise)
{
	_noiseX = new Noise(noise);
}

// Or per-axis:
public void SetupNoises(in SDFormat.XxxSensor sensor)
{
	if (sensor.XNoise != null)
		_noiseX = new Noise(sensor.XNoise);
}

Apply noise in FixedUpdate() or GenerateMessage():

csharp
_noiseX.Apply<float>(ref value, Time.fixedDeltaTime);  // single value
_noise.Apply<double>(dataArray);                         // array (parallelized)
3. Add the Implement Extension Method

Edit Assets/Scripts/Tools/SDF/Implement/Implement.Sensor.cs — add a new static extension method:

csharp
public static Device AddMyNewSensor(this GameObject targetObject, in SDFormat.MyNewSensorType element)
{
	var newSensorObject = new GameObject();
	targetObject.AttachSensor(newSensorObject);

	var sensor = newSensorObject.AddComponent<SensorDevices.MyNewSensor>();
	sensor.DeviceName = newSensorObject.GetFrameName();

	// Configure sensor-specific parameters from SDF element
	// sensor.SomeParameter = element.SomeField;

	// Setup noise if applicable
	if (element.Noise != null)
		sensor.SetupNoise(element.Noise);

	return sensor;
}
4. Add the Import Case

Edit Assets/Scripts/Tools/SDF/Import/Import.Sensor.cs — add a case in the sensor type switch:

csharp
case "my_new_sensor":
	var myData = sensor.GetMyNewSensorData();  // or sensor.MyNewSensorData
	device = targetObject.AddMyNewSensor(myData);
	break;

The import layer automatically handles after the switch:

  • Setting UpdateRate from SDF
  • Setting EnableVisualize
  • Applying sensor pose offset
  • Tagging the GameObject as "Sensor"
5. Create the Plugin

Create Assets/Scripts/CLOiSimPlugins/MyNewSensorPlugin.cs:

csharp
/*
 * Copyright (c) 2026 LG Electronics Inc.
 *
 * SPDX-License-Identifier: MIT
 */

using System.Collections;
using UnityEngine;

public class MyNewSensorPlugin : CLOiSimPlugin
{
	private SensorDevices.MyNewSensor _sensor;

	protected override void OnAwake()
	{
		_type = ICLOiSimPlugin.Type.SENSOR;  // or a new specific type
		_sensor = gameObject.GetComponent<SensorDevices.MyNewSensor>();
	}

	protected override IEnumerator OnStart()
	{
		if (RegisterServiceDevice(out var portService, "Info"))
		{
			AddThread(portService, ServiceThread);
		}

		if (RegisterTxDevice(out var portTx, "Data"))
		{
			AddThread(portTx, SenderThread, _sensor);
		}

		yield return null;
	}

	protected override void HandleCustomRequestMessage(
		in string requestType, in Any requestValue, ref DeviceMessage response)
	{
		switch (requestType)
		{
			case "request_transform":
				var devicePose = _sensor.GetPose();
				var deviceName = _sensor.DeviceName;
				SetTransformInfoResponse(ref response, deviceName, devicePose, _parentLinkName);
				break;
			default:
				break;
		}
	}
}
6. Verify the SDF Package

Ensure the com.lge-ros2.sdformat package supports the sensor type. If not:

  1. Add the domain class to the SDFormat package
  2. Add the sensor type string mapping
  3. Update the package version
7. Verify SDF Plugin Resolution

The SDF <plugin filename="MyNewSensorPlugin"> attribute must match the C# class name exactly, since the importer uses Type.GetType(pluginLibraryName).

Checklist

  • Device class in Devices/ with correct Mode, OnAwake, InitializeMessages, SetupMessages, GenerateMessage
  • Noise support (if applicable)
  • AddMyNewSensor() extension method in Implement.Sensor.cs
  • Case in Import.Sensor.cs type-switch
  • Plugin class in CLOiSimPlugins/ with OnAwake, OnStart, HandleCustomRequestMessage
  • Protobuf message type exists (or added via .gen_proto_code.sh)
  • SDFormat package supports the sensor type
  • Plugin class name matches SDF <plugin filename="..."> attribute
  • License header on all new files
  • Uses tabs for indentation, Allman braces

© 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/add-new-sensor of lge-ros2/cloisim.

Open the folder on GitHubat commit f4c1f0b

Compare with similar skills

Add New Sensor 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.

Add New Sensor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add New Sensor this skilllge-ros2/cloisim176—~1.6kAutomated safety check: PassMIT
Foundation Models On Deviceaffaan-m/ECC276k4 repos~2.1kAutomated safety check: PassMIT
Sdfautonomous-ai/openharness1.2k—~2.1kAutomated safety check: PassMIT
Mdm Device Managementsickn33/agentic-awesome-skills47k1 repos~3kAutomated safety check: NotesMIT
Foundation Models On Deviceaffaan-m/ECC276k3 repos~1.5kAutomated safety check: PassMIT
Developer Device Platform Basicsgoogle/skills21k—~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • Apple FoundationModels framework for on-device LLM — text generation, guided generation with @Generable, tool calling, and snapshot streaming in iOS 26+.

    276k GitHub starsUsed in 4 repos~2.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Sdf

    autonomous-ai/openharness

    SDFormat/SDF model and world authoring, validation, and simulator handoff.

    1.2k GitHub stars~2.1k tokensUpdated today
    Game DevelopmentAuto-check passed
  • Mdm Device Management

    sickn33/agentic-awesome-skills

    Manage and secure company devices with MDM solutions. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 1 repo~3k tokens
    DevOps & CloudAuto-check: notes
  • 苹果FoundationModels框架用于设备上的LLM——文本生成、使用@Generable进行引导生成、工具调用,以及在iOS 26+中的快照流。

    276k GitHub starsUsed in 3 repos~1.5k tokens
    MobileAuto-check passed
  • Official

    Provides guidance and instructions on managing remote devices on Developer Device Platform (DDP).

    21k GitHub stars~2.5k tokensUpdated today
    MobileAuto-check passed
  • Implementing Usb Device Control Policy

    mukul975/Anthropic-Cybersecurity-Skills

    Implements USB device control policies to restrict unauthorized removable media access on endpoints, preventing data exfiltration and malware introduction via USB devices.

    34k GitHub stars~1.4k tokensUpdated 1 mo ago
    SecurityAuto-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 4 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 4 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 4 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 4 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 4 days ago
    Auto-check passed
  • Add Noise Model

    lge-ros2/cloisim

    Add a custom noise model for sensor data simulation. An agent skill from lge-ros2/cloisim.

    176 GitHub stars~1.5k tokensUpdated 4 days ago
    Auto-check passed

Questions about Add New Sensor

What does Add New Sensor do?

Add a new sensor device to CLOiSim, including the Device subclass, SDF pipeline wiring, and transport plugin. Add New Sensor is an agent skill from lge-ros2/cloisim. Add a new sensor device to CLOiSim, including the Device subclass, SDF pipeline wiring, and transport plugin.

When should I use Add New Sensor?

Add New Sensor fits situations like: : adding a new sensor type; implementing a new SDF sensor; creating a new device class.

How do I install Add New Sensor in Claude Code?

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

How do I install Add New Sensor in Codex?

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

Can I use Add New Sensor 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 add-new-sensor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-new-sensor, .gemini/skills/add-new-sensor, .github/skills/add-new-sensor and .opencode/skills/add-new-sensor in your project.

What does Add New Sensor need to run?

SKILL.md names no scripts, command-line tools or credentials: Add New Sensor is instructions for the agent only.

Does Add New Sensor 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 Add New Sensor 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 Add New Sensor use?

Add New Sensor 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 Add New Sensor use?

About 1.6k tokens (SKILL.md is roughly 6.6k 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 Add New Sensor?

Skills that share tags, products or a category with Add New Sensor: Foundation Models On Device (affaan-m/ECC, 276k stars), Sdf (autonomous-ai/openharness, 1.2k stars), Mdm Device Management (sickn33/agentic-awesome-skills, 47k stars) and Foundation Models On Device (affaan-m/ECC, 276k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add New Sensor?

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.