python-ui-lord

python-ui-lord is a skill for Claude Code, Codex from m3taz-ahmed/ai-globals. It costs 69 tokens per session (3,056 once invoked), scanned A, original, MIT.

A set of design and implementation rules for building Python user interfaces for desktop, terminal, web, and mobile apps. It covers choosing among Python UI frameworks, visual themes, accessibility, application states, and packaging.

In plain words
What is it for?
Use it when planning or building a Python UI with PySide6, Textual, Flet, Reflex, NiceGUI, FastAPI with htmx, or similar tools. It helps compare frameworks, define consistent styling, cover UI states, and prepare an app for release.
Why use it?
It helps avoid choosing an unsuitable framework or overlooking important parts of the user experience. It also records licensing and deprecation concerns that can affect a project’s long-term maintenance.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when planning or building a Python UI with PySide6, Textual, Flet, Reflex, NiceGUI, FastAPI with htmx, or similar tools. It helps compare frameworks, define consistent styling, cover UI states, and prepare an app for release.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/m3taz-ahmed/ai-globals/python-ui-lord
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add m3taz-ahmed/ai-globals --skill python-ui-lord
Clone the repo
git clone --depth 1 https://github.com/m3taz-ahmed/ai-globals

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for python-ui-lord

README.md
[![agentmods](https://agentmods.dev/badge/skills/m3taz-ahmed/ai-globals/python-ui-lord/github.svg)](https://agentmods.dev/skills/m3taz-ahmed/ai-globals/python-ui-lord)
Your own site
<a href="https://agentmods.dev/skills/m3taz-ahmed/ai-globals/python-ui-lord"><img src="https://agentmods.dev/badge/skills/m3taz-ahmed/ai-globals/python-ui-lord/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for python-ui-lord

Your own site · 80×15
<a href="https://agentmods.dev/skills/m3taz-ahmed/ai-globals/python-ui-lord"><img src="https://agentmods.dev/badge/skills/m3taz-ahmed/ai-globals/python-ui-lord.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,056 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.03056
Opus 5.5 $0.00028 $0.01222
Sonnet 5.5 $0.00014 $0.00611
Haiku 4.5 $0.00007 $0.00306

Measured 22d ago against content hash 0fe41fbe545c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

python-ui-lord scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 22d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/python-ui-lord/SKILL.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python UI Lord

[SKILL] python-ui-lord [OBJ] Design and ship #1-quality Python UIs across desktop, terminal, and web — correct framework selection, token-driven theming, complete state coverage, a11y, and production packaging. No slop, no wrong tool.

[RULES]

  1. [REQ] Framework Selection — Choose by deliverable, not habit. Matrix: professional native desktop/long-lived product → PySide6 6.10+; terminal/SSH/dev-ops tools → Textual 8; one Python codebase → desktop+web+mobile → Flet 1.0; production multi-user web app in pure Python → Reflex 0.9; fast custom web UI for tools/IoT/robotics → NiceGUI 3; server-rendered control → FastAPI+Jinja+htmx+Tailwind; batteries/admin → Django 6; data-science prototypes only → Streamlit/Dash/Gradio.
  2. [REQ] Licensing — Default PySide6 (LGPL, closed-source OK via dynamic wheels). PyQt6 is GPL/commercial — only with a purchased license or a GPL-compatible project.
  3. [REQ] Deprecation Watch — Never start new serious apps on customtkinter (dormant upstream, last release 5.2.2/2023) or Tkinter for anything beyond trivial scripts. Migrate path: PySide6 (native) or Flet (cross-platform).
  4. [REQ] Research-First — Before styling, pull real product references via the design-research skill (mobbin/refero MCP). ONE dominant design direction per app — never average references. No invented gradients.
  5. [REQ] Context7 Gate — Query Context7 MCP for the chosen framework BEFORE writing implementation code; APIs drift (Flet 1.0 rewrote the event loop, NiceGUI 3 refactored scenes). Live docs > memory.
  6. [REQ] Tokens-First — Define the theme BEFORE the first widget: colors, spacing scale (4/8px base), type scale, radii, shadows. QSS template dict (Qt), .tcss theme (Textual), page.theme (Flet), rx.theme (Reflex), ui.colors+Tailwind classes (NiceGUI), CSS custom properties (htmx path). Hardcoded hex in a widget = defect.
  7. [REQ] One Icon Set — Pick one family per app (Lucide, Material Symbols, Iconsax) at one stroke weight; qtawesome/flet.Icons/rx.icon mappings — never mix families.
  8. [REQ] State Coverage — Every screen ships four states: empty (guidance + CTA, never bare "no data"), loading (skeleton/spinner, never blank), error (message + retry), success. Missing states = slop.
  9. [REQ] Feedback Latency — Every interaction gets visible feedback ≤100ms: hover, pressed, disabled, busy. Long ops show determinate progress or stream partial results.
  10. [REQ] Motion Discipline — 200–300ms transitions, ease-out on entry; animate transform/opacity only; honor reduced-motion/accessibility flags; never animate layout-blocking properties.
  11. [REQ] A11y — accessibleName/aria on all controls; full keyboard navigation + shortcuts (QShortcut/BINDINGS/accesskey); contrast ≥4.5:1 text, ≥3:1 UI boundaries; never color-only state; visible focus indicator.
  12. [REQ] Dark + Light — Ship both themes and verify each screen in both. Dark uses near-black surfaces (#0a0a0a–#1a1a2e range) with elevation tinting, never pure black.
  13. [REQ] Density & Grid — Align everything to the spacing scale; consistent paddings per surface tier (toolbar < content < footer); text columns ≤75 chars; resize windows/terminals to min target and re-verify.
  14. [REQ] RTL/Arabic — Qt.LayoutDirection.RightToLeft/Textual text-align/CSS dir="rtl"; logical properties; mirror nav/icons; Arabic font stack (IBM Plex Sans Arabic/Noto Sans Arabic, 1.5–1.7 line-height); test with real strings (+30% expansion).
  15. [REQ] PySide6 Threading — NEVER touch QWidget/UI objects from a worker thread; QThreadPool+QRunnable with signals, or QThread+slots; heavy work yields progress via signals; use @Slot decorator.
  16. [REQ] PySide6 Model/View — Data screens use QAbstractItemModel+QTableView/QSortFilterProxyModel (sorting/filtering for free); NEVER hand-populate QTableWidget for >100 rows — delegate+QListView/QML for cards.
  17. [REQ] PySide6 Theming — Keep the palette in ONE Python dict; generate QSS from a template (QSS has no variables); Fusion style base + QSS overrides; QPalette for platform-native fallbacks.
  18. [REQ] PySide6 Product Shell — Standard chrome: menubar/toolbar/statusbar/QSystemTrayIcon; QSettings for geometry+splitters+theme; single-instance guard (QLocalServer/QLockFile); native QFileDialog; DPI-aware (Qt6 auto-scaling).
  19. [REQ] PySide6 Forms — Qt Designer .ui for complex static forms → pyside6-uic; prefer code for dynamic UIs; NEVER hand-edit generated ui_*.py.
  20. [REQ] Textual Architecture — App → Screen(s) → composed Widgets; styles in .tcss files (not inline); reactive attrs + watch_/compute_ for state; messages via @on/message handlers, not direct calls.
  21. [REQ] Textual Async — NEVER block the message pump: @work(thread=True) for CPU, run_worker/async for IO; LoadingIndicator/progress widgets during waits.
  22. [REQ] Textual Tooling — textual console + devtools for live inspection; BINDINGS for every action; CommandPalette for discoverability; App.run_test() + pytest-textual-snapshot for CI tests; same app can serve to browsers via textual-web for remote access.
  23. [REQ] Flet 1.0 Model — Controls tree per page; single event loop runs handlers (1.0 breaking change from 0.28 — don't mix old patterns); yield/page.update() semantics per docs; expand/spacing/alignment for responsive layout; Views + page.route for navigation.
  24. [REQ] Flet Theming & Targets — page.theme=ft.Theme(color_scheme_seed=...) + page.dark_theme; page.theme_mode; flet build targets windows/macos/linux/web/apk/aab/ipa/ios-simulator; persistent services (Audio/Geolocator/Clipboard) survive reloads.
  25. [REQ] Reflex Architecture — rx.State subclasses hold ALL mutable state; event handlers mutate via self; components subscribe to vars and re-render selectively; NEVER put business logic in components — backend functions/services behind events.
  26. [REQ] Reflex Long Tasks — @rx.event(background=True) for streaming progress/AI output (WebSocket push); yield intermediate state updates; NEVER block an event handler on long IO.
  27. [REQ] Reflex Structure — Package layout: pages/, components/, state/, backend/; rxconfig.py for app/db/tailwind config; rx.theme tokens + class_name Tailwind escape; reflex run --env prod behind granian for production.
  28. [REQ] NiceGUI Discipline — ui.* tree with slots; ui.dark_mode() binding; ui.timer/background async for live data; app.storage.user|client for persistence; ui.run(native=True) (pywebview) for a desktop window; escape to Quasar props via .props()/.classes() sparingly.
  29. [REQ] htmx Path — FastAPI/Django + Jinja partials: endpoints return HTML fragments; hx-target/hx-swap precise swaps; CSRF on forms; Tailwind standalone CLI + @theme tokens; follow web-design-guidelines skill for the full 110-rule checklist.
  30. [REQ] App Shell Contract — Title, icon, sane min/default window size, version string accessible; settings persist across restarts; proper shutdown (thread cleanup, port release, tray removal).
  31. [REQ] Data Screens — Sorting + filtering + search on every table; pagination or virtualized list >1k rows; column resize/reorder persistence via settings.
  32. [REQ] Dialogs & Feedback — Modal for destructive actions only; toast/snackbar for confirmations; validation inline at blur/submit with field-level errors; preserve user input on failure.
  33. [REQ] Packaging — Desktop: Nuitka preferred (smaller/faster) or PyInstaller; bundle Qt platforms plugin; native icon + version metadata; test artifact on a CLEAN machine/VM before delivery.
  34. [REQ] Testing — Smoke test "app boots to main screen" always; pytest-qt for Qt, run_test()/snapshot for Textual, TestClient/Playwright for web paths; states (empty/loading/error) get dedicated tests.
  35. [PROHIBIT] Never update UI from non-UI threads/processes — signals/events/messages only.
  36. [PROHIBIT] Never block the event loop or message pump — workers, async, or threads for all IO/CPU.
  37. [PROHIBIT] Never put business logic, SQL, or HTTP calls inside widgets/components — service layer behind the UI.
  38. [PROHIBIT] Never ship Streamlit/Dash as a production multi-user app — it's the prototype tier; production = Reflex/NiceGUI/FastAPI.
  39. [PROHIBIT] Never hardcode colors, spacing, or fonts outside the theme token system — no slop (generic gradients, placeholder text, default-styled widgets, mixed radii).
  40. [PROHIBIT] Never skip empty/loading/error states, keyboard nav, or the dark-mode pass.
  41. [PROHIBIT] Never assume versions/APIs — Flet 1.0 broke 0.28 handler semantics; NiceGUI 3 refactored ui.scene; verify via Context7 + lockfile ([VER-01]).
  42. [REQ] Desktop Security — secrets in OS keyring (keyring → Credential Manager/Keychain/libsecret), NEVER QSettings/.ini/plaintext; local UI servers (NiceGUI/Flet/webview modes) bind 127.0.0.1 + per-session auth token — open localhost API = any-process takeover; auto-updaters require signed packages + signature verification (unsigned updater = RCE); custom URL schemes/deep links validate every param (remote input); js_api/webview bridges expose Python methods — public API surface, validate + minimize; clipboard/drag-drop/file-drop content is untrusted.
  43. [CMD] Context7 IDs — /encode/httpx family for API calls inside apps; framework IDs: textual /textualize/textual, reflex /reflex-dev/reflex, nicegui /zauberzeug/nicegui, flet /flet-dev/flet, pyside6 (Qt for Python docs via /qt/qtforpython when indexed — else official doc.qt.io).
  44. [REQ] Delegation — Delegate pure HTML/CSS/token questions to web-design-guidelines + ui-design-lord; research references via design-research; API contracts via api-architect; backend reflexes via backend-design; security reviews via web-security-checklist + tech-stack/appsec-hardening.md.

Read the full file on GitHub · 103 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 22d ago Changed · +1 lines 0fe41fbe545c
  2. 23d ago First seen · 102 lines · 69 tokens per session scan A 0e2a6bb4ca2b

Subscribe to this mod's changes

python-ui-lord is a skill published in the GitHub repository m3taz-ahmed/ai-globals (5 stars, last pushed 4d ago), licensed MIT. It adds 69 tokens to every session and 3,056 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-26.

Related

Other skills, from other repositories

wxpython-specialist

Skill "wxpython-specialist" from Community-Access/accessibility-agents, covering wxpython specialist, core principles, sizer layouts, event handling and threading.

Community-Access/accessibility-agents · 22 tokens

pillow-technical-diagrams

Create technical poster and diagram images using Pillow (PIL), including shapes, text, lines, and layered composition.

cxcscmu/SkillLearnBench · 30 tokens

glyphs-python-api

Queries Glyphs Python Scripting API reference (35 classes, 16 functions, 133 constants) parsed from Sphinx RST documentation. Use when looking up GSFont/GSLayer/GSGlyph Python API properties, searching for scripting methods, reading class documentation, or finding code examples for Glyphs Python scripting.

yintzuyuan/glyphs-reference · 68 tokens

matlab

Builds, reviews, migrates, and plans MATLAB or GNU Octave numerical workflows. Use for arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 44 tokens

pennylane

Builds and differentiates PennyLane quantum circuits, hybrid PyTorch or JAX models, molecular VQE and QAOA workflows. Use for variational quantum algorithms, quantum machine learning, simulator validation, and moving validated circuits to provider plugins. For hardware-specific compilation use qiskit or cirq; for…

K-Dense-AI/scientific-agent-skills · 74 tokens

rocm-kernels

Provides guidance for writing and benchmarking optimized Triton kernels for AMD GPUs (MI355X, R9700) on ROCm, targeting HuggingFace diffusers (LTX-Video, SD3, FLUX) and transformers. Core kernels: RMSNorm, RoPE 3D, GEGLU, AdaLN. Includes XCD swizzle, autotune, diffusers integration patterns, and LTX-Video pipeline…

huggingface/kernels · 93 tokens