This AI section is still being developed. Please treat the content as contextual guidance only, as information may be largely incomplete and inaccurate at the time of reading.

Agent skills

SGDS skills are knowledge packs that teach AI assistants how to use the design system correctly.

What are agent skills?

llms.txt tells your AI what SGDS contains. Skills tell your AI how to use it.

Think of llms.txt as the ingredient list, and skills as the recipe.

Skills are markdown files that give your AI step-by-step instructions for working with SGDS — which components to reach for, which tokens and patterns to follow, and what good output looks like. You install them once into your project, and your AI reads them automatically from that point on.

If you're unsure where to start, begin with sgds-workflow. It maps the skill set and points your AI to the right skill for the task.

Why skills matter

If you've ever asked an AI to help you build something, you've probably seen the result: code that almost works — wrong component names, made-up class names, patterns that don't exist in your design system. The AI isn't being careless. It simply doesn't know how your system works.

Skills fix that. Once installed, your AI understands exactly how SGDS is structured without you having to explain it every time.

For new applications, the workflow starts with sgds-getting-started. From there, your AI moves between components, utilities, theming, templates, and forms depending on the task.

How skills work

Skills are plain markdown files structured for AI consumption. Each skill contains:

  • A quick decision guide — decision trees for choosing the right token or component variant
  • An API summary — compact attribute and property tables
  • Usage examples — idiomatic HTML the AI can produce and adapt
  • A "For AI agents" section — explicit rules and common mistakes to avoid

Skills are read by the agent at query time. They do not add runtime dependencies to your project.

What you can do with skills installed

Instead of wrestling with your AI to get correct output, you can simply describe what you want to build:

  • "Build a sidebar dashboard layout using SGDS"
  • "What spacing utility class should I use between these cards?"
  • "How do I prevent a modal from closing when clicking the background?"

Your AI will respond with accurate, SGDS-aligned answers — no guessing, no wrong names, no hallucinated components.

How to install SGDS skills

1

Install the SGDS skills

Run the SGDS skills installer in your project root:

npx skills add govtechsg/sgds-web-component
2

Select the full skill set

When prompted, select all skills from the list. This creates a local .agents/ folder that your AI tools pick up automatically.

3

Keep the skills updated

After upgrading @govtechsg/sgds-web-component, refresh the SGDS skills from the source repository:

npx skills add https://github.com/govtechsg/sgds-web-component.git -g -y

This keeps the installed SGDS skills aligned with the latest workflow, setup guidance, and component instructions.

Available SGDS skills

Each skill covers a different area of SGDS. You don't need to remember what's in them — your AI reads them for you.

SkillWhat it coverssgds-workflowStart here when unsure. Maps all SGDS skills, when to use them, and the order to read them in.sgds-getting-startedMandatory first step for new apps: font setup, CSS import order, component registration, and app layout.sgds-componentsAll 47 <sgds-*> web components — attributes, slots, events, and framework integration (React 19+, React ≤18, Vue, Angular, Next.js).sgds-utilitiesAll sgds: Tailwind utility classes: grid, spacing, typography, colours, borders, and more.sgds-themingBrand colour overrides, dark mode setup, and font customisation. Read alongside components and utilities when needed.sgds-formsForm validation, constraint validation, FormData, and setInvalid.sgds-pattern-block-templatesApplication shell, page header, basic details card, filter sidebar, session detail, and table filter — self-contained UI blocks that slot into any page.sgds-pattern-page-templatesFull-page layouts: dashboard, login, list page, form page, and about us.sgds-data-visualisationCharts and dashboards using ECharts with the SGDS colour palette.

What skills can't do

Skills guide the agent. They rely on what's underneath — llms.txt points the AI to what exists, and the SGDS documentation gives it the detail. The richer both are, the better the skills perform.

Singapore Government Design System

The Singapore Government Design System was developed to empower teams in creating fast, accessible and mobile-friendly digital services.