Communitygithub.com

ComeOnOliver/skillshub

Estándares de codificación frontend, patrones de componentes y sistema de diseño para la interfaz Angular de Guessimate. Útil al escribir o revisar código frontend.

¿Qué es skillshub?

Este skill define los estándares de codificación, patrones arquitectónicos y sistema de diseño para el frontend Angular de Guessimate. Es útil para desarrolladores que escriben o revisan código frontend, ya que proporciona pautas claras sobre estructura de proyectos, convenciones de nomenclatura, uso de componentes independientes, gestión de estado con Signals y RxJS, y un sistema de diseño basado en Tailwind CSS 4 con una paleta de colores semántica. Está pensado para plataformas que soportan skills de IA como Claude Code, Cursor o Codex. El skill funciona como una guía de referencia rápida que el asistente de IA consulta para asegurar que el código generado o revisado siga las convenciones del proyecto, evitando inconsistencias y mejorando la mantenibilidad.

Compatible con~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/aiskillstore/marketplace/davidopdebeeck/ui-style-guide

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

Guía de Estilo y Convenciones de Codificación Frontend

Este documento define los estándares de codificación, patrones arquitectónicos y el sistema de diseño para el frontend Angular de Guessimate.

1. Stack Tecnológico

  • Framework: Angular 20+
  • Estilado: Tailwind CSS 4
  • Gestión de Estado: Angular Signals y RxJS
  • Sistema de Compilación: Angular CLI (Esbuild)

2. Estructura del Proyecto

Seguimos una estructura de directorios Basada en Funcionalidades. El código se organiza por dominio funcional en lugar de por tipo técnico.

src/app/
├── core/            # Singletons globales (Guards, Interceptors, Servicios Globales)
├── layout/          # Componentes de diseño (Navegación, Pie de página, Shell)
├── features/        # Módulos de funcionalidad (Lógica de dominio)
│   ├── home/
│   ├── session/
│   │   ├── components/  # Componentes tontos/de presentación
│   │   ├── pages/       # Componentes inteligentes/contenedores (Enrutados)
│   │   ├── services/    # Estado/lógica específica de la funcionalidad
│   │   └── models/      # Tipos específicos de la funcionalidad
│   └── ...
├── websocket/       # Infraestructura WebSocket
└── shared/          # Utilidades compartidas (Pipes, Directivas, UI genérica)

Convenciones de Nomenclatura

  • Archivos: Kebab-case (ej., session-page.component.ts, auth.service.ts).
  • Clases: PascalCase (ej., SessionPageComponent, AuthService).
  • Selectores: Prefijo app-, kebab-case (ej., app-user-profile).
  • Signals: Sin sufijo, nombre descriptivo sustantivo/verbo (ej., user(), isLoading()).
  • Observables: Sufijo $ (ej., user$).

3. Estándares de Componentes

Definición

  • Usar Componentes Independientes (standalone: true es el valor predeterminado en v19+).
  • Preferir Plantillas en Línea para la mayoría de los componentes, manteniendo la lógica y la vista juntas.
  • Evitar archivos CSS externos; usar clases utilitarias de Tailwind CSS directamente en la plantilla.

@Component({
    selector: 'app-example',
    imports: [CommonModule, RouterLink], // Importaciones explícitas
    template: `
    <div class="p-4 bg-surface-100 rounded-lg">
      <h1 class="text-2xl font-bold text-gray-900">{{ title() }}</h1>
    </div>
  `
})
export class ExampleComponent {
    title = signal('Hello World');
}

Flujo de Control

Usar la nueva sintaxis de flujo de control integrada de Angular.

<!-- Bien -->
@if (isLoading()) {
<app-spinner/>
} @else {
@for (item of items(); track item.id) {
<app-item [data]="item"/>
}
}

Inyección de Dependencias

Preferir la función inject() sobre la inyección por constructor para una mejor inferencia de tipos y código más limpio.

