Browse AI

AI

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 agent skills give AI assistants task-specific instructions for building with the design system.

What are agent skills?

Agent skills are markdown instruction files that help compatible AI coding tools work with SGDS in a more consistent way. They explain which skills to read, which components and utilities to use, how SGDS pages are structured, and which rules to follow when generating design, code, or content.

They work like task-specific guidance for your assistant. When you ask for an SGDS app, page, component, form, chart, theme, or content change, the assistant can use the relevant skill before it makes decisions.

If you are unsure where to start, begin with sgds-workflow. It maps the skill set and points the assistant to the right skill for the task.

Why agent skills matter

AI assistants are strong at producing code quickly. They still need reliable context to choose the right component, utility class, token, layout, copy pattern, and implementation detail. Without that context, the output may look close while drifting from SGDS conventions.

SGDS agent skills make that context available at the point of work. They help the assistant use SGDS as the source of truth instead of inferring patterns from generic web examples.

For new applications, the workflow starts with sgds-getting-started. From there, the assistant moves between components, utilities, layouts, templates, theming, forms, data visualisation, and writing guidance based on the task.

How agent skills work

Agent skills are plain markdown files written for AI assistants. Each skill describes when it applies, what to read next, which SGDS APIs or utilities matter, and which common mistakes to avoid.

  • Workflow guidance: when to use each skill and in what order
  • Setup guidance: font setup, CSS import order, component registration, and utility CSS setup
  • Component and utility references: SGDS web component APIs, slots, events, and utility classes
  • Layouts, blocks, and templates: app shells, page sections, full-page templates, sidebar layouts, and reusable content structures
  • Task rules: instructions for forms, theming, data visualisation, writing, and common implementation checks

Agent skills are read by the assistant at query time. They do not add runtime code to your product or replace human review.

What you can ask with agent skills installed

With the SGDS agent skills installed, you can describe the outcome you need and let the assistant select the relevant system guidance.

  • "Set up a new Vite app with SGDS."
  • "Build a sidebar dashboard layout using SGDS."
  • "Choose the right SGDS spacing utility between these cards."
  • "Review this form and align the validation with SGDS."
  • "Rewrite this page copy using the SGDS writing guide."

The result should still be reviewed by a human. Agent skills reduce avoidable mistakes by giving the assistant clearer SGDS rules before it acts.

How to install SGDS agent skills

Skills CLIGovTech CLI
0

Setup GT CLI

Install the GovTech developer CLI. This is available to GovTech Singapore only.

GT CLI setup guide
1

Install the SGDS agent skills

Run the GT CLI installer in your project root:

Bash Copy
gt apd install sgds
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 agent skills updated

After upgrading @govtechsg/sgds-web-component, refresh the SGDS agent skills:

Bash Copy
gt apd install sgds

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

0

Install Node.js

Install Node.js (v20 or later) which includes npx.

Download Node.js
1

Install the SGDS agent skills

Run the SGDS agent skills installer in your project root:

Bash Copy
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 agent skills updated

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

Bash Copy
npx skills add govtechsg/sgds-web-component -y

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

Available SGDS agent skills

Each skill covers a different part of SGDS. This table reflects the SGDS skills currently shipped with this repository. You do not need to memorise the full set. The assistant can read the relevant skill when the task calls for it.

SkillWhat it coverssgds-workflowStart here when unsure. Maps all SGDS agent 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, including 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-patternsTypography and content patterns for headings, display text, paragraphs, lists, and page text hierarchy.sgds-layoutsPage layout patterns that define content arrangement for public-facing pages and internal tools and dashboards.sgds-blocksReusable page sections such as hero sections, cards, feature blocks, statistics, filters, forms, and calls to action.sgds-templatesReady-made full-page layouts for common product flows such as dashboards, login pages, list pages, forms, and settings.sgds-data-visualisationCharts and dashboards using ECharts with the SGDS colour palette.sgds-writingSGDS writing guidance for clear, direct, and consistent documentation, UI copy, labels, and prompts.

What agent skills cannot do

Agent skills guide the assistant. They do not replace product judgement, accessibility review, content review, or engineering review.

Treat AI output as a draft that starts closer to SGDS standards. Review the behaviour, visual fit, code quality, and content before shipping.

Singapore Government Design System

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

Past VersionsSGDS v1SGDS v2