fragments/govern

Run Fragments design governance checks and auto-fix UI code violations.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/fragments-sdk/skills --skill fragments-govern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fragments/govern
Source: https://github.com/fragments-sdk/skills/tree/main/skills/govern
Command: npx skills add https://github.com/fragments-sdk/skills --skill fragments-govern

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents design quality regressions by detecting and fixing accessibility, consistency, and responsive issues in your UI code before you commit.

Core Features & Use Cases

  • Check mode: Run governance checks and produce machine-readable violation reports for reviewing.
  • Fix mode: Automatically apply safe auto-fixes for violations that support it, then re-validate.
  • Review/status modes: Review only staged/uncommitted UI changes and track the trend of open violations over time.
  • Use Case: You’re about to merge a pull request that changes button styles and layout. Use governance to find color-contrast and token-usage violations in the modified components, auto-fix what’s safe, and confirm the results.

Quick Start

Ask your agent to run a cloud governance check against your UI folder to identify and report any accessibility or design-policy violations.

Frequently Asked Questions about fragments/govern

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check my UI code for accessibility and design policy violations before committing?

To check UI code for accessibility violations before committing, run Fragments design governance checks in review mode to identify issues in staged or uncommitted TypeScript and JavaScript UI components. This generates machine-readable reports grouped by severity, file, and rule.

Can I automatically fix color contrast and token usage issues in TypeScript UI projects?

Yes, you can automatically fix color contrast and token usage issues by running Fragments governance in fix mode. It applies safe auto-fixes for supported design violations and then re-validates the UI code to confirm the issues are resolved.

What is design governance for pre-commit code review and how does it work?

Design governance for pre-commit code review is the process of validating UI code against cloud-synced policies to prevent design quality regressions. It works by parsing JSON output from governance checks to report accessibility, consistency, and responsive violations.

Do I need fragments.config.ts to run cloud compliance and policy validation checks?

Yes, you need a fragments.config.ts file present in your project to run cloud compliance and policy validation checks. The governance tooling requires this configuration file to apply scoped checks by file path and validate against design policies.

How do I track the trend of open UI design violations over time?

To track the trend of open UI design violations over time, use the status reporting mode in Fragments governance. It reviews staged UI changes and monitors open violation counts against cloud-synced policies across your TypeScript or JavaScript project.

What's the best way to scope design governance checks to specific file paths?

The best way to scope design governance checks to specific file paths is by using the built-in path scoping feature during the check execution. This targets only the modified TypeScript or JavaScript UI components and outputs JSON reports for the selected files.