Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/anoopsg/agent_rulesnpx agentmods add skills/anoopsg/agent_rules/create-ui-widgetWrote 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.
[](https://agentmods.dev/skills/anoopsg/agent_rules/create-ui-widget)<a href="https://agentmods.dev/skills/anoopsg/agent_rules/create-ui-widget"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/create-ui-widget/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.
<a href="https://agentmods.dev/skills/anoopsg/agent_rules/create-ui-widget"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/create-ui-widget.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00057 | $0.01594 |
| Opus 5.5 | $0.00023 | $0.00638 |
| Sonnet 5.5 | $0.00011 | $0.00319 |
| Haiku 4.5 | $0.00006 | $0.00159 |
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 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.
How it starts
The opening of the file, as written. The whole thing — 136 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; web-only widgets go under packages/app_ui/lib/src/widgets/web/:
packages/app_ui/lib/src/widgets/<category>/<snake_name>.dart
packages/app_ui/lib/src/widgets/web/<category>/<snake_name>_web.dart
For example, packages/app_ui/lib/src/widgets/buttons/primary_button.dart holds PrimaryButton. List the existing categories with ls packages/app_ui/lib/src/widgets/.
2. Implementation Rules
Follow these rules when implementing a widget in app_ui:
- Naming: Class names have no prefix (e.g.
PrimaryButton). If a name clashes with a Material widget, prefix it withApp(e.g.AppScaffold). File names must besnake_case(e.g.primary_button.dart). - Generic Naming: Always use generic, domain-agnostic names for widgets. For example, name a button
PrimaryButtonrather thanLoginButton, 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.,AppScaffoldWeb). - No Helper Functions: Do not use helper methods like
_buildHeader(). Split components into private classes (e.g.,_Header) within the same file. For what belongs inapp_uiversus a feature view, see the view composition rule in the Feature Creation Skill (§3.5). - Default Sizes: Default dimensions (height, width, etc.) are constructor
parameters with their defaults set in the constructor, not private
constants outside the class (e.g., avoid
const _headerHeight = 295.0;). - Externalize Text: Never hardcode user-facing strings in
app_ui. Always pass them as parameters so the feature views can handle translations. This includes formatted values (dates, counts) and screen-reader labels: take them preformatted. - Configuration Models: If a widget has complex parameters, create a
dedicated
<Widget>Configclass in the same file (e.g.,NotificationTileConfiginpackages/app_ui/lib/src/widgets/tiles/notification_tile.dart). The feature builds it in an extension on its model that receivescontextand preformats every label (e.g.toTileConfiginlib/src/features/notifications/view/notification_tile_config.dart). - Accessibility: Every swipe or long-press action also gets a
Semanticscustom action (customSemanticsActions), so screen readers can trigger it. - RTL: Use directional APIs (
EdgeInsetsDirectional,AlignmentDirectional,PositionedDirectional), never left/right. - Reuse Primitives: Compose existing
app_uiprimitives instead of re-creating them (e.g.Loader, neverCircularProgressIndicator).
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.
- 22d ago Changed · +20 lines · +19 tokens per session 2e81f03c8aee
- 1mo ago Changed · +2 lines 57b6d07cea89
- 1mo ago Changed · +1 lines 5d86fa5c6fb8
- 1mo ago Changed · -5 lines afe412393aaa
- 3mo ago First seen · 118 lines · 38 tokens per session scan A 01a755023a84
create-ui-widget is a skill published in the GitHub repository anoopsg/agent_rules (2 stars, last pushed 23d ago), licensed MIT. It adds 57 tokens to every session and 1,594 once invoked, about $0.0002 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-08-31.
create-ui-widget compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| create-ui-widgetanoopsg/agent_rules | Skill | 2 | 23d ago | MIT | A | 57 | Claude Code, Codex |
| web-design-guidelinesAsyrafHussin/agent-skills | Skill | 111 | today | MIT | A | 71 | Claude Code |
| ui-craftafaraha8403/balakit | Skill | 1 | 9d ago | MIT | A | 137 | Claude Code |
| marketing-psychologyafaraha8403/balakit | Skill | 1 | 9d ago | MIT | A | 106 | Claude Code |
| webgl-holographic-foilnexu-io/open-design | Skill | 110k | today | Apache-2.0 | A | 41 | Claude Code, Codex |
| html-ppt-hermes-cyber-terminalnexu-io/open-design | Skill | 110k | today | Apache-2.0 | A | 53 | Claude Code, Codex |
| html-ppt-taste-brutalistnexu-io/open-design | Skill | 110k | today | Apache-2.0 | A | 78 | Claude Code, Codex |