Scan modules/ui*.py, scripts/*.py, and ui/locale/locale_en.json to create missing hints, identify duplicates, flag incorrect hints without auto-updating them, and generate a categorized audit report.
78%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.github/skills/update-hints/SKILL.mdScan UI definitions and components in modules/ui*.py, scripts/*.py, and built-in extensions, and audit ui/locale/locale_en.json to identify and create missing UI hints, detect duplicate entries, check for long labels or broken cross-references, and identify incorrect or outdated hints. Hints must be concise, accurately describe the argument/control, use standard HTML typography, and include recommended values only when necessary for specific use cases.
modules/ui*.py, scripts/*.py, or extensions that lack hints.ui/locale/locale_en.json for empty hints ("hint": ""), missing labels, or duplicate entries.locale_en.json against actual code labels to catch renamed, changed, or obsolete entries.<b><i>...</i></b> cross-references.len(hint) > 500 characters) that may benefit from condensing..github/instructions/hints.instructions.md and wiki/Dev-Hints.md for formatting and typography rules..github/instructions/core.instructions.md when reviewing Python UI code.tmp/ (e.g. tmp/scan_hints.py).ui/locale/locale_en.json: Primary source of truth for English hints and localizations.modules/ui*.py: Core UI definition and component modules (e.g. modules/ui_definitions.py, modules/ui_txt2img.py, modules/ui_img2img.py, modules/ui_control_elements.py, modules/ui_caption.py, modules/ui_video.py, modules/ui_guidance.py, modules/ui_models_load.py, etc.).scripts/*.py: Script UI definitions (e.g. scripts/xyz_grid.py, scripts/postprocessing_*.py, custom script parameters).extensions-builtin/**/*.py: Built-in extension UI elements.test/validate-locale.py: Validation script for checking duplicate labels, missing hints, long labels, and formatting.When identifying and drafting missing hints, prioritize the following sources:
modules/ui_control.py (and modules/ui_control_*.py), modules/ui_video.py (and sub-modules in modules/video_models/ and modules/minimax/), modules/ui_postprocessing.py, and modules/ui_caption.py, including all nested UI controls instantiated via helper functions (e.g. ui_sections.py, ui_guidance.py, ui_common.py, masking.py, create_ui_outputs(), etc.).modules/ui_definitions.py (options_templates OptionInfo definitions).scripts/*.py, built-in extension elements in extensions-builtin/, model management tabs, and sub-level interface controls.Hint strings render as HTML. Use only the following tags:
| Tag | Purpose | Examples |
|---|---|---|
<b> | Specific values, defaults, dropdown choices, numerics | <b>0.30</b>, <b>Karras</b>, <b>v_prediction</b>, <b>Euler</b> |
<b><i>...</i></b> | Cross-references to other UI controls by exact visible label | <b><i>Denoising strength</i></b>, <b><i>Use init image</i></b>, <b><i>Images</i></b> tab |
<i> | Proper nouns: model families, datasets, technique names | <i>SDXL</i>, <i>Flux</i>, <i>ControlNet</i>, <i>YOLO</i> |
<code> | Literals: paths, filename tokens, verbatim commands/tokens | <code>models/yolo</code>, <code>-seg</code>, <code>[PROMPT]</code> |
<b><i>Images</i></b> (the ModernUI label). Never write "Control tab".<br> for a single line break within a paragraph.<br><br> for paragraph breaks.<br>- <b>key</b>: description for short keyed bullet lists (e.g. dropdown options or mode descriptions).<ul>, <li>, Markdown asterisks, or unicode bullet characters.\uf06e, \uf0eb, , , ⟲, 🎲️, 📐, ※, used for UI controls, badges, and labels) are valid and must not be flagged as incorrect."hint": "") should be drafted and added directly to ui/locale/locale_en.json following the typography guidelines (unless running in audit-only mode).ui/locale/locale_en.json against actual UI definitions in code (modules/ui*.py, scripts/*.py, extensions-builtin/). As labels evolve or get renamed over time, entries in locale_en.json may no longer match. Flag any unmatched or obsolete entries in the report for review (do not auto-delete).ui/locale/locale_en.json and flag them in the audit report.len(label) > 63) to prevent layout and localization breaks.<b><i>Label</i></b> cross-reference refers to an actual, verbatim visible label present in locale_en.json. Flag broken or obsolete cross-references.len(hint) > 500) in the audit report to identify overly verbose or complex tooltips that may benefit from streamlining.⟲, 🎲️, 📐, ※, ) or empty labels identified by elem_id belong in the "_" section of locale_en.json.ui/locale/locale_en.json MUST be formatted on a single line (e.g. {"id": "...", "label": "...", "localized": "", "hint": "..."}). Do not break individual JSON entry objects across multiple lines.tmp/HINTS.md at the end of the run and output it in the response, containing:locale_en.json but not found in code)modules/ui*.py and scripts/*.pyExtract all UI controls and settings definitions:
modules/ui_definitions.py: Inspect OptionInfo entries, note setting keys, labels, component types (gr.Slider, gr.Checkbox, gr.Dropdown, gr.Radio, etc.), default values, and choice lists.modules/ui_*.py & scripts/*.py: Scan for Gradio components (gr.Slider, gr.Checkbox, gr.Dropdown, gr.Radio, gr.Textbox, gr.Button, gr.Accordion, gr.Tab, ToolButton, etc.) with label="...", value="...", or elem_id="...".modules/ui_sections.py, modules/ui_guidance.py, modules/ui_common.py, modules/masking.py, and sub-module builders like create_ui_outputs(), minimax_ui.create_ui(), etc.) that instantiate Gradio components on behalf of the parent tab or interface.tmp/ (e.g. tmp/scan_ui_hints.py).ui/locale/locale_en.jsonRead ui/locale/locale_en.json and perform the audit checks:
locale_en.json where "hint": "" is empty.modules/ui*.py or scripts/*.py that do not exist in locale_en.json.locale_en.json labels and IDs against active codebase definitions.locale_en.json that cannot be matched to any code component (indicating the label in code was renamed, modified, or removed).python test/validate-locale.py or inspect dictionary keys for labels appearing multiple times in locale_en.json.modules/ui*.py, scripts/*.py, and backend logic.<b><i>Label</i></b> where Label does not exist).<b><i>Images</i></b>).len(hint) > 500) to highlight verbose tooltips.audit-only mode):
"_" with their elem_id."0", "a"-"z", or "reference").{"id": "optional_elem_id", "label": "Label Text", "localized": "", "hint": "Concise hint description..."}{
"a": [
{"id": "...", "label": "...", "localized": "", "hint": "..."},
{"id": "...", "label": "...", "localized": "", "hint": "..."}
]
}locale_en.json.python test/validate-locale.pyjq empty ui/locale/locale_en.jsonpnpm eslint -- ui/locale/locale_en.jsonAt the end of the execution, always write the full structured markdown report to tmp/HINTS.md and output it in the response, categorized as follows:
## UI Hints Audit Report
### Added Hints
- **`Label Name`** (`section`): `Hint text added`
### Updated Hints
- **`Label Name`** (`section`): `Updated hint text and rationale`
### Duplicate Hints
- **`Label Name`**: Found in sections `[sec1, sec2]` with notes on differences/IDs.
### Incorrect Hints (Flagged for Review - Not Auto-Updated)
- **`Label Name`** (`section`):
- **Current Hint**: `Existing hint text`
- **Issue**: Explanation of why the hint is incorrect or misleading
- **Proposed Fix**: Suggested replacement hint text
### Stale / Unmatched Locale Entries (In locale_en.json but not found in code)
- **`Label Name`** (`section`): `Current hint` — not found in active code (may have been renamed or removed)
### Long Hints (>500 characters)
- **`Label Name`** (`section`, length: XXX): `Hint text summary`
### Flagged Items (Long Labels / Broken Cross-References)
- **Long Label**: `Label Name` (length: XX > 63)
- **Broken Cross-Reference**: `Label Name` references `<b><i>Target</i></b>` which does not exist in `locale_en.json`vladmandic/sdnext
6657d06
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.