Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions skills/cds-code/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
name: cds-code
description: |
Provides a structured workflow for writing high quality Coinbase Design System (CDS) code.
Use this skill every time you are asked to create or update a user interface using React or React Native.
Additinoally, this skill may be used to conduct a code review on existing code for CDS adherence.
Trigger examples: "build this screen", "update this component", "perform a CDS audit on our changes",
"check our codebase for CDS adherence", "does this feature use CDS well?"
Comment on lines -4 to -8

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.

Can we try the description below? I think removing this single line (Use this skill every time you are asked to create or update a user interface using React or React Native.) will help a lot

Provides a structured workflow for writing high quality Coinbase Design System (CDS) code.
Use this skill when you need to create a new user interface or make visual changes to an existing one. This skill should not be used for non-visual changes, business logic, refactoring or in files/projects that are not using CDS React components.
Additinoally, this skill may be used to conduct a code review on existing code for CDS adherence.
Trigger examples include: "build this screen", "use design system tokens in this component", "use CDS component in this UI", "perform a CDS audit on our changes",
"check our codebase for CDS adherence", "does this feature use CDS well?"

Provides a structured workflow for writing and reviewing high quality Coinbase Design System (CDS) presentation code.
Use this skill when a request changes rendered React or React Native UI presentation or CDS usage.
Examples include CDS component choices, JSX layout or structure, spacing, color, typography, icons, illustrations, images, loading states, empty states, error states, interactive control accessibility labels, or user-facing copy.
Use this skill for explicit CDS audits, reviews, or adherence checks.
Do not use this skill for logic-only changes, hooks, tests, Relay or data fetching, analytics, navigation wiring, feature flags, generated artifacts, performance-only refactors, or edits in component files that do not alter rendered presentation or CDS usage.
Trigger examples: "build this screen", "fix spacing on this component", "replace this UI with CDS components",
"perform a CDS audit on our changes", "check our codebase for CDS adherence", "does this feature use CDS well?"
license: Apache-2.0
metadata:
version: '2.1.0'
Expand All @@ -17,11 +19,15 @@ metadata:

Before responding, determine what the user needs:

**Coding** — the user wants to create or update UI → follow the Coding Workflow.
**Coding** — the user wants to create or update rendered UI presentation or CDS usage → follow the Coding Workflow.

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.

Coding — the user wants to create a new user interface or make visual changes to an existing one → follow the Coding Workflow.

Just to be consistent with the wording i suggested above


**Review** — the user explicitly asks to audit, review, or check existing code for CDS adherence → read `guidelines/code-review.md` and follow it instead.

**Default to coding.** Only treat a request as a review if the user's intent is explicit. Writing code is the primary use case for this skill.
**Out of scope** — the user wants logic-only changes, hooks, tests, Relay or data fetching, analytics, navigation wiring, feature flags, generated artifacts, performance-only refactors, or edits in component files that do not alter rendered presentation or CDS usage → do not follow this skill's coding or review workflows.

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.

@dugganburke-cb can you remove "Relay"? We are open source so this skill can be installed outside of coinbase's tech stack

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.

Also, models tend to do better with what you tell them to do and less so teling them what not to do. Do you think the skill would trigger as you'd expect if we omitted or just greatly simplified this out of scope paragraph? I'm thinking a precise description of the condition(s) (i.e. changes to rendered JSX, or changes directly involving cds imports) might do it


**Default in-scope work to coding.** For requests that affect rendered UI presentation or CDS usage, only treat the request as a review if the user's audit/review intent is explicit. Writing code is the primary use case for this skill.

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
**Default in-scope work to coding.** For requests that affect rendered UI presentation or CDS usage, only treat the request as a review if the user's audit/review intent is explicit. Writing code is the primary use case for this skill.
**Default in-scope work to coding.** Only treat the user's request as a review/audit if the intent is explicit. Writing/creating UI is the primary use case for this skill.


If the request is ambiguous, inspect the requested change first. Only enter the Coding Workflow when the change affects rendered UI presentation or CDS usage. Do not treat "component" or "frontend repo" as sufficient signal by itself.

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
If the request is ambiguous, inspect the requested change first. Only enter the Coding Workflow when the change affects rendered UI presentation or CDS usage. Do not treat "component" or "frontend repo" as sufficient signal by itself.


## Initialization

Expand All @@ -41,7 +47,7 @@ If the script cannot be run, much of the information it provides can be determin

## Coding Workflow

For all frontend coding tasks, follow these steps in order.
For coding tasks that change rendered UI presentation or CDS usage, follow these steps in order.

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
For coding tasks that change rendered UI presentation or CDS usage, follow these steps in order.
For coding tasks that are in-scope, follow these steps in order.


**YOU MUST** perform steps 1 and 2 before writing any code!

Expand Down
Loading