tailwindcss
Tailwind CSS utility-first styling for JARVIS UI components
What this skill does
# Tailwind CSS Development Skill
> **File Organization**: This skill uses split structure. See `references/` for advanced patterns.
## 1. Overview
This skill provides Tailwind CSS expertise for styling the JARVIS AI Assistant interface with utility-first CSS, creating consistent and maintainable HUD designs.
**Risk Level**: LOW - Styling framework with minimal security surface
**Primary Use Cases**:
- Holographic UI panel styling
- Responsive HUD layouts
- Animation utilities for transitions
- Custom JARVIS theme configuration
## 2. Core Responsibilities
### 2.1 Fundamental Principles
1. **TDD First**: Write component tests before styling implementation
2. **Performance Aware**: Optimize CSS output size and rendering performance
3. **Utility-First**: Compose styles from utility classes, extract components when patterns repeat
4. **Design System**: Define JARVIS color palette and spacing in config
5. **Responsive Design**: Mobile-first with breakpoint utilities
6. **Dark Mode Default**: HUD is always dark-themed
7. **Accessibility**: Maintain sufficient contrast ratios
## 3. Implementation Workflow (TDD)
### 3.1 TDD Process for Styled Components
Follow this workflow for every styled component:
#### Step 1: Write Failing Test First
```typescript
// tests/components/HUDPanel.test.ts
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'
import HUDPanel from '~/components/HUDPanel.vue'
describe('HUDPanel', () => {
it('renders with correct JARVIS theme classes', () => {
const wrapper = mount(HUDPanel, {
props: { title: 'System Status' }
})
const panel = wrapper.find('[data-testid="hud-panel"]')
expect(panel.classes()).toContain('bg-jarvis-bg-panel/80')
expect(panel.classes()).toContain('border-jarvis-primary/30')
expect(panel.classes()).toContain('backdrop-blur-sm')
})
it('applies responsive grid layout', () => {
const wrapper = mount(HUDPanel)
const grid = wrapper.find('[data-testid="panel-grid"]')
expect(grid.classes()).toContain('grid-cols-1')
expect(grid.classes()).toContain('md:grid-cols-2')
expect(grid.classes()).toContain('lg:grid-cols-3')
})
it('shows correct status indicator colors', async () => {
const wrapper = mount(HUDPanel, {
props: { status: 'active' }
})
const indicator = wrapper.find('[data-testid="status-indicator"]')
expect(indicator.classes()).toContain('bg-jarvis-primary')
expect(indicator.classes()).toContain('animate-pulse')
await wrapper.setProps({ status: 'error' })
expect(indicator.classes()).toContain('bg-jarvis-danger')
})
it('maintains accessibility focus styles', () => {
const wrapper = mount(HUDPanel)
const button = wrapper.find('button')
expect(button.classes()).toContain('focus:ring-2')
expect(button.classes()).toContain('focus:outline-none')
})
})
```
#### Step 2: Implement Minimum to Pass
```vue
<!-- components/HUDPanel.vue -->
<template>
<div
data-testid="hud-panel"
class="bg-jarvis-bg-panel/80 border border-jarvis-primary/30 backdrop-blur-sm rounded-lg p-4"
>
<div
data-testid="panel-grid"
class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"
>
<slot />
</div>
<span
data-testid="status-indicator"
:class="statusClasses"
/>
<button class="focus:ring-2 focus:outline-none focus:ring-jarvis-primary">
Action
</button>
</div>
</template>
<script setup lang="ts">
import { computed } from 'vue'
const props = defineProps<{
title?: string
status?: 'active' | 'warning' | 'error' | 'inactive'
}>()
const statusClasses = computed(() => ({
'bg-jarvis-primary animate-pulse': props.status === 'active',
'bg-jarvis-warning': props.status === 'warning',
'bg-jarvis-danger': props.status === 'error',
'bg-gray-500': props.status === 'inactive'
}))
</script>
```
#### Step 3: Refactor if Needed
Extract repeated patterns to @apply directives:
```css
/* assets/css/components.css */
@layer components {
.hud-panel {
@apply bg-jarvis-bg-panel/80 border border-jarvis-primary/30 backdrop-blur-sm rounded-lg p-4;
}
.hud-grid {
@apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4;
}
}
```
#### Step 4: Run Full Verification
```bash
# Run all style-related tests
npm run test -- --grep "HUDPanel"
# Check for unused CSS
npx tailwindcss --content './components/**/*.vue' --output /dev/null
# Verify build size
npm run build && ls -lh .output/public/_nuxt/*.css
```
## 4. Performance Patterns
### 4.1 Purge Optimization
```javascript
// tailwind.config.js
// Good: Specific content paths
export default {
content: [
'./components/**/*.{vue,js,ts}',
'./layouts/**/*.vue',
'./pages/**/*.vue',
'./composables/**/*.ts'
]
}
// Bad: Too broad, includes unused files
export default {
content: ['./src/**/*'] // Includes tests, stories, etc.
}
```
### 4.2 JIT Mode Efficiency
```javascript
// Good: Let JIT generate only used utilities
export default {
mode: 'jit', // Default in v3+
theme: {
extend: {
// Only extend what you need
colors: {
jarvis: {
primary: '#00ff41',
secondary: '#0891b2'
}
}
}
}
}
// Bad: Defining unused variants
export default {
variants: {
extend: {
backgroundColor: ['active', 'group-hover', 'disabled'] // May not use all
}
}
}
```
### 4.3 @apply Extraction Strategy
```vue
<!-- Good: Extract when pattern repeats 3+ times -->
<style>
@layer components {
.btn-jarvis {
@apply px-4 py-2 rounded font-medium transition-all duration-200
focus:outline-none focus:ring-2 focus:ring-offset-2;
}
}
</style>
<!-- Bad: @apply for single-use styles -->
<style>
.my-unique-element {
@apply p-4 m-2 text-white; /* Just use utilities in template */
}
</style>
```
### 4.4 Responsive Breakpoints Efficiency
```vue
<!-- Good: Mobile-first, minimal breakpoints -->
<div class="p-2 md:p-4 lg:p-6">
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4">
</div>
<!-- Bad: Redundant breakpoint definitions -->
<div class="p-2 sm:p-2 md:p-4 lg:p-4 xl:p-6">
<div class="grid grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-2">
</div>
```
### 4.5 Dark Mode Efficiency
```javascript
// Good: Single dark mode strategy (JARVIS is always dark)
export default {
darkMode: 'class', // Use 'class' for explicit control
theme: {
extend: {
colors: {
jarvis: {
bg: {
dark: '#0a0a0f', // Define dark colors directly
panel: '#111827'
}
}
}
}
}
}
// Bad: Light/dark variants when app is always dark
<div class="bg-white dark:bg-gray-900"> // Unnecessary light styles
```
### 4.6 Animation Performance
```javascript
// Good: GPU-accelerated properties
export default {
theme: {
extend: {
keyframes: {
glow: {
'0%, 100%': { opacity: '0.5' }, // opacity is GPU-accelerated
'50%': { opacity: '1' }
}
}
}
}
}
// Bad: Layout-triggering properties
keyframes: {
resize: {
'0%': { width: '100px' }, // Triggers layout recalc
'100%': { width: '200px' }
}
}
```
## 5. Technology Stack & Versions
### 5.1 Recommended Versions
| Package | Version | Notes |
|---------|---------|-------|
| tailwindcss | ^3.4.0 | Latest with JIT mode |
| @nuxtjs/tailwindcss | ^6.0.0 | Nuxt integration |
| tailwindcss-animate | ^1.0.0 | Animation utilities |
### 5.2 Configuration
```javascript
// tailwind.config.js
export default {
content: [
'./components/**/*.{vue,js,ts}',
'./layouts/**/*.vue',
'./pages/**/*.vue',
'./composables/**/*.ts',
'./plugins/**/*.ts'
],
darkMode: 'class',
theme: {
extend: {
colors: {
jarvis: {
primary: '#00ff41',
secondary: '#0891b2',
warning: '#f59e0b',
danger: '#ef4444',
bg: {
dark: '#0a0a0f',
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.