AD

add-ui-feature

Helper for modifying CLOiSim HUD and camera controls.

Install

mkdir -p .claude/skills/add-ui-feature && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10151" && unzip -o skill.zip -d .claude/skills/add-ui-feature && rm skill.zip

Installs to .claude/skills/add-ui-feature

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Add a new UI panel, control, or overlay to CLOiSim's HUD. Use when: adding a new button or panel to UIController, creating a new camera mode, adding an info overlay.
165 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Add UI buttons
  • Create info overlays
  • Extend camera controls
  • Implement status messages

How it works

Guides integration of new elements into the UIController for UI Toolkit or InfoDisplay for legacy UGUI overlays.

Inputs & outputs

You give it
UI feature request
You get back
Integrated HUD element

When to use add-ui-feature

  • Adding a button to the HUD
  • Creating a new info overlay
  • Adding a camera mode toggle

About this skill

Add a New UI Feature

Procedure for adding UI elements to CLOiSim's HUD using Unity UI Toolkit or extending camera controls.

When to Use

  • Adding a new button, toggle, or panel to the main HUD
  • Creating a new info display or overlay
  • Adding a new camera view mode
  • Extending the following target list or model importer UI

UI Architecture

UI (scene root)
├── Main Canvas (UIDocument + UIController)
│   └── UI Toolkit visual tree (UXML)
├── InfoDisplay (legacy TextMeshPro overlay)
└── FollowingTargetList

Two UI systems in use:

  • UI Toolkit — main HUD (UIController.cs): buttons, toggles, text fields, labels
  • Legacy UGUI/TextMeshPro — info overlay (InfoDisplay.cs): FPS counter, status text

Do not mix UI Toolkit and UGUI in the same component.

Procedure

Option A: Add to Main HUD (UI Toolkit)

1. Add Element to UXML

Edit the UXML document (referenced by the UIDocument component on the Main Canvas object). Add your element:

<ui:Button name="MyFeature" text="My Feature" class="toolbar-button" />

2. Wire in UIController

Edit Assets/Scripts/UI/UIController.cs:

// Add field
private Button _buttonMyFeature = null;

// In Start(), after other button wiring:
_buttonMyFeature = _rootVisualElement.Q<Button>("MyFeature");
_buttonMyFeature.clickable.clicked += () => OnMyFeatureClicked();

// Optionally add hover effects:
_buttonMyFeature.RegisterCallback<MouseEnterEvent>(
    delegate { ChangeBackground(ref _buttonMyFeature, Color.gray); });
_buttonMyFeature.RegisterCallback<MouseLeaveEvent>(
    delegate { ChangeBackground(ref _buttonMyFeature, Color.clear); });

3. Implement the Handler

private void OnMyFeatureClicked()
{
    _buttonMyFeature.ToggleInClassList("selected");
    // Interact with Main singleton:
    Main.Instance.MyNewMethod();
}

UI Toolkit Query Patterns

// Query by name and type:
_rootVisualElement.Q<Button>("CameraView")
_rootVisualElement.Q<Toggle>("LockVerticalMoving")
_rootVisualElement.Q<TextField>("ScaleField")
_rootVisualElement.Q<Label>("StatusMessage")
_rootVisualElement.Q<EnumField>("MyEnum")
_rootVisualElement.Q<ScrollView>("MyList")
_rootVisualElement.Q<VisualElement>("MyContainer")

Event Registration Patterns

// Click
button.clickable.clicked += () => { ... };

// Value change
toggle.RegisterValueChangedCallback(x => DoSomething(x.newValue));

// Focus events
textField.RegisterCallback<FocusOutEvent>(OnFocusOut);

// Mouse events
element.RegisterCallback<MouseEnterEvent>(delegate { ... });
element.RegisterCallback<MouseLeaveEvent>(delegate { ... });

Styling Patterns

// Visibility
element.style.display = DisplayStyle.None;     // hidden, no layout
element.style.display = DisplayStyle.Flex;      // visible
element.style.visibility = Visibility.Hidden;   // hidden, keeps layout

// Background color
element.style.backgroundColor = new Color(0.5f, 0.5f, 0.5f, 1f);

