All skills
amanktyr avatar

/frontend

@4d299d3
by Aman Ktyramanktyr/tailor4 stars

Governs frontend development, UI components, React, Vue, Svelte, design system tokens, CSS, Tailwind, buttons, modals, forms, and responsive web performance optimization.

Use this Skill: https://skilld.dev/gh/amanktyr/tailor/frontend

This session only. Nothing lands on disk.

SKILL.md

≈45 tokens always: the name and description. ≈916 when used: this file.

Frontend Engineering Skill

Activate this skill when creating or modifying user interfaces, client components, styling systems, design tokens, or frontend state.

Operational Directive: Build responsive, accessible, and high-performance interfaces adhering strictly to the project's single design system.


1. Strict Negative Guardrail: Zero Unrequested Styling & Token Invariant

  • Zero Unrequested Styling Rule: NEVER add, alter, or restyle CSS, classes, colors, gradients, dark-mode themes, or animations unless visual/styling changes are explicitly requested by the user.
  • Logic/State Isolation: When implementing business logic, state management, API integration, or bugfixes, leave all styling attributes, classNames, and visual tags strictly untouched.
  • Inspect .ai/UI.md (or workspace manifests) first: Identify the established styling framework (Tailwind CSS, CSS Modules, Styled Components, Vanilla CSS, shadcn/ui).
  • Strict Single Framework Rule: Never import secondary styling frameworks (e.g. do not introduce Bootstrap, MUI, or Chakra if the project uses Tailwind CSS).
  • Zero Invented Tokens: Never invent ad-hoc hex codes, magic margins/paddings, or arbitrary animations. Always reuse existing project theme tokens.
  • Unstyled Fallback: If the project has no styling system and styling was not explicitly asked for, output clean, semantic, unstyled HTML. Never invent a custom CSS theme or inline styles unprompted.

2. Component Hierarchy & Separation of Concerns

Structure UI components using the Smart Container vs Presentational Component pattern:

┌────────────────────────────────────────────────────────┐
│ Smart / Container Component                            │
│ - Handles data fetching, URL query params, hooks       │
│ - Passes data and event callbacks to UI components     │
└───────────────────────────┬────────────────────────────┘
                            │
┌───────────────────────────▼────────────────────────────┐
│ Presentational / Dumb Component                        │
│ - Pure visual rendering, receives data via props       │
│ - Completely stateless or localized animation state    │
│ - High reusability across pages                        │
└────────────────────────────────────────────────────────┘

3. Performance & Core Web Vitals Optimization

  • Cumulative Layout Shift (CLS): Always set explicit width and height (or aspect-ratio) on images, videos, and embed frames to eliminate visual jank.
  • Largest Contentful Paint (LCP): Preload critical hero images and utilize modern formats (.webp, .avif).
  • Prevent Unnecessary Re-Renders:
    • Avoid defining inline object literals or inline arrow functions inside hot loop renders.
    • Utilize useMemo and useCallback judiciously on computationally heavy operations.
  • Loading & Error State Ergonomics: Every async component must gracefully handle 4 distinct states:
    1. Initial Loading (Skeleton placeholder, no layout shift)
    2. Data Rendered (Normal view)
    3. Empty State (Friendly message with actionable CTA)
    4. Error State (Clear feedback with retry button)

Source: SKILL.md on GitHub

No alerts23d3 checks · Risk SAFE
  • Gen Agent Trust Hub23d

    The skill provides guidelines and guardrails for frontend development, focusing on UI consistency, component architecture, and performance optimization. No malicious patterns or security risks were identified.

  • Socket23d

    No alerts

  • Snyk23d

    Risk: LOW · No issues

Signed by skilld at 4d299d3. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 4 weeks ago

README badge

README badge for amanktyr/tailor/frontend