frontend-style

Defines frontend code style conventions for components, state, accessibility, and testing.

3|Updated May 2, 2026
One-click install
npx skills add https://github.com/JuanTrujilloDev/agent-config-template --skill frontend-style-juantrujillodev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: frontend-style
Source: https://github.com/JuanTrujilloDev/agent-config-template/tree/main/plugin/skills/frontend-style
Command: npx skills add https://github.com/JuanTrujilloDev/agent-config-template --skill frontend-style-juantrujillodev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Frontend codebases drift into inconsistent patterns when multiple contributors write components, hooks, and styles without a shared convention. This Skill gives the AI a concrete style contract so generated or reviewed frontend code follows the same formatting, organization, and accessibility rules every time. ## Core Features & Use Cases - Formatting and organization rules: Enforces 100-char line limits, prettier/eslint settings, single quotes, and a defined src/frontend directory structure for components, pages, lib, and styles. - Component and state conventions: One component per file, typed props, small components under 200 lines, no prop drilling beyond two levels, and proper server-state handling via data-fetching libraries. - Accessibility and anti-pattern checks: Requires accessible names, keyboard navigation, WCAG AA contrast, and flags anti-patterns like inline styles, useEffect for derived state, and direct DOM manipulation. - Use Case: When asking the AI to build a new search filter component, it will debounce input handlers, handle loading and error states, centralize API calls, and avoid scattered fetch calls automatically. ## Quick Start Review this React component against our frontend style conventions and fix any accessibility or state management issues.

Frequently Asked Questions about frontend-style

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

FAQPage Schema
How do I enforce consistent frontend code style across a team?▼

Define a shared style convention covering formatting, file organization, and component patterns, then apply it during code generation and review. This Skill encodes rules like 100-char lines, single quotes, one component per file, and a fixed src/frontend directory layout.

What are common React anti-patterns to avoid?▼

Key anti-patterns include using useEffect for derived state instead of useMemo, direct DOM manipulation via document.querySelector, inline styles instead of design tokens, and massive prop interfaces that should be split into smaller components.

How should API calls be organized in a frontend project?▼

Centralize API calls in a single lib/api or services module rather than scattering fetch calls across components. Handle 4xx/5xx responses with a shared error handler and use optimistic UI updates when safe.

Does this style guide work with any frontend framework?▼

The conventions are framework-agnostic and apply to React, Vue, or similar component-based frameworks using TypeScript or JavaScript. Specific rules like hooks and useMemo target React-style patterns, but organization and accessibility rules are universal.

When should state be lifted versus kept local in components?▼

Keep state local for local concerns and lift it only when shared between components. Avoid prop drilling beyond two levels by using context or composition, and delegate server state to data-fetching libraries like React Query or SWR.