skills/davidopdebeeck/ui-style-guide/SKILL.md
Frontend coding standards, component patterns, and design system for the Guessimate Angular UI. Reference when writing or reviewing frontend code.
npx skillsauth add aiskillstore/marketplace ui-style-guideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This document defines the coding standards, architectural patterns, and design system for the Guessimate Angular frontend.
We follow a Feature-Based directory structure. Code is organized by domain feature rather than technical type.
src/app/
├── core/ # Global singletons (Guards, Interceptors, Global Services)
├── layout/ # Layout components (Navigation, Footer, Shell)
├── features/ # Feature modules (Domain logic)
│ ├── home/
│ ├── session/
│ │ ├── components/ # Dumb/Presentational components
│ │ ├── pages/ # Smart/Container components (Routed)
│ │ ├── services/ # Feature-specific state/logic
│ │ └── models/ # Feature-specific types
│ └── ...
├── websocket/ # WebSocket infrastructure
└── shared/ # Shared utilities (Pipes, Directives, Generic UI)
session-page.component.ts, auth.service.ts).SessionPageComponent, AuthService).app- prefix, kebab-case (e.g., app-user-profile).user(), isLoading()).$ suffix (e.g., user$).standalone: true is default in v19+).
@Component({
selector: 'app-example',
imports: [CommonModule, RouterLink], // Explicit imports
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');
}
Use the new built-in Angular Control Flow syntax.
<!-- Good -->
@if (isLoading()) {
<app-spinner/>
} @else {
@for (item of items(); track item.id) {
<app-item [data]="item"/>
}
}
Prefer the inject() function over constructor injection for better type inference and cleaner code.
// Good
private readonly
route = inject(ActivatedRoute);
private readonly
store = inject(SessionStore);
// Avoid if possible
constructor(private
route: ActivatedRoute
)
{
}
signal() for primitive state.computed() for derived state and effect() sparingly for side effects.
@Injectable()
export class SessionStore {
// State
private readonly _state = signal<SessionState>(initialState);
// Selectors
readonly lobby = computed(() => this._state().lobby);
readonly connection = computed(() => this._state().connection);
// Actions
setLobby(lobby: Lobby) {
this._state.update(s => ({...s, lobby}));
}
}
We use Tailwind CSS 4 with a semantic color palette defined in styles.css.
p-4 not p-[16px]).dark: modifier for all color-related classes.The application uses a semantic naming convention mapped to Tailwind colors.
| Category | Semantic Name | Light Mode | Dark Mode | Usage |
|:------------------|:----------------|:--------------|:-----------------|:-------------------------------------|
| Background | background | gray-50 | gray-950 | Main application background |
| Surface | surface | white | gray-900 | Cards, modals, sections |
| Surface Alt | surface-alt | gray-100 | gray-800 | Secondary backgrounds, input fields |
| Primary | brand | blue-600 | blue-600 | Primary actions, buttons, highlights |
| Primary Muted | brand-muted | blue-50 | blue-900/30 | Selected states, light highlights |
| Success | success | emerald-500 | emerald-600 | Success states, confirmation |
| Success Muted | success-muted | emerald-50 | emerald-900/30 | Success backgrounds |
| Danger | danger | red-600 | red-600 | Errors, destructive actions |
| Danger Muted | danger-muted | red-50 | red-900/30 | Error backgrounds |
| Warning | warning | amber-500 | amber-600 | Warnings, pending states |
| Warning Muted | warning-muted | amber-50 | amber-900/30 | Warning backgrounds |
| Category | Light Mode | Dark Mode | Usage |
|:--------------|:-----------|:-----------|:-----------------------------------|
| Primary | gray-900 | white | Main headings and body text |
| Secondary | gray-500 | gray-400 | Subtitles, labels, secondary info |
| Muted | gray-400 | gray-500 | Disabled text, placeholders |
| Border | gray-200 | gray-800 | Standard dividers and card borders |
styles.cssColors are defined using CSS variables in the @theme block:
@theme {
--color-brand-600: var(--color-blue-600);
--color-surface-100: var(--color-stone-100);
/* ... */
}
Standard styling for content containers (like estimation cards, lists):
<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">
<!-- Content -->
</div>
bg-surface-100/60 (Light) / dark:bg-gray-900/40 (Dark)border border-surface-200 (Light) / dark:border-gray-800/60 (Dark)rounded-md (Standard)divide-y divide-surface-300 dark:divide-gray-800
<div class="flex flex-col gap-1">
<h2 class="text-2xl font-semibold leading-none text-gray-900 dark:text-white">Title</h2>
<span class="text-sm font-normal text-gray-600 dark:text-gray-400">Subtitle description</span>
</div>
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.