Agent skill

Widget

by go-gui-org in go-gui-org/go-gui

Create a new go-gui widget with proper Cfg struct and factory function

MITAuto-check passed

Install Widget

skills CLI
$ npx skills add go-gui-org/go-gui --skill widget -a claude-code

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

GitHub CLI
$ gh skill install go-gui-org/go-gui widget --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/go-gui-org/go-gui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/widget .claude/skills/widget && 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
widget
GitHub stars
123
Token cost
~570 tokens
SKILL.md length
157 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Create a new go-gui widget with proper Cfg struct and factory function

  • Works in 3 steps: A *Cfg struct (zero-initializable,… → A factory function that returns View → Event callbacks that use the…
  • SKILL.md covers Arguments, Widget Structure, Template and Rules
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Widget is an agent skill from go-gui-org/go-gui. Create a new go-gui widget with proper Cfg struct and factory function

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

It works with Go. The repository describes itself as: Build modern, cross-platform applications entirely in Go. No browser runtime. No JavaScript. No HTML or CSS. The licence is MIT.

Example prompts

  • “/widget”

Workflow steps

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

  1. A *Cfg struct (zero-initializable, exported fields)
  2. A factory function that returns View
  3. Event callbacks that use the func(EventCtx) signature

What it can do on your machine

Read from SKILL.md and the folder at commit 74cbb00. 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 go).

    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

Widget loads about 570 tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 157 words of instructions outside code blocks.

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

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 go-gui-org/go-gui at commit 74cbb00, republished under its MIT licence (© go-gui-org). 157 words, ~570 tokens.