// Bien
private readonly
route = inject(ActivatedRoute);
private readonly
store = inject(SessionStore);

// Evitar si es posible
constructor(private
route: ActivatedRoute
)
{
}

4. Gestión de Estado

  • Estado Local: Usar signal() para estado primitivo.
  • Estado Compartido: Usar Signal Stores (Servicios que usan Signals) proporcionados al nivel adecuado (Raíz o Componente).
  • Datos Reactivos: Usar computed() para estado derivado y effect() con moderación para efectos secundarios.

@Injectable()
export class SessionStore {
    // Estado
    private readonly _state = signal<SessionState>(initialState);

    // Selectores
    readonly lobby = computed(() => this._state().lobby);
    readonly connection = computed(() => this._state().connection);

    // Acciones
    setLobby(lobby: Lobby) {
        this._state.update(s => ({...s, lobby}));
    }
}

5. Estilado y Sistema de Diseño

Usamos Tailwind CSS 4 con una paleta de colores semántica definida en styles.css.

Reglas de Uso

  1. Utility-First: Escribir clases directamente en HTML.
  2. Sin Números Mágicos: Usar valores del tema (ej., p-4 no p-[16px]).
  3. Modo Oscuro: Usar el modificador dark: para todas las clases relacionadas con colores.

Paleta de Colores

La aplicación utiliza una convención de nomenclatura semántica mapeada a colores de Tailwind.

Colores Principales

CategoríaNombre SemánticoModo ClaroModo OscuroUso
Fondobackgroundgray-50gray-950Fondo principal de la aplicación
Superficiesurfacewhitegray-900Tarjetas, modales, secciones
Superficie Altsurface-altgray-100gray-800Fondos secundarios, campos de entrada
Principalbrandblue-600blue-600Acciones principales, botones, resaltados
Principal Sutilbrand-mutedblue-50blue-900/30Estados seleccionados, resaltados suaves
Éxitosuccessemerald-500emerald-600Estados de éxito, confirmación
Éxito Sutilsuccess-mutedemerald-50emerald-900/30Fondos de éxito
Peligrodangerred-600red-600Errores, acciones destructivas
Peligro Sutildanger-mutedred-50red-900/30Fondos de error
Advertenciawarningamber-500amber-600Advertencias, estados pendientes
Advertencia Sutilwarning-mutedamber-50amber-900/30Fondos de advertencia

Tipografía y Bordes

CategoríaModo ClaroModo OscuroUso
Principalgray-900whiteEncabezados principales y texto del cuerpo
Secundariogray-500gray-400Subtítulos, etiquetas, información secundaria
Sutilgray-400gray-500Texto deshabilitado, marcadores de posición
Bordegray-200gray-800Divisores estándar y bordes de tarjeta

Implementación en styles.css

Los colores se definen usando variables CSS en el bloque @theme:

@theme {
    --color-brand-600: var(--color-blue-600);
    --color-surface-100: var(--color-stone-100);
    /* ... */
}

6. Patrones Comunes de Componentes

Tarjetas y Contenedores

Estilado estándar para contenedores de contenido (como tarjetas de estimación, listas):


<div class="flex flex-col bg-surface-100/60 border border-surface-200 dark:bg-gray-900/40 dark:border-gray-800/60 rounded-md shadow-sm">
    <!-- Contenido -->
</div>
  • Fondo: bg-surface-100/60 (Claro) / dark:bg-gray-900/40 (Oscuro)
  • Borde: border border-surface-200 (Claro) / dark:border-gray-800/60 (Oscuro)
  • Redondeo: rounded-md (Estándar)
  • Divisores: divide-y divide-surface-300 dark:divide-gray-800

Encabezados de Tipografía


<div class="flex flex-col gap-1">
    <h2 class="text-2xl font-semibold leading-none text-gray-900 dark:text-white">Título</h2>
    <span class="text-sm font-normal text-gray-600 dark:text-gray-400">Descripción del subtítulo</span>
</div>

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

Skills relacionados