Skip to content

[CCUBE-2223][XY] Add Flagship DS agent skills - #1458

Open
ninjasheeps wants to merge 9 commits into
masterfrom
flagship-ds-skills
Open

ninjasheeps wants to merge 9 commits into
masterfrom
flagship-ds-skills

Conversation

@ninjasheeps

@ninjasheeps ninjasheeps commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing apis or functionality to change)
  • Documentation (change to documentation, comments or API descriptions)
  • Tests (improvements to unit tests or E2E tests)
  • Other (technical improvements, refactoring, or changes that don't fall into the above categories)

Description of changes

  • Link to ticket
  • Add fds-build agent skill which allows consumers to build web pages/applications using FDS
  • Covers component selection, import paths, theming setup, layout patterns, and common mistakes for both v3 and v4
  • Props tables auto-generated from TypeScript source via scripts/generate-skill-props.ts
  • 11 evals included for validation
  • Install via npx skills add lifesg/react-design-system
  • Currently the skill supports building form/listing pages, will be adding more templates in the future

Checklist

  • Changes follow the project guidelines in CONTRIBUTING.md and CONVENTIONS.md
  • Looks good on mobile and tablet
  • Updated documentation
  • Added/updated unit tests
  • Added/updated E2E tests

Comment thread scripts/generate-skill-props.ts
Comment thread scripts/generate-skill-props.ts
Comment thread skills/fds-build/resources/v3/components/footer.md Outdated
Comment thread skills/fds-build/SKILL.md

@qroll qroll Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does skills support installing from a version? e.g. npx skills @lifesg/react-design-system@3

it would be cleaner to split v3 vs v4; I would imagine in newer versions when we start removing/adding components/props, the catalog and props should be updated separately for the new version without affecting the old

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok you did mention it has to point to the full path. so it would need to be npx skills https://github.com/LifeSG/react-design-system/tree/pre-release/v3

alternatively we could provide a bin command like npx lifesg-react-design-system@3 skills that maps to the expected path

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuing on this thread since we can support version specific skills

can we move v3 resources to a new PR targeting the pre-release/v3 branch? then flatten the resource folder structure and remove references to v3

Comment thread skills/fds-build/resources/v3/components/modal.md
Comment thread skills/fds-build/SKILL-v4.md
ninjasheeps and others added 4 commits September 15, 2026 09:28
…-props

- Export stripPropsSection and insertPropsSection for testability
- Guard main() behind require.main === module to prevent side effects on import
- Add 12-test suite covering strip, insert, and idempotency scenarios

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread package.json
},
"bin": {
"lifesg-react-design-system": "./codemods/run-codemod.js"
"lifesg-react-design-system": "./scripts/cli.js"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trouble you to update rollup.config.js to support the bin command

  1. line 116 can be updated to reflect the latest bin config:
bin: pkg.bin,
  1. skills and script/cli.js should be bundled as well

can include it under the codemodBuildConfig copy plugin (there are some issues using libraryBuildConfig)

{ src: "scripts/cli.js", dest: "dist/scripts" },
{ src: "skills/*", dest: "dist/skills" },

Comment thread skills/fds-build/SKILL.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuing on this thread since we can support version specific skills

can we move v3 resources to a new PR targeting the pre-release/v3 branch? then flatten the resource folder structure and remove references to v3

Comment thread skills/fds-build/SKILL.md
## Install

```bash
pnpm add @lifesg/react-design-system @lifesg/react-icons styled-components @floating-ui/react @mui/icons-material @emotion/is-prop-valid

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use npm as the default instead?

Comment thread skills/fds-build/SKILL.md
}
```

`StyleSheetManager` with `isPropValid` stops styled-components forwarding DS-specific props (e.g. `weight`) to DOM elements.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DS V3 should properly handle transient props (if not, is a bug that should be fixed on the library), can avoid this step as a default. consumers should also be marking transient props for their own code

Comment thread skills/fds-build/SKILL.md

Theme is an **imported object** — not a string. Available themes: `LifeSGTheme` · `BookingSGTheme` · `CCubeTheme` · `MyLegacyTheme` · `OneServiceTheme` · `PATheme` · `SupportGoWhereTheme` · `SGWDigitalLobbyTheme` · `IMDATheme` · `SPFTheme` · `SMGSTheme` · `A11yPlaygroundTheme`

For auto dark/light mode: swap `ThemeProvider` for `DSThemeProvider` (same import path). Force fixed mode: `LifeSGTheme.light` or `LifeSGTheme.dark`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I interpret this as having same import path as ThemeProvider from styled-components. maybe just remove and let the agent figure it out

Comment on lines +41 to +42
| Using `SpacingValues` | This export does not exist | Use `Spacing` |
| Using `Theme` (named export) | This export does not exist | Use a named preset: `LifeSGTheme`, etc. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be explicitly documented? 🥺

Comment on lines +397 to +403
`Breakpoint` can still be imported for JS conditional logic:

```tsx
import { Breakpoint } from "@lifesg/react-design-system/theme";

const isDesktop = window.innerWidth > Breakpoint["lg-min"];
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


## Border Tokens

`Border` is a flat object of CSS variable strings. Import from `@lifesg/react-design-system/theme`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`Border` is a flat object of CSS variable strings. Import from `@lifesg/react-design-system/theme`.
`Border` is a flat object of CSS variable strings.

<div style={{ border: `${Border["width-010"]} ${Border.solid} ${Colour.border}` }} />
```

There is no `Border.Util` in v4 — compose border properties manually using the tokens above.

@qroll qroll Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request: run prettier afterwards to standardise the table formatting and reduce noise in the unstaged files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants