stolinski/s-stack/graffiti-best-practices
- community
Checking that the SKILL.md file is still in the repository.
Use when generating or refactoring Graffiti UI markup so output is class-first, semantic, accessible, responsive, and aligned with current Graffiti capabilities.
Install
npx vskill@latest install stolinski/s-stack/graffiti-best-practicesSKILL.md
Graffiti Best Practices
Generate high-quality Graffiti markup using current library constraints.
Graffiti is the baseline design layer when this skill is active: it provides the default system for elements, layout primitives, utilities, components, and color/theme tokens.
This skill extends Graffiti patterns; it does not create a parallel styling system.
This skill is strict about class-first composition, minimal inline style usage, semantic HTML, and repeatable quality checks.
It is also strict about template-first adaptation: when a matching hosted template baseline exists, start from that template and customize it.
Quality bar: passing the markup contract is necessary but not sufficient. Output must also clear an aesthetic bar (voice, density, imagery, restraint). Markup that satisfies every contract check but ships with AI-shaped content (generic copy, decorative gradients, invented SVG icons, fake numbers, emoji-as-icons) still fails. See references/AESTHETIC_GUIDE.md.
Audience: developers using Graffiti in real applications and websites.
Package Structure
SKILL.md- activation rules, boundaries, and execution workflowreferences/OUTPUT_CONTRACT.md- required response structure and scoring gatesreferences/GRAFFITI_SYSTEM.md- Graffiti identity, token/variable model, and source-of-truth lookup rulesreferences/COMPONENT_INTENT_MATRIX.md- role boundaries for core components (use-when, do-not-use, fallback)references/CANONICAL_SNIPPETS.md- critical pattern snippets that must be used as first-choice baselinesreferences/RECIPES_LAYOUTS.md- page shell and layout recipesreferences/RECIPES_SECTIONS.md- section-level recipes by intentreferences/RECIPES_COMPONENTS.md- component-level recipe snippetsreferences/ANTI_PATTERNS.md- failure mode catalog and detection heuristicsreferences/RECOVERY_TRANSFORMS.md- deterministic rewrite transformsreferences/EXAMPLES.md- prompt/response behavior examplesreferences/TROUBLESHOOTING.md- ambiguous prompt handling and recovery guidancereferences/AESTHETIC_GUIDE.md- taste / voice / density / imagery / anti-slop rules (output quality)references/THEMING_AND_TOKENS.md- color-scheme and opaque-scale gotchas, theme override chainreferences/MOBILE_AND_CONTAINERS.md- container queries vs media queries, drawer pattern, dvh + safe-areareferences/CHEAT_SHEET.md- fast "I want X, use Y" lookup
Trigger Conditions
Activate this skill when the request includes one or more of these signals:
- Build or refactor a page/section using Graffiti classes
- Convert inline-styled markup to class-first markup
- Produce template-like structures (landing, dashboard, blog, settings, chat, forms, navigation)
- Improve markup quality, semantics, responsiveness, or consistency for Graffiti outputs
Do Not Activate For
- Non-UI/backend-only tasks
- Requests to design a brand new CSS framework or token system
- Requests where Graffiti is not the target styling system
Hard Boundaries (Refusal + Redirect Rules)
- Do not invent class names not present in current Graffiti CSS/docs.
- Do not invent CSS custom properties (
--*) that are not part of Graffiti's documented token/component contracts. - Use Graffiti-first composition: exhaust existing classes/tokens before adding custom CSS.
- Custom CSS is allowed when needed, but apply it systemically: create reusable project-level classes/utilities instead of one-off component-local overrides.
- Do not hardcode raw color literals (
#hex,rgb(),oklch(...)) inline unless explicitly requested. - Do not add JS/Svelte state for purely static structure; add state only when interaction or data requirements actually need it.
- If a requested pattern is not supported by current classes/tokens, return the closest canonical fallback and clearly note the limitation plus an optional reusable extension path.
- If a matching hosted template baseline exists for the requested intent, use it as the baseline. Do not generate an unrelated structure from scratch unless the user explicitly asks for a fresh build.
- Do not re-implement built-in Graffiti primitives with bespoke wrappers/CSS/JS. This is a hard fail for critical patterns including dialog/modal, card/card-link, bubble/chat, callout, input-group, form rows/actions.
- Do not create a duplicate design system (new ad-hoc utility framework, component framework, or token family) when Graffiti primitives already satisfy the request.
- Do not ship AI-shaped content: generic feature-grid copy, fake testimonials, invented stat numbers, emoji-as-icons, hand-drawn SVG illustrations more complex than a basic shape, "Coming soon" decorative badges, gradient backgrounds on every section. See
references/AESTHETIC_GUIDE.mdfor the full anti-slop list. - Do not inline-override hue tokens (
--blue,--red, etc.) and expect their opaque scales (--blue-opaque-N) to follow. Use a theme class instead. Seereferences/THEMING_AND_TOKENS.md. - Do not use
@mediaqueries for component-internal responsiveness. Default to@containerqueries withcontainer-type: inline-size. Seereferences/MOBILE_AND_CONTAINERS.md.
Graffiti Identity (Non-Negotiable)
Treat these as fixed truths for this skill:
- Graffiti is a class-first drop-in CSS system. Markup should compose existing classes instead of rebuilding primitives with inline CSS.
- Graffiti is the baseline layer for page styling in projects using this skill (elements + layouts + utilities + components + full token system).
- Graffiti is a substrate, not a look. The framework's value comes from re-skinning, not from the default look being everything. Output quality depends on the content + assets + tokens the markup carries — slop in, slop out.
- The source of truth is hosted Graffiti docs/templates plus local package evidence, in this order:
https://graffiti-ui.com/base,https://graffiti-ui.com/utilities,https://graffiti-ui.com/elements,https://graffiti-ui.com/ui-blocksrequested withAccept: text/markdown, plus topic routes likehttps://graffiti-ui.com/elements/buttonshttps://graffiti-ui.com/templatesand template pages such ashttps://graffiti-ui.com/templates/landing,https://graffiti-ui.com/templates/dashboard,https://graffiti-ui.com/templates/blog,https://graffiti-ui.com/templates/settings,https://graffiti-ui.com/templates/ai-chat,https://graffiti-ui.com/templates/docs-portal- Installed Graffiti stylesheet/package exports in the target project (actual selectors and variable contracts)
- Skill recipes in
references/*(guidance layer, never higher authority than source files)
- Graffiti variables are contracts, not free-form style knobs. Use documented tokens/overrides only.
- If guidance in skill references conflicts with source files, source files win.
System-First Preflight (Required)
Before writing or editing markup, run this preflight in order:
- Variables: identify required tokens from
https://graffiti-ui.com/basemarkdown and installed Graffiti CSS contracts. - Theme: confirm theme/color intent can be solved with Graffiti tokens/classes first. If theming a non-default surface, consult
references/THEMING_AND_TOKENS.mdto pick the right override level (theme class vs--primaryswap vs component override token). - Layout: map top-level structure to existing layout primitives. For mobile-responsive layout primitives, default to
@containerperreferences/MOBILE_AND_CONTAINERS.md. - Utilities: map text/state/alignment behavior to existing utilities.
- Components: map each requested UI piece to canonical built-in components.
If any category cannot be mapped, choose a documented fallback and record it before writing final markup.
Aesthetic-First Preflight (Required for content surfaces)
For any surface that includes content (marketing, dashboard with copy, templates, blog, etc.) ALSO run this preflight per references/AESTHETIC_GUIDE.md:
- Theme: pick a theme class FIRST. Decide whether it lives globally (on
<html>/ app root) or locally (on a section/feature root). Default-canvas-with-no-theme is a deliberate choice, not a fallback. Seereferences/THEMING_AND_TOKENS.md. - Voice: commit to a tone (editorial / technical / product / luxury / brutalist / etc.) and stay in it.
- Density: declare the per-section content budget (e.g. hero = 1 headline + 1 subhead + 2 CTAs; feature grid = 3–6 items, each ≤30 words). If unsure, default LOW.
- Imagery: decide what every image slot actually contains. If no real imagery is available, use
.box.invisible+gradient-*+ monospace label as placeholder. Never invent decorative SVGs. - Icons: Graffiti ships no icon set and blesses none. Use whatever icon library the project already includes (check
package.jsonand existing imports first). If the project has no icon library, use the<span class="icon" aria-hidden="true">placeholder pattern with a single Unicode glyph until a real icon is supplied. Never invent SVG icons more complex than a basic shape (circle / square / arrow / chevron / plus / minus / X / check). Never use emoji as feature icons. Never mix icon sets in one page.
If theme / voice / density / imagery is ambiguous in the user's request and they didn't provide guidance, ASK before generating — do not silently choose generic SaaS defaults.
Component Intent Steering (Required)
Classes are role-bearing primitives, not generic visual wrappers.
Specific-Over-Generic Rule (the anti-generic-container rule)
.box, .stack, .cluster, .split, .surface are fallbacks, not defaults. Reaching for them when a role-specific primitive exists is the single largest source of ugly, generic-looking Graffiti output.
Before composing any container with a neutral wrapper, walk the role menu in this order and stop at the first match:
- Is this a metric/KPI readout? →
.stat-card - Is this a feature/value-prop entry? →
.feature-card - Is this a record-like content unit (article, product, plan, recipe, post preview)? →
.card(or.card.featured/.card.linked) - Is this a notice / contextual message (info, warning, error, success)? →
.callout+ semantic variant - Is this a chat / message turn? →
.chat-thread+.chat-row+.bubble - Is this a tool call / activity log entry / function invocation? →
.log-card - Is this a compact disclosure (FAQ-style)? →
<details class="bordered">+<summary> - Is this a modal/confirmation surface? → native
<dialog>+.close - Is this a form field row / submit row / option label? →
.row/.form-actions/.form-option-row - Is this an input coupled with one button? →
.input-group - Is this a multi-line message composer with toolbar? →
<form class="composer"> - Is this a TOC for a long document? →
.toc - Is this a vertical icon-only nav rail? →
.icon-rail - Is this a secondary inspector/workbench pane in an app shell? →
.workbench-panelinside.layout-rail.with-workbench - Is this a selectable pill / filter / suggestion? →
.chip(witharia-pressed) - Is this a status pill / category label? →
.tag(semantic variant first) - Is this a pull quote? →
<blockquote class="pull-quote"> - Is this a section eyebrow / overline? →
.eyebrow
Only after exhausting the role menu is .box / .stack / .cluster / .split / .surface allowed — and even then, justify why no role primitive fits.
Three-fit validation (apply once a role primitive is selected):
- Intent fit: component role matches the requested job.
- Semantic fit: host element semantics match the pattern.
- Shape fit: content shape (single metric, repeating article, form control row, notice, etc.) matches the primitive.
Hard boundaries:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/graffiti-best-practices/SKILL.md
Popularity
- Repository stars
- 59
- Repository forks
- 2
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/stolinski/s-stack/graffiti-best-practices)