AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Create Ui Widget

skill-anoopsg-agent-rules-create-ui-widget · by anoopsg

>

No reviews yet
0 installs
22 views
0.0% view→install

Install

$ agentstack add skill-anoopsg-agent-rules-create-ui-widget

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-anoopsg-agent-rules-create-ui-widget)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Create Ui Widget? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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](design-to-code.md).

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),
      ),
    );
  }
}

3. Exports

Always export your new widget in the root library files:

  • Mobile/Shared widgets: packages/app_ui/lib/app_ui.dart
  • Web-specific widgets: packages/app_ui/lib/app_ui_web.dart

4. Widget Annotations (Code-as-Truth)

We do not use a centralized registry.md. Instead, every reusable widget must include a strict 4-line doc-comment block directly above the class definition. This allows AI agents to rapidly filter and deduplicate widgets across the entire codebase using grep_search.

The Annotation Schema

The block must be separated by a horizontal rule (---) and consists of 4 grouped @ tags:

  1. @UI: Category and Intent (e.g., Button | Primary CTA).
  2. @Source: Figma breadcrumb and sync status (e.g., Login > Hero > CTA | Status: synced).
  3. @Style: Colors and shapes (Bg, Text, Radius, Border, Shadow).
  4. @Layout: Spacing and structure (Padding, Size, Icon).

Rules

  1. Omit Defaults: To keep the footprint minimal, only include properties that are actively styled. If a widget has no border or shadow, do not write Border: none. Omit them entirely.
  2. 80-Character Limit: The grouped lines must not exceed 80 characters. If a line is too long, wrap it to a new line with the same tag prefix.

Dictionary Keys

Use exact keys and tokens (e.g., Bg: primary | Radius: pill):

  • Bg: Semantic color (e.g., primary, surface, transparent)
  • Text: Typography token (e.g., labelLarge, bodyMedium)
  • Radius: Shape (e.g., sm, md, pill)
  • Border: Outline style (e.g., outline, error)
  • Shadow: Elevation (e.g., sm, md)
  • Padding: Spacing (e.g., sm, md, lg)
  • Size: Layout behavior (e.g., expanded, shrink, fixed)
  • Icon: Presence (e.g., leading, trailing, only)

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.