agentsclimarketplace

Pythonide widget

Skill Python-IDE/pythonide-skills/pythonide-widget

Official Agent Skills for building PythonIDE AppUI MiniApps, widgets, automations, and native iOS integrations with Codex, Cursor, and Claude Code.

Install
npx -y skills add Python-IDE/pythonide-skills --skill pythonide-widget

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Create or repair PythonIDE iOS Home Screen widgets using widget.Widget(), widget.param, widget.state, charts, tables, canvas layouts, and family branching. Use when the user asks for a WidgetKit widget, desktop widget script, or widget preview — not an AppUI MiniApp.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.3 KB, as published. Nobody here has run it

PythonIDE Widget

Execution rulebook for Python-first iOS Home Screen widgets.

Read Before Coding

  1. Widget module
  2. Widget schema and widget.pyi
  3. llms-full.txt widget surface
  4. Focused guides: layout, parameters, interaction, timeline

Do not use AppUI, SwiftUI, TSX, HTML, or undocumented widget helpers.

Workflow

  1. Confirm the user wants a widget, not an AppUI MiniApp (pythonide router).
  2. Write one runnable Python file: import widget, one widget.Widget(...), documented primitives, w.render().
  3. Default target family: medium Home Screen unless the user asks otherwise.
  4. Use widget.param for preview-sheet tunables; use widget.state for desktop interactions.
  5. Branch with widget.family, widget.family_value(...), w.when(...), or w.unless(...) only when supporting multiple families.
  6. Repair layout issues before claiming completion.

Default Pattern

import widget

ctx = widget.context
accent = widget.param.color("Accent", "#34D399")
count = widget.state.int("count", 0)

w = widget.Widget(background=("#F8FAFC", "#0B1220"), style="clean")
w.text("Today", size=16, weight="semibold").line_limit(1).min_scale(0.72)
w.value(count, unit="x").content_transition("numericText").monospaced_digit()
w.progress(min(int(count), 10), total=10, color=accent, height=8)

if ctx.content_height >= 120:
    w.button("+1", action=count.increment(), background=accent, color="#FFFFFF")

w.render()

Generation Rules

  • One widget.Widget() entry per script
  • Prefer documented primitives: text, rich_text, value, symbol, svg, image, shape, rect, circle, path, table, line_chart, bar_chart, ring_chart, progress, row, column, layer, grid, region, canvas, button, link, toggle
  • widget.param.color/slider/number/text/bool/choice/file for preview-editable values
  • widget.state actions: increment(), decrement(), set(value), toggle(), toggle_item(value)
  • Layout containers use with blocks: with w.row(spacing=8): then child calls on indented lines
  • Use ctx = widget.context for size-aware composition inside ctx.content_width / ctx.content_height
  • Add .line_limit(...) and .min_scale(...) to long text
  • Widget animations are timeline/state-update animations, not continuous 60fps app loops

Family Policy

RequestTarget
Unspecifiedmedium only
Explicit smallone title, one value, one compact visual
Explicit largeadd real extra content, do not stretch medium
All Home Screen sizesbranch per family
Accessory familiesonly when explicitly requested

Hard Stops

  • No appui, scene, or ui in widget deliverables
  • No invented APIs or compatibility aliases omitted from public schema
  • No claiming gradients, network data, charts, or interaction unless coded with documented APIs
  • No w.row(w.text(...), spacing=8) — use with w.row(...)

Repair Hints

IssueFix
Blank widgetrestore w.render()
Cropped textshorten, branch by family, add .line_limit(1).min_scale(0.6)
Crowded mediumremove optional metrics or reduce chart density
Table lines too heavyline_width="hairline"
Tap no effectuse widget.state action reference
Network failurecache_json(..., default=...) fallback

Examples

  • examples/progress/ — medium widget with param, state, and progress bar

Boundary

Widgets are not MiniApps. If the user wants in-app navigation, forms, or multi-screen tools, switch to pythonide-appui.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.