{
 "schema_version": 1,
 "generated": "2026-10-23",
 "id": "edisonmbli-refactoring-ui-skill--load-design-rules-before-ai-writes-ui",
 "repo": "edisonmbli/refactoring-ui-skill",
 "repo_url": "https://github.com/edisonmbli/refactoring-ui-skill",
 "repo_slug": "edisonmbli-refactoring-ui-skill",
 "title": "Give Codex or Cursor the design rules before it writes UI",
 "page_title": "How to give Codex or Cursor the design rules before it writes UI with Refactoring UI Skill",
 "summary": "Install the rulebook as an AGENTS.md or Cursor rule so the assistant follows it while generating styles.",
 "who": "A developer who uses Codex or Cursor to generate front-end code and keeps getting centered-everything layouts, one spacing value, and indigo buttons.",
 "problem": "Generated UI is built piece by piece, so global design problems are not caught while the code is being written.",
 "outcome": "The assistant reads the design rules at session start, uses placeholder color tokens instead of hard-coded palette colors, and labels extension rules that come from outside the book.",
 "steps": [
  "Clone the repository into the project folder with `git clone https://github.com/edisonmbli/refactoring-ui-skill.git .refactoring-ui`.",
  "For Codex or other tools that read AGENTS.md, run `cp .refactoring-ui/templates/AGENTS.md AGENTS.md`, or merge the file into your existing AGENTS.md.",
  "For Cursor, run `mkdir -p .cursor/rules && cp .refactoring-ui/templates/cursor/refactoring-ui.mdc .cursor/rules/`.",
  "Start a new session and ask the assistant to build a small screen, then check that it uses token names such as bg-{primary}-600 rather than a fixed palette class.",
  "Ask for a review pass after generation to catch issues the generator missed."
 ],
 "agent_prompt": "Using the design rules in the .refactoring-ui folder from the edisonmbli/refactoring-ui-skill repo, build the screen described in <screen-brief> in <project-path>. Return the changed files and a short list of which rules were applied. Verify that no hard-coded palette color classes appear in the output.",
 "agents": [
  "codex",
  "cursor"
 ],
 "difficulty": "Intermediate",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "The README says Cursor loads the rule by file-type matching and that these paths change often, so check the current tool documentation if the file is not picked up.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Claude Code, or another AI coding assistant that can read files in the project",
  "Git, to clone the repository",
  "Python 3.9 or newer for the scripts (no third-party packages needed)",
  "A web project with HTML, CSS, or a framework such as Tailwind, for the review and token steps"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/edisonmbli-refactoring-ui-skill/load-design-rules-before-ai-writes-ui/",
 "md": "https://dedupedai.com/use-cases/edisonmbli-refactoring-ui-skill/load-design-rules-before-ai-writes-ui/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/edisonmbli-refactoring-ui-skill--load-design-rules-before-ai-writes-ui.json",
 "api_version": "v1"
}
