ankyr-ui

Guides reuse-driven component, hook, and style extraction for accessible responsive web UI architecture.

1|Updated May 21, 2026
One-click install
npx skills add https://github.com/GuyErreich/AI_Agents --skill ankyr-ui-guyerreich
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ankyr-ui
Source: https://github.com/GuyErreich/AI_Agents/tree/main/plugins/ankyr-web/skills/ankyr-ui
Command: npx skills add https://github.com/GuyErreich/AI_Agents --skill ankyr-ui-guyerreich

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Web UI codebases accumulate duplicated JSX shells, mixed-concern components, and inaccessible interactive elements. This Skill enforces a consistent component structure so teams reuse primitives, separate data from views, and keep responsive variants maintainable. ## Core Features & Use Cases - Reuse-first extraction: Defines triggers for extracting repeated JSX shells into shared components, state orchestration into hooks, and utility-class chains into named style classes. - Responsive variant structure: Provides a folder contract (common/, <domain>/common/, mobile/, desktop/) with thin media-query selectors so viewport layouts never duplicate base logic. - Accessibility enforcement: Requires semantic interactive elements (<button>, <a>), aria labels for icon-only controls, and keyboard focus support instead of click handlers on <div> or <span>. - Use Case: When refactoring a React feature where the same card layout appears on mobile and desktop, load the responsive-variants reference to split shared logic into common/ and keep only layout composition in each viewport folder. ## Quick Start Ask the agent to review or refactor a React component using the ankyr-ui skill to extract shared primitives and fix accessibility issues.

Frequently Asked Questions about ankyr-ui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure React components for mobile and desktop variants?▼

Place shared shells and controls in a common folder, then create mobile and desktop folders containing only layout composition. Add a thin selector component at the feature root that picks the variant via a media-query hook, and never duplicate base logic between variants.

When should I extract a shared component or hook in React?▼

Extract when the same JSX shell, state/effect orchestration, or utility-class chain appears in two or more places, or when a component mixes data, layout, and interaction concerns. Extraction should happen in the same change that touches the duplication.

Why is onClick on a div an accessibility problem?▼

Divs and spans are not keyboard-focusable or activatable via Enter or Space, so keyboard and screen-reader users cannot reach them. Use semantic elements like button for actions and anchor tags for navigation, which provide focus and activation behavior natively.

What headless UI libraries work with custom styled components?▼

Radix primitives (Dialog, Tabs, Select, Toast) and React Aria provide accessible behavior like focus traps and roving focus that you wrap with project styling. The UI layer owns structure and composition while motion and dismiss timing belong to UX concerns.

When should I not create a wrapper component?▼

Avoid pass-through wrappers that only rename a div. Each wrapper must justify itself as a layout boundary, semantic boundary, state boundary, or scroll boundary; otherwise compose existing primitives directly.