Agent skill

Fix UI Files

by ranfdev in ranfdev/DistroShelf

Diagnose and pinpoint structural errors in GTK Builder .ui files (mismatched closing tags, unclosed elements).

GPL-3.0Auto-check passed

Install Fix UI Files

skills CLI
$ npx skills add ranfdev/DistroShelf --skill fix-ui-files -a claude-code

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

GitHub CLI
$ gh skill install ranfdev/DistroShelf fix-ui-files --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/ranfdev/DistroShelf.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/fix-ui-files .claude/skills/fix-ui-files && 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
fix-ui-files
GitHub stars
327
Token cost
~650 tokens
SKILL.md length
321 words
Files
2 (incl. scripts)
Skills in repo
4
Repo updated
First seen
Licence
GPL-3.0

At a glance

Diagnose and pinpoint structural errors in GTK Builder .ui files (mismatched closing tags, unclosed elements).

  • Works in 4 steps: The line where the wrong closing tag was… → The line where the still-open tag was… → Context snippets (surrounding lines)… → …
  • A .ui file fails to load with a Gtk-WARNING about template precompilation
  • SKILL.md covers Diagnostic script, Common causes, Verification and When NOT to use
  • Runs Python scripts from its folder; calls python3 and cargo

What it does

Fix UI Files is an agent skill from ranfdev/DistroShelf. Diagnose and pinpoint structural errors in GTK Builder .ui files (mismatched closing tags, unclosed elements). Use when a .ui file fails to load with a Gtk-WARNING about template precompilation or tag mismatches.

