create-ui-widget

A process for building reusable Flutter UI widgets in the packages/app_ui package using the project’s naming and folder rules.

In plain words
What is it for?
Adding, exporting, and registering reusable buttons, layouts, and other UI widgets.
Why use it?
It keeps shared interface components organized, consistently named, and aligned with the project’s design tokens.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/anoopsg/agent_rules/create-ui-widget
Any agent
npx skills add anoopsg/agent_rules --skill create-ui-widget
Clone the repo
git clone --depth 1 https://github.com/anoopsg/agent_rules

Made for: Claude Code, Codex.

Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,137 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00038 $0.01137
Opus 5 $0.00019 $0.00568
Sonnet 5 $0.00008 $0.00227
Haiku 4.5 $0.00004 $0.00114

Measured 2d ago against content hash 01a755023a84, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

create-ui-widget 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 2d 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.

src/exclusive/skills/create-ui-widget/SKILL.md · 118 lines

How it starts

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

UI Widget Creation Skill

This skill defines the process for adding new reusable UI widgets to the packages/app_ui/ package.

[!NOTE] For details on mapping Figma designs, typography, HSL colors, spacing, and asset generation, refer to the Design-to-Code Skill.

1. Directory Structure

Widgets must be placed in packages/app_ui/lib/src/widgets/ by category:

packages/app_ui/lib/src/widgets/
├── buttons/
│   └── primary_button.dart    # Class name: YzPrimaryButton
├── layout/
│   └── web/
│       └── scaffold_web.dart  # Class name: YzScaffoldWeb

2. Implementation Rules

Follow these rules when implementing a widget in app_ui:

  • Naming: Class names must prefix with Yz (e.g. YzPrimaryButton). File names must be snake_case without yz_ prefix (e.g. primary_button.dart).
  • Generic Naming: Always use generic, domain-agnostic names for widgets. For example, name a button YzPrimaryButton rather than YzLoginButton, even if it is currently only used on a specific screen.
  • Web suffix: If a web variant exists for a shared concept, append Web (e.g., YzScaffoldWeb).
  • No Helper Functions: Do not use helper methods like _buildHeader(). Split components into private classes (e.g., _Header) within the same file (this applies to widgets inside app_ui, NOT feature views).
  • Externalize Text: Never hardcode user-facing strings in app_ui. Always pass them as parameters so the feature views can handle translations.
  • Configuration Models: If a widget has complex parameters, create a dedicated config class in the same file (e.g., YzPanelConfig).

2.1 Example Implementation

import 'package:flutter/material.dart';

/// Content card for displaying simple text.
///
/// ---
/// @UI: Card | Content
/// @Source: — | Status: manual
/// @Style: Bg: surface | Radius: md
/// @Layout: Padding: md
class YzCard extends StatelessWidget {
  const YzCard({
    required this.title,
    required this.onTap,
    super.key,
  });

  final String title;
  final VoidCallback onTap;

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
        padding: const EdgeInsets.all(AppSpacing.md),
        child: Text(title),
      ),
    );
  }
}

Read the full file on GitHub · 118 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. 2d ago First seen · 118 lines · 38 tokens per session scan A 01a755023a84

Subscribe to this mod's changes

create-ui-widget is a skill published in the GitHub repository anoopsg/agent_rules (2 stars, last pushed 1mo ago), licensed MIT. It adds 38 tokens to every session and 1,137 once invoked, about $0.0002 per session on Opus 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-08-31.

Related

Other skills, from other repositories

spawn-session

新しい detached な Claude Code Remote Control セッションを Herdr 内に起動し、Claude モバイルアプリのセッション一覧に出す。生きている任意のセッションから(多くは iPhone の Remote Control 越しに)呼んで、別プロジェクトの新規セッションを Mac に触れず立ち上げる。Use when the user says 「新しいセッション立てて」「AAP のセッション開いて/立ち上げて」「contemplative のセッション作って」「spawn a (new) session」「launch a remote control session」「start a…

shimo4228/claude-harness · 197 tokens

orca-emulator-android

Control an Android emulator / device from inside Orca using the orca CLI. Use for listing/booting AVDs, taps, swipes, typing, hardware buttons (incl. Back and Recents), rotation, app install/launch, runtime permissions, the accessibility tree, and logcat — driving a real adb-connected device or emulator.…

stablyai/orca · 104 tokens

android-tombstone-symbolication

Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app…

dotnet/skills · 176 tokens

git-safety

Git safety rules. INVOKE WHEN: git push, force push, git reset, git clean, destructive git, push force, reset hard. NEVER force push or do destructive git operations.

tamagui/tamagui · 42 tokens

dogfood

Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to dogfood, QA, exploratory test, find issues, bug hunt, or test this app on mobile.

callstack/agent-device · 55 tokens

release

Cut a sim-use release end-to-end. Use when the user runs /release or asks to "ship a release", "publish a version", "cut a release", or "release to homebrew". Drives scripts/local-release.sh; never reimplement its build/sign/tarball logic.

lycorp-jp/sim-use · 61 tokens