/rs3-developer-tools:add-ui-windowfrom rs3-developer-tools
Add a GroupBox window with labels, buttons and other components to an RS3 plugin, wired to the plugin layer and destroyed on shutdown.
Ships in rs3-developer-tools. 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.
Create plugin UI with the ui.* components: a ui.GroupBox (or ui.Layer) parented to the plugin layer, child components positioned with SetPos and SetSize, built-in stylesheets from id.StyleSheet, and hooks subscribed through component:Subscribe(ui.Hook.<HOOK>, ...).
add-event-handler.local layer = ui.Interfaces:GetComponent(id.Component.TOPLEVEL_V2__PLUGIN_BUILD_LAYER_TOP)
if layer == nil then
error("plugin layer not available yet")
end
---@cast layer ui.ComponentCollection
For the settings panel or ribbon content, set hasSettingsIcon or hasRibbonIcon in plugin.json and build inside Event.SettingsLayerReady or Event.ContentLayerReady, whose payload gives the empty parent component.
2. Create the container and style it:
local window = ui.GroupBox.new(layer)
window.stylesheetID = id.StyleSheet.GROUPBOX_DEFAULT
window:SetHeaderLayout(0, 0, 0, 0, ui.GroupBoxHeaderAlignMode.LEFT)
window:SetSize(260, 140)
window:SetPos(40, 40)
SetPos(x, y, parentPercentX, parentPercentY) and SetSize(w, h, parentPercentW, parentPercentH) mix absolute units with fractions of the parent:local title = ui.Text.new(window)
title:SetSize(0, 0, 1.0, 0.4)
title.font = id.Font.MUSEO_SANS_15PT_REGULAR
title:AlignTo(ui.AlignMode.CENTRE)
title.content = "Loot tally"
local button = ui.Button.new(window)
button:SetPos(0, 0, 0.0, 0.5)
button:SetSize(0, 0, 1.0, 0.5)
button.label = "Reset"
button.stylesheetID = id.StyleSheet.BUTTON_DEFAULT
button:Subscribe(ui.Hook.ONBUTTONPRESSED, "lootTally.reset", function()
resetTally()
end)
PluginShutdown: unsubscribe hooks, then window:Destroy() (children go with it).BUTTON_DEFAULT, CHECKBOX_DEFAULT, INPUT_DEFAULT, GROUPBOX_DEFAULT, SLIDER_DEFAULT) before creating custom stylesheets.prl <name> and check the window appears once; a second copy means PluginShutdown did not destroy the previous one.Request: "add a checkbox that toggles NPC logging"
Result: a ui.Check child of the existing GroupBox with stylesheetID = id.StyleSheet.CHECKBOX_DEFAULT, an ONBUTTONPRESSED hook that flips a local loggingEnabled flag and saves it with PersistentDB:SetBool, and matching Unsubscribe in PluginShutdown.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub tmhsdigital/rs3-developer-tools --plugin rs3-developer-tools5 skills in this plugin
/add-event-handlerSubscribe an RS3 plugin to a client event with a typed callback, a namespaced reference name, and cleanup in PluginShutdown./add-testsWrite Lua tests for an RS3 plugin that run outside the client with rs3dev test, against the API fakes generated from the stubs, covering load, clicks, events, persistence and PluginShutdown./new-pluginCreate a new RS3 plugin folder with a valid manifest, a commented main.lua, LuaLS stubs wiring, and the first sync into dev_plugins./preflight-and-packageRun validate and preflight on an RS3 plugin, fix every error, build the mod.io zip, and walk through the manual submission checklist.