Its SKILL.md is about 650 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/validate_ui.py`).

The repository describes itself as: gtk4 client for https://distrobox.it. The licence is GPL-3.0.

When your agent uses it

  • A .ui file fails to load with a Gtk-WARNING about template precompilation

Example prompts

  • “/fix-ui-files”

Requirements

  • Python 3

Workflow steps

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

  1. The line where the wrong closing tag was found.
  2. The line where the still-open tag was opened (i.e. what should have been closed).
  3. Context snippets (surrounding lines) around both.
  4. A suggested fix.

What it can do on your machine

Read from SKILL.md and the folder at commit 1b85cb0. 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

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • cargo

    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

Fix UI Files loads about 650 tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 321 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from ranfdev/DistroShelf at commit 1b85cb0, republished under its GPL-3.0 licence (© ranfdev). 321 words, ~650 tokens.

Download SKILL.mdSave it as .claude/skills/fix-ui-files/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
fix-ui-files
description
Diagnose and pinpoint structural errors in GTK Builder .ui files (mismatched closing tags, unclosed elements). Use when a .ui file fails to load with a Gtk-WARNING about template precompilation or tag mismatches.

Fix UI Files

Use this skill when a GTK Builder .ui file fails to load. Typical symptoms:

  • Runtime warning: Failed to precompile template for class X: Error on line N char M: Element "A" was closed, but the currently open element is "B"
  • A blank window where a composite template widget should appear.
  • GLib-CRITICAL: g_bytes_get_size: assertion 'bytes != NULL' failed (downstream of the parse failure).

Diagnostic script

Run scripts/validate_ui.py (relative to this skill's directory) on a .ui file or a directory:

sh
python3 .agents/skills/fix-ui-files/scripts/validate_ui.py src/widgets/window.ui
# or, to scan everything:
python3 .agents/skills/fix-ui-files/scripts/validate_ui.py src/

The script walks the file's element stack tag-by-tag and pinpoints:

  1. The line where the wrong closing tag was found.
  2. The line where the still-open tag was opened (i.e. what should have been closed).
  3. Context snippets (surrounding lines) around both.
  4. A suggested fix.

Common causes

The most frequent class of error is editing the widget tree (wrapping or unwrapping a layer) and forgetting to update closing tags:

  • Adding a wrapper (e.g. inserting a GtkBox between an overlay and its child) without adding the matching </object> and </child>.
  • Removing a wrapper (e.g. deleting the GtkBox that stacked a banner above a split view) but leaving its closing tags in place. The extra </object> / </child> cascade into mismatches for every outer scope beyond them.
  • Renaming an element in the opening tag but forgetting the closing tag.

Verification

Re-run the script after editing to confirm the file is clean:

sh
python3 .agents/skills/fix-ui-files/scripts/validate_ui.py src/

Then run cargo build (which compiles composite templates for #[template(file = "...")]-wired Rust structs) and launch the application. A parse failure surfaces as a Gtk-WARNING at startup, not as a Rust compile error.

When NOT to use

  • Failed to find object 'X' in template — a TemplateChild<> field references an id that does not exist in the .ui file. Not a structural XML problem; grep for the id in the .ui file.
  • CSS issues, GObject property typos, missing <requires> — these do not surface as XML parse failures and need a running application to detect.

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

Files

SKILL.md and 1 other file (scripts) in .agents/skills/fix-ui-files of ranfdev/DistroShelf.

  • SKILL.md
  • scripts/validate_ui.py

Open the folder on GitHubat commit 1b85cb0

Compare with similar skills

Fix UI Files 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.

Fix UI Files compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fix UI Files this skillranfdev/DistroShelf327—~650Automated safety check: PassGPL-3.0
Diagnose Gatewayopenclaw/openclaw392k—~670Automated safety check: PassMIT
Diagnosegithub/awesome-copilot40k1 repos~1kAutomated safety check: PassMIT
Structured Datathedaviddias/Front-End-Checklist74k—~420Automated safety check: PassMIT
Bio Structural Biology Modern Structure PredictionFreedomIntelligence/OpenClaw-Medical-Skills3.1k1 repos~2.5kAutomated safety check: PassNone
List Structurethedaviddias/Front-End-Checklist74k—~438Automated safety check: PassMIT

Similar skills

  • Diagnose Gateway

    openclaw/openclaw

    Diagnose Gateway, config, secrets, channels, and port failures with read-only one-liners.

    392k GitHub stars~670 tokensUpdated today
    Auto-check passed
  • Diagnose

    github/awesome-copilot

    Official

    Perform a systematic diagnostic scan of an AI workflow across 5 quality dimensions — prompt quality, context efficiency, tool health, architecture fitness, and safety — producing a scored report…

    40k GitHub starsUsed in 1 repo~1k tokens
    Agent WorkflowsAuto-check passed
  • Structured Data

    thedaviddias/Front-End-Checklist

    A skill your agent uses when auditing metadata, crawlability, structured data, or indexability related to Add structured data markup.

    74k GitHub stars~420 tokensUpdated yesterday
    Marketing & SEOAuto-check passed
  • Bio Structural Biology Modern Structure Prediction

    FreedomIntelligence/OpenClaw-Medical-Skills

    Predict protein structures using modern ML models including AlphaFold3, ESMFold, Chai-1, and Boltz-1.

    3.1k GitHub starsUsed in 1 repo~2.5k tokens
    Research & ScienceAuto-check passed
  • List Structure

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing rendered HTML, interactive components, or design-system patterns related to Use correct list structure.

    74k GitHub stars~438 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Reads, writes, downloads, and converts macromolecular structures with Biopython Bio.PDB.

    1.2k GitHub starsUsed in 1 repo~4k tokens
    Research & ScienceAuto-check passed

More from ranfdev/DistroShelf

  • Code Review

    ranfdev/DistroShelf

    A skill your agent uses when performing a code review of changes, a diff, a commit, or a merge request in this project.

    327 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Release

    ranfdev/DistroShelf

    Prepare the next release of DistroShelf: version bump, release notes, commit, and tag.

    327 GitHub stars~448 tokensUpdated 1 mo ago
    Auto-check passed
  • Gnome SDK Docs

    ranfdev/DistroShelf

    Browse GNOME SDK documentation including GObject Introspection (.gir) files, D-Bus interfaces or icons that can be useful for GNOME apps development.

    327 GitHub stars~544 tokensUpdated 1 mo ago
    Auto-check passed

Questions about Fix UI Files

What does Fix UI Files do?

Diagnose and pinpoint structural errors in GTK Builder .ui files (mismatched closing tags, unclosed elements). Fix UI Files is an agent skill from ranfdev/DistroShelf.ui files (mismatched closing tags, unclosed elements).

When should I use Fix UI Files?

Fix UI Files fits situations like: A .ui file fails to load with a Gtk-WARNING about template precompilation.

How do I install Fix UI Files in Claude Code?

Run `npx skills add ranfdev/DistroShelf --skill fix-ui-files -a claude-code`. Or copy the skill folder (.agents/skills/fix-ui-files in ranfdev/DistroShelf) into .claude/skills/fix-ui-files in your project. Claude Code loads it when a task matches its description.

How do I install Fix UI Files in Codex?

Run `npx skills add ranfdev/DistroShelf --skill fix-ui-files -a codex`. Or copy the skill folder (.agents/skills/fix-ui-files in ranfdev/DistroShelf) into .agents/skills/fix-ui-files in your project. Codex loads it when a task matches its description.

Can I use Fix UI Files 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 ranfdev/DistroShelf --skill fix-ui-files -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fix-ui-files, .gemini/skills/fix-ui-files, .github/skills/fix-ui-files and .opencode/skills/fix-ui-files in your project.

What does Fix UI Files need to run?

Going by SKILL.md and its folder, Fix UI Files needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and cargo). Our summary lists: Python 3.

Does Fix UI Files 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 Fix UI Files 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Fix UI Files use?

Fix UI Files is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fix UI Files use?

About 650 tokens (SKILL.md is roughly 2.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 Fix UI Files?

Skills that share tags, products or a category with Fix UI Files: Diagnose Gateway (openclaw/openclaw, 392k stars), Diagnose (github/awesome-copilot, 40k stars), Structured Data (thedaviddias/Front-End-Checklist, 74k stars) and Bio Structural Biology Modern Structure Prediction (FreedomIntelligence/OpenClaw-Medical-Skills, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fix UI Files?

ranfdev (a GitHub user) maintains it in ranfdev/DistroShelf, which has 327 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on August 17, 2026.

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