Download SKILL.mdSave it as .claude/skills/widget/SKILL.md (or your agent's skills folder).
name
widget
description
Create a new go-gui widget with proper Cfg struct and factory function
disable-model-invocation
true

New Widget

Create a new widget in the gui/ package. Follow established conventions.

Arguments

  • name (required): widget name (for example, "Slider" or "ColorPicker")

Widget Structure

Every widget consists of:

  1. A *Cfg struct (zero-initializable, exported fields)
  2. A factory function that returns View
  3. Event callbacks that use the func(EventCtx) signature

Template

go
package gui

// <Name>Cfg configures the <Name> widget.
type <Name>Cfg struct {
    // ID keys focus, scroll, and widget state. Empty takes a generated
    // leaf (`gui:"auto"`, #881); set it when code names the widget.
    ID string `gui:"auto"`

    A11YCfg

    // Focusable opts into the focus system (with a non-empty ID).
    // Input controls are focusable by default and expose FocusDisabled
    // instead (inventory: `ergonomics-audit -mode focus`); pick the
    // convention that matches the widget class.
    Focusable bool

    // Widget-specific fields...

    // Event callbacks
    OnClick func(EventCtx)
}

// <Name> creates a <Name> widget.
func <Name>(cfg <Name>Cfg) View {
    // Build layout tree
    // Wire event handlers. A callback that acts on an event calls
    // ctx.Consume(). A callback that does not act lets it travel on.
    // Return root View
}

Rules

  • File name: view_<lowercase_name>.go in gui/
  • Cfg struct must be zero-initializable (sensible defaults)
  • Event callbacks use func(EventCtx). A callback that acts on an event calls ctx.Consume(). A callback that does not act lets the event travel on. Nothing is consumed by default.
  • Focus needs both Focusable (or default-on with no FocusDisabled) and a non-empty ID. The requiredid analyzer flags Focusable: true without an ID
  • An auto-ID widget gets its leaf from vw.autoLeaf("<kind>") inside a ViewFunc and goes into TestAutoIDEveryWidgetTwiceHasNoDuplicates (gui/CLAUDE.md, Auto IDs)
  • No variable shadowing (use = not := for outer-scope vars)
  • Read existing widgets (for example, view_button.go and view_slider.go) for patterns
  • Must pass golangci-lint run ./gui/...

© go-gui-org, 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 .claude/skills/widget of go-gui-org/go-gui.

Open the folder on GitHubat commit 74cbb00

Compare with similar skills

Widget 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.

Widget compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Widget this skillgo-gui-org/go-gui123—~570Automated safety check: PassMIT
Add Redis Command to go-redisredis/go-redis22k—~1.4kAutomated safety check: PassBSD-2-Clause
Go Pedantrychromedp/chromedp13k—~3.7kAutomated safety check: PassMIT
Fory Releaseapache/fory4.6k—~2.9kAutomated safety check: PassApache-2.0
AO Desktop App LauncherOrchestratorInc/agent-orchestrator13k—~2.4kAutomated safety check: PassApache-2.0
Go-Redis Release Preparationredis/go-redis22k—~1.1kAutomated safety check: PassBSD-2-Clause

Similar skills

  • Official

    Walks through adding a new Redis or Redis module command to the go-redis client, from fetching the spec and docs to the type, interface wiring, parsing and tests.

    22k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Go Pedantry

    chromedp/chromedp

    This skill should be used when the user is writing Go code and needs guidance on Go-specific pedantry: error wrapping with fmt.Errorf and %w, interface design (accept interfaces return structs)…

    13k GitHub stars~3.7k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Fory Release

    apache/fory

    Prepare an Apache Fory release candidate from a clean release branch, including the version bump, RC tag, JVM staging, ASF source artifacts, SVN upload, and vote email.

    4.6k GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • AO Desktop App Launcher

    OrchestratorInc/agent-orchestrator

    Launches, restarts and troubleshoots the real AO Electron desktop app from a checkout, with isolated or real local data and checks for stale processes.

    13k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Prepares a go-redis release locally: picks the next semver, gathers merged PRs, writes the RELEASE-NOTES entry and bumps versions, without publishing.

    22k GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Starts a Dozzle dev server on a port derived from the current worktree so you can test by hand in a browser, without disturbing instances started elsewhere.

    15k GitHub stars~747 tokensUpdated today
    DevelopmentAuto-check passed

More from go-gui-org/go-gui

  • New Example

    go-gui-org/go-gui

    Scaffold a new go-gui example app with standard boilerplate. An agent skill from go-gui-org/go-gui.

    123 GitHub stars~377 tokensUpdated today
    Auto-check passed
  • Release Consumers

    go-gui-org/go-gui

    Which sibling repos require a go-gui version bump on release.

    123 GitHub stars~178 tokensUpdated today
    Auto-check passed

Works with

Questions about Widget

What does Widget do?

Create a new go-gui widget with proper Cfg struct and factory function. Widget is an agent skill from go-gui-org/go-gui.

How do I install Widget in Claude Code?

Run `npx skills add go-gui-org/go-gui --skill widget -a claude-code`. Or copy the skill folder (.claude/skills/widget in go-gui-org/go-gui) into .claude/skills/widget in your project. Claude Code loads it when a task matches its description.

How do I install Widget in Codex?

Run `npx skills add go-gui-org/go-gui --skill widget -a codex`. Or copy the skill folder (.claude/skills/widget in go-gui-org/go-gui) into .agents/skills/widget in your project. Codex loads it when a task matches its description.

Can I use Widget 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 go-gui-org/go-gui --skill widget -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/widget, .gemini/skills/widget, .github/skills/widget and .opencode/skills/widget in your project.

What does Widget need to run?

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

Does Widget 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 Widget 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 Widget use?

Widget 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 Widget use?

About 570 tokens (SKILL.md is roughly 2.3k 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 Widget?

Skills that share tags, products or a category with Widget: Add Redis Command to go-redis (redis/go-redis, 22k stars), Go Pedantry (chromedp/chromedp, 13k stars), Fory Release (apache/fory, 4.6k stars) and AO Desktop App Launcher (OrchestratorInc/agent-orchestrator, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Widget?

go-gui-org (a GitHub organization) maintains it in go-gui-org/go-gui, which has 123 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 8, 2026.

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