skills/sgds-workflow/SKILL.md
ALWAYS use this skill when building UI with @govtechsg/sgds-web-component or when a user mentions SGDS or Singapore Design System — even if they don't explicitly ask for help. This is the mandatory entry point for all SGDS development: it guides you to the right skill for setup, components, utilities, forms, theming, page layouts, block templates, and data visualisation. Read this before writing any SGDS application code.
npx skillsauth add govtechsg/sgds-web-component sgds-workflowInstall 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 skill maps out the available SGDS skills and the order to use them. Start here when unsure which skill applies, or to understand how skills fit together.
Work through these stages in order. Within each stage, read the referenced skills as needed.
→ Read sgds-getting-started
Covers: Inter font, CSS import order (themes/day.css → css/sgds.css → css/utility.css), component registration, and the two app layout templates (simple app vs sidebar app).
Complete all four steps in this skill before writing any component or page code.
These skills are your day-to-day references while building. You will move between them frequently — read whichever is relevant to what you are building at any moment.
→ sgds-components — Every <sgds-*> web component (accordion through tooltip). Check here first before building anything with plain HTML. If an SGDS component exists for your need, use it.
→ sgds-utilities — All sgds: Tailwind utility classes: spacing, layout grid, typography, colors, borders, opacity. Use for layout, spacing, and styling between and around components.
→ Application Shell — Mandatory page chrome and layout templates (simple app and sidebar app) with sticky headers, sidebar column sizing, and container class reference. Read when sgds-getting-started Step 4 is not enough detail.
→ sgds-theming (optional) — Brand colour overrides, night/dark mode, and font customisation. Read this alongside the above when the app requires visual customisation beyond the default SGDS style. Skip if the default style is acceptable.
→ sgds-blocks — Reusable UI blocks for page sections and layouts. Includes: hero sections, CTAs, feature blocks, card grids, statistics displays, page headers, filters, forms, detail cards, application shell, and custom blocks. Start here when a user asks to build a landing page, dashboard, specific page section like "I need a call to action", or requests any page layout.
→ sgds-patterns — Typography and text patterns for consistent text styling: headings, display text, content headers, lists, and paragraphs. Use when styling content text, creating text hierarchies, or the user mentions "make a nice heading" or "style the page text".
→ sgds-templates — Ready-made full-page layouts: dashboard, login, form page, list page, settings. Start here when a user asks to build a complete page.
→ sgds-forms — Form submission, constraint validation, hasFeedback, setInvalid, and FormData. Read when any <form> with SGDS components is involved.
→ Read sgds-data-visualisation
Covers ECharts setup and applying the SGDS colour palette to charts. Only needed if the app includes charts, graphs, or data dashboards.
Do not re-read setup skills. Go directly to the skill that covers the current task.
Quick check — if utilities or components look broken, verify setup is complete before anything else:
themes/day.css → css/sgds.css → css/utility.css imported in that order in the main CSS fileutility.css is processed by Tailwind (not imported as a plain JS import)import "@govtechsg/sgds-web-component" present in the JS entry pointIf setup is confirmed correct, navigate using the table below.
| What you need to do | Skill to read |
|---|---|
| Set up a new SGDS project from scratch | sgds-getting-started |
| Use any <sgds-*> component | sgds-components |
| Apply spacing, colors, typography, layout utilities | sgds-utilities |
| Structure the app shell (masthead, mainnav, footer, containers) | Application Shell |
| Change brand color, enable dark mode, change font | sgds-theming |
| Build page sections: hero, CTA, cards, feature, stats, filter, form, or custom blocks | sgds-blocks |
| Style text: headings, display text, lists, paragraphs | sgds-patterns |
| Build a full page (dashboard, login, list, form, settings) | sgds-templates |
| Add form validation, read FormData, use setInvalid | sgds-forms |
| Add charts, graphs, or data dashboards | sgds-data-visualisation |
<form> element is involved. Do not proactively read it for non-form UIs.style attributes or inline CSS. All styling must be applied via class attributes using sgds: utility classes from sgds-utilities. Writing style="margin-top: 16px" when sgds:mt-4 exists is a violation.tools
Complete reference for all SGDS web components including installation and framework integration. Use when users ask about any <sgds-*> component — accordion, alert, badge, breadcrumb, button, card, checkbox, close-button, combo-box, datepicker, description-list, divider, drawer, dropdown, file-upload, footer, icon, icon-button, icon-card, icon-list, image-card, input, link, mainnav, masthead, modal, overflow-menu, pagination, progress-bar, quantity-toggle, radio, select, sidebar, sidenav, skeleton, spinner, stepper, subnav, switch, system-banner, tab, table, table-of-contents, textarea, thumbnail-card, toast, or tooltip. Also covers React 19+, React ≤18, Vue, Angular, and Next.js integration.
testing
Use this skill when users ask about form validation in SGDS, hasFeedback prop, constraint validation, custom validation, noValidate, setInvalid, form submission, or reading FormData from SGDS form components.
tools
Complete catalog of page layout patterns for SGDS applications. Use this skill whenever a user asks about page layouts, content arrangement, aside panels, split views, sidebar layouts, breadcrumb layouts, or viewport-height layouts — even if they just say 'how should I lay out my page' or 'I need a two-column layout'. Covers Full Width layouts (public-facing pages with sgds-container) and With Sidebar layouts (dashboards/internal tools with sgds-container-sidebar). Trigger on: layout, aside, split view, sidebar layout, two-column, three-column, content arrangement, page structure with aside.
tools
Complete ready-to-use page templates built with SGDS components and utilities. Use this skill whenever a user asks to build a page, dashboard, login page, form page, settings page, list page, or any full-page UI — even if they don't say 'template'. Apply when starting a new app, building internal tools, dashboards, admin portals, authentication flows, or data table views.