fragments/policy

Create and manage Fragments design governance policies from natural language.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Fragments governance needs consistent, enforceable design rules, and writing those rules manually is slow and error-prone.

Core Features & Use Cases

  • Create policies from natural language: Turn a plain-language requirement into a Fragments governance policy definition you can enforce.
  • List, edit, and delete policies: Manage the lifecycle of your .fragments/policies/ files and keep them aligned with governance needs.
  • Validate against governance checks: Confirm your policy behaves as expected by running governance checks with cloud enabled.

Quick Start

Ask the agent to create a new Fragments policy by running /policy create "buttons must have a minimum height of 44px" and then validating it with npx fragments govern check --cloud.

Frequently Asked Questions about fragments/policy

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

FAQPage Schema
How do I create enforceable design policies from natural language text?

You can enforce design conventions by converting plain-text requirements into Fragments governance policy files. This process translates accessibility, consistency, and responsiveness rules into validated configurations automatically stored under `.fragments/policies/`.

What are UI accessibility rules and how are they enforced automatically?

UI accessibility rules are design constraints ensuring usable interfaces, enforced automatically by generating Fragments governance policies. These policies are validated via CLI checks using the governance engine to maintain UI consistency and responsiveness across your project.

How do I validate design governance rules using cloud checks?

Validate design governance rules by running `npx fragments govern check --cloud` after generating your policy files. This cloud-enabled validation confirms your UI accessibility and consistency constraints behave as expected within the Fragments config workflow.

Do I need a specific configuration file to generate Fragments design policies?

Yes, generating Fragments design policies requires a `fragments.config.ts` file with policy glob configuration. This setup allows the governance engine library to correctly parse natural language input and write resulting policy definitions into the `.fragments/policies/` directory.

Can I list, edit, and delete UI conventions after creating a Fragments policy?

Yes, you can manage the full lifecycle of UI conventions after creating a Fragments policy. The workflow supports listing, editing, and deleting policy files within `.fragments/policies/` to keep design governance rules aligned with evolving accessibility and responsiveness needs.

What is the best way to fix UI constraint violations found during governance checks?

The best way to fix UI constraint violations found during governance checks is to leverage generated fix recommendations. By updating Fragments policy definitions and re-running `npx fragments govern check --cloud`, you can iteratively resolve accessibility and responsiveness failures.