Contract
- Input: brand system, component library, design requirements, and team conventions.
- Output: styling architecture with tool choices, token definitions, and component styling strategy.
- Scope: stay within the skill's declared boundaries; do not broaden without explicit direction.
- Rule: documented standards override defaults; explicit project rules take precedence.
- Rule: if blocked by missing context or dependencies, surface the blocker before proceeding.
Provenance
| Question |
Answer |
| What is the source of truth? |
The user's request, originating spec/issue, and the skill's declared outputs |
| What is in scope? |
Work covered by the skill's acceptance criteria and completion rules |
| What is explicitly out of scope? |
Files, behaviors, and decisions outside the skill's declared boundary |
| Who or what consumes this artifact afterward? |
The next skill in the workflow or the user |
| What evidence proves it is done? |
Completion criteria met, artifact saved, validation passed |
| What risk remains? |
Subjective judgment calls, missing context, or external dependency failures |
Artifact
Emit StylingArtifact as both:
- JSON:
.agents/skills/platform/artifacts/styling/{identifier}.json
- Markdown view: same filename with
.md extension
Styling
Use this skill when designing the styling architecture for a frontend project. Record the execution traceId and link the artifact to the originating issue for review replay. — utility-first CSS, CSS modules, component variants, design tokens, and theme systems.
Why
Styling is the visual interface contract. Making token, variant, and theme decisions explicit prevents drift, accessibility regressions, and bundle bloat.
Process
1. Choose styling approach
- Evaluate utility-first (Tailwind v4, Panda CSS), CSS modules, CSS-in-JS, or hybrid.
- Consider team familiarity, bundle size, runtime cost, and DX.
- Document the chosen approach and why alternatives were rejected.
Completion criterion: styling approach selected with rationale.
2. Define design tokens
- Catalog tokens: colors (semantic and primitive), spacing scale, typography scale, shadows, radii, z-index, motion.
- Choose token format (CSS custom properties, JSON, Style Dictionary) and build pipeline.
- Define light/dark mode and theme switching strategy.
Completion criterion: token catalog defined with format and theme strategy.
3. Configure build tooling
- Set up PostCSS, Tailwind v4 config, Panda CSS config, or CSS modules pipeline.
- Define content sources for purging unused styles.
- Configure source maps, minification, and vendor prefixing.
Completion criterion: build tooling configured with content sources documented.
4. Design component variants with CVA
- Identify components with visual variants (size, intent, shape, density).
- Implement variant API using class-variance-authority or framework equivalent.
- Document compound variant rules and slot patterns.
Completion criterion: variant API designed for key components with type safety noted.
5. Plan theming and responsive behavior
- Define breakpoint strategy and responsive token variants.
- Plan dark mode, high contrast mode, and forced-colors support.
- Document CSS containment and performance considerations.
Completion criterion: theme, responsive, and accessibility styling strategy documented.
Rules
- Rule: keep design tokens semantic; avoid hard-coded values in component styles.
- Rule: use utility classes for one-off styling; reserve component classes for repeated patterns.
- Rule: scope styles to prevent leakage in CSS modules or use utility discipline in utility-first.
- Rule: document the style decision authority and change process for the token system.
- Rule: verify contrast ratios for text and interactive elements in all themes.
- Rule: avoid deep selector nesting; keep specificity flat and predictable.
Completion
- the skill's completion criteria are explicitly checked
- the artifact is saved and validated
- any blockers or skipped validations are documented
- the next consumer is identified or the work is handed off
@include .agents/skills/platform/contract-base.xml
1---2name: "styling"3category: "frontend"4maturity: "stable"5version: "1"6description: "Modern CSS (Tailwind v4, Panda CSS, CSS modules, CVA, design tokens)."7license: "MIT"8capabilities:9 - apply styling methods within explicit frontend boundaries10 - analyze modern css (tailwind v4, panda css, css modules, cva, design tokens) with assumptions, constraints, and failure modes11 - produce and validate a frontend artifact with evidence, decisions, and next steps12inputs:13 - type: object14 description: Brand system, component library, design requirements, and team conventions.15outputs:16 - type: object17 description: Styling architecture, token definitions, component variant strategy, and theme plan.18sideEffects: []19dependencies: []20stopCondition: "Styling design complete; artifact saved; completion criteria checked."21risk: "low"22trustTier: "1"23maxIterations: "6"24promptVersion: "2.0"25artifactType: "frontend"26modelTier: "reasoning"27evaluators: ["behavioral", "regression"]28fixturesPath: ""29diataxis: "how-to"30tags: ["frontend"]31compatibility: []32approvalRequired: "false"33approvalFor: []34metadata:35 source: https://skillmd.com/skills/quantumquirkxyz/styling36---3738## Contract3940- Input: brand system, component library, design requirements, and team conventions.41- Output: styling architecture with tool choices, token definitions, and component styling strategy.42- Scope: stay within the skill's declared boundaries; do not broaden without explicit direction.43- Rule: documented standards override defaults; explicit project rules take precedence.44- Rule: if blocked by missing context or dependencies, surface the blocker before proceeding.4546## Provenance4748| Question | Answer |49|---|---|50| What is the source of truth? | The user's request, originating spec/issue, and the skill's declared outputs |51| What is in scope? | Work covered by the skill's acceptance criteria and completion rules |52| What is explicitly out of scope? | Files, behaviors, and decisions outside the skill's declared boundary |53| Who or what consumes this artifact afterward? | The next skill in the workflow or the user |54| What evidence proves it is done? | Completion criteria met, artifact saved, validation passed |55| What risk remains? | Subjective judgment calls, missing context, or external dependency failures565758## Artifact5960Emit `StylingArtifact` as both:61- JSON: `.agents/skills/platform/artifacts/styling/{identifier}.json`62- Markdown view: same filename with `.md` extension636465# 66# 67# Styling6869Use this skill when designing the styling architecture for a frontend project. Record the execution traceId and link the artifact to the originating issue for review replay. — utility-first CSS, CSS modules, component variants, design tokens, and theme systems.707172## Why7374Styling is the visual interface contract. Making token, variant, and theme decisions explicit prevents drift, accessibility regressions, and bundle bloat.7576## Process7778### 1. Choose styling approach79- Evaluate utility-first (Tailwind v4, Panda CSS), CSS modules, CSS-in-JS, or hybrid.80- Consider team familiarity, bundle size, runtime cost, and DX.81- Document the chosen approach and why alternatives were rejected.8283**Completion criterion:** styling approach selected with rationale.8485### 2. Define design tokens86- Catalog tokens: colors (semantic and primitive), spacing scale, typography scale, shadows, radii, z-index, motion.87- Choose token format (CSS custom properties, JSON, Style Dictionary) and build pipeline.88- Define light/dark mode and theme switching strategy.8990**Completion criterion:** token catalog defined with format and theme strategy.9192### 3. Configure build tooling93- Set up PostCSS, Tailwind v4 config, Panda CSS config, or CSS modules pipeline.94- Define content sources for purging unused styles.95- Configure source maps, minification, and vendor prefixing.9697**Completion criterion:** build tooling configured with content sources documented.9899### 4. Design component variants with CVA100- Identify components with visual variants (size, intent, shape, density).101- Implement variant API using class-variance-authority or framework equivalent.102- Document compound variant rules and slot patterns.103104**Completion criterion:** variant API designed for key components with type safety noted.105106### 5. Plan theming and responsive behavior107- Define breakpoint strategy and responsive token variants.108- Plan dark mode, high contrast mode, and forced-colors support.109- Document CSS containment and performance considerations.110111**Completion criterion:** theme, responsive, and accessibility styling strategy documented.112113## Rules114115- Rule: keep design tokens semantic; avoid hard-coded values in component styles.116- Rule: use utility classes for one-off styling; reserve component classes for repeated patterns.117- Rule: scope styles to prevent leakage in CSS modules or use utility discipline in utility-first.118- Rule: document the style decision authority and change process for the token system.119- Rule: verify contrast ratios for text and interactive elements in all themes.120- Rule: avoid deep selector nesting; keep specificity flat and predictable.121122## Completion123124- the skill's completion criteria are explicitly checked125- the artifact is saved and validated126- any blockers or skipped validations are documented127- the next consumer is identified or the work is handed off128---129@include .agents/skills/platform/contract-base.xml