Ground React UI edits in project components and tokens with the Onsystem skill
Discover project-specific React components and tokens, implement a bounded UI change, and repair new design-system violations with Onsystem checks.
npx skills add agentskillexchange/skills --skill ground-react-ui-edits-in-project-components-and-tokens-with-onsystem-skill
Use the Onsystem agent skill when writing or changing React UI in a repository with an existing design system. The agent discovers the project’s actual component contracts and tokens, implements the requested change, checks each changed file, and repairs new violations before handing it back.
What this skill actually does
When to invoke
Invoke this for a bounded .tsx or .jsx implementation or repair task when a coding agent might invent component props, use unsupported variants, or substitute raw colors for project tokens. It is especially useful in monorepos where different apps use different component systems.
Inputs and setup
Provide the target repository, changed file paths, desired UI behavior, and the existing React design-system components and token sources. Node.js 20.19 or later is required. From the project, run npx skills add dgesteves/onsystem to install the upstream skill. Run npx -y onsystem inspect to confirm the design system is discovered. For MCP access, configure a stdio server with command npx and arguments ["-y", "onsystem", "--root", "/absolute/path/to/project"] in the chosen client.
Workflow
- Find suitable components with
search_componentsorlist_components. Read each component’s imports, props, parts and permitted variants withget_component. - Read
get_tokensand use the project’s semantic tokens. Prefer existing component variants and components over invented properties, arbitrary values or native replacements. - Implement the requested UI. In a monorepo, pass the file being edited as
pathto component and token queries so they resolve against the correct project. - Run
check_uifor each changed file, supplying its path or filename. Apply the relevant diagnostics and repeat the check. Report the affected paths, checks and unresolved findings.
Without MCP, use npx -y onsystem inspect, read the discovered component source, obtain tokens with npx -y onsystem export --format design-md, and check changed files with npx -y onsystem check path/to/file.tsx --format json. An error exit requires repair and another check.
Scope and limits
This skill covers project-specific component and token grounding plus a check-and-repair loop. It does not replace visual review, a full accessibility audit or general application testing. CLI checks honor an existing baseline; MCP check_ui shows all findings, so distinguish newly introduced issues from unrelated existing ones. Ask the operator before accepting a new baseline. If the design system is not discovered, report that limitation instead of claiming a clean result. Published compiled components need type declarations for component and prop checks.
The portable upstream skill supports MCP tools and an explicit CLI fallback across agent runtimes. Metadata provenance is verified; this approval does not constitute a security review.