This guide helps you craft effective prompts for AI coding agents using the SGDS agent skills. Use these tips to get the best results, whether you are starting a new project or migrating an existing app to SGDS V3.
The way you phrase your instructions to an AI assistant makes a big difference. These tips help you get accurate, SGDS-aligned output whether you are starting a new project or migrating an existing app.
Use the workflow that matches your starting point.
When kicking off a new project, give the agent a clear setup instruction upfront:
[your framework]. Run npm install @govtechsg/sgds-web-component and install the skills with npx skills add govtechsg/sgds-web-component. Use SGDS as the sole design system for the application. A few things to keep in mind:
The agent will handle installation, setup, and make sure all UI uses SGDS components and utilities from the start.
If you're upgrading an existing app, the key is to go incrementally — one component or section at a time — rather than trying to change everything at once.
Start with this prompt:
Then build on it with these strategies:
Ask the agent to analyse your codebase first and produce a migration plan before touching any code:
Tell the agent to replace existing UI components with their SGDS equivalents, one by one:
Ask the agent to swap your old design system's typography, spacing, and colour foundations with SGDS V3:
Request the agent to recommend the appropriate SGDS semantic CSS utility tokens to replace existing styles (inline styles, CSS classes, or old utility classes):
Putting it all together
Here's an example prompt that combines everything for a full migration:
The Singapore Government Design System was developed to empower teams in creating fast, accessible and mobile-friendly digital services.