// CSS class toggling
element.ToggleInClassList("selected");
element.EnableInClassList("active", isActive);
element.AddToClassList("highlight");
element.RemoveFromClassList("highlight");

Option B: Add a New Camera Mode

1. Create CameraControl Subclass

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

using UnityEngine;

public class MyCameraControl : CameraControl
{
    protected override void HandleMouseWheelScroll(in float value)
    {
        // Custom zoom behavior
    }

    protected override void HandleKeyboardDirection(in float duration)
    {
        // Custom movement (WASD)
    }
}

2. Register in Main.cs

Camera switching is done in Main.cs via SetCameraPerspective() / SetCameraOrthographic() pattern. Add your mode similarly.

Option C: Status Messages

Use the existing status message system:

// From anywhere with access to Main:
Main.UIController?.SetStatusMessage("Loading model...");
Main.UIController?.SetWarningMessage("Warning text");
Main.UIController?.SetErrorMessage("Error text");
Main.UIController?.ClearMessage();

Input System

Use New Input System APIs only:

// Keyboard
if (Keyboard.current[Key.Space].wasPressedThisFrame) { ... }
if (Keyboard.current[Key.LeftCtrl].isPressed) { ... }

// Mouse
var scrollDelta = Mouse.current.scroll.ReadValue().y;
var mousePosition = Mouse.current.position.ReadValue();
if (Mouse.current.leftButton.wasPressedThisFrame) { ... }

Never use legacy Input.GetKey(), Input.GetAxis(), etc.

Key Rules

  • The UI root object and Main Canvas child must not be renamed
  • Camera controls set _blockControl = true when UI text input has focus
  • UIController accesses singletons via Main.Instance, Main.ObjectSpawning, etc.
  • Use LateUpdate() for camera control input processing

Checklist

  • Element added to UXML document
  • Field declared and queried in UIController.Start()
  • Event handler registered
  • Uses New Input System (Keyboard.current, Mouse.current)
  • Does not mix UI Toolkit and UGUI in same component
  • Does not rename UI or Main Canvas scene objects
  • License header on new files
  • Tabs for indentation, Allman braces

When not to use it

  • Mixing UI Toolkit and UGUI in one component
  • Renaming core scene objects

Prerequisites

UnityC#

Limitations

  • Must not rename UI root objects
  • Requires New Input System

How it compares

It provides a specific architectural procedure for CLOiSim's dual-UI system, preventing common integration errors.

Compared to similar skills

add-ui-feature side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
add-ui-feature (this skill)03moNo flagsIntermediate
ui-ux-pro-max1,9095moReviewIntermediate
svg-precision5274moReviewIntermediate
mobile-android-design1012moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

ui-ux-pro-max

nextlevelbuilder

UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

1,9092,023

svg-precision

dkyazzentwatwa

Deterministic SVG generation, validation, and rendering. Use for icons, diagrams, charts, UI mockups, or technical drawings requiring structural correctness and cross-viewer compatibility.

5271,229

mobile-android-design

wshobson

Master Material Design 3 and Jetpack Compose patterns for building native Android apps. Use when designing Android interfaces, implementing Compose UI, or following Google's Material Design guidelines.

101335

frontend-slides

sickn33

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

95195

scroll-experience

davila7

Expert in building immersive scroll-driven experiences - parallax storytelling, scroll animations, interactive narratives, and cinematic web experiences. Like NY Times interactives, Apple product pages, and award-winning web experiences. Makes websites feel like experiences, not just pages. Use when: scroll animation, parallax, scroll storytelling, interactive story, cinematic website.

101142

penpot-uiux-design

github

Comprehensive guide for creating professional UI/UX designs in Penpot using MCP tools. Use this skill when: (1) Creating new UI/UX designs for web, mobile, or desktop applications, (2) Building design systems with components and tokens, (3) Designing dashboards, forms, navigation, or landing pages, (4) Applying accessibility standards and best practices, (5) Following platform guidelines (iOS, Android, Material Design), (6) Reviewing or improving existing Penpot designs for usability. Triggers: "design a UI", "create interface", "build layout", "design dashboard", "create form", "design landing page", "make it accessible", "design system", "component library".

27145

Search skills

Search the agent skills registry