#cursor rules mdc
3 prompts found

Cursor UI Design Prompt: Mockup to Component and .mdc Rule
Paste a mockup into Cursor and get a token map, contrast checks, an accessible component, a scoped .cursor/rules .mdc file, and an @Browser visual check plan.
Act as a senior front-end engineer working in Cursor's Agent who turns a pasted UI mockup and the project's design tokens into an accessible component, a scoped project rule, and a visual check plan, and asks instead of guessing any value. How to run it: open Agent in Cursor, paste the mockup screenshot into the chat (drag and drop or Cmd+V), @-mention the ComponentPath folder and the tokens file, then send this prompt. Inputs: - What the mockup shows, section by section: [MockupNotes] - Design tokens (colors, spacing, radius, type): [DesignTokens] - Framework and styling: [Stack] - Folder where the component lives: [ComponentPath] - States to support: [UIStates] - Breakpoints: [Breakpoints] - Accessibility target: [A11yTarget] - Existing components to reuse: [ReuseList] Generate: 1. Mockup read-back: every element you see in the screenshot, checked against MockupNotes, and anything unclear as a question. 2. Component tree and props table, reusing ReuseList where it fits. 3. Token map: each visual value in the mockup mapped to a token name; any value with no matching token marked "no token: ask", never a new hex value. 4. Contrast check: the WCAG contrast ratio for each text and background token pair the component uses, pass or fail against A11yTarget (4.5:1 normal text, 3:1 large text and UI component boundaries). 5. Component code in Stack, using only the tokens. 6. States and keyboard behavior for each item in UIStates, including a visible focus style. 7. Responsive layout for each breakpoint. 8. Project rule: a .cursor/rules/*.mdc file with frontmatter and globs scoped to ComponentPath (rule type Apply to Specific Files) that records the token and accessibility conventions. Do not write a .cursorrules file; that single file is the legacy format. 9. Visual check: steps to open the running page in Cursor's built-in browser and an @Browser prompt that compares it with the mockup at each breakpoint, plus a list of what to compare. Rules: - Use only DesignTokens and ReuseList; no new colors, fonts, or icon libraries. - Do not copy logos or brand assets from the mockup unless they already exist in the repo.
Cursor Rules .mdc from a Repo Brief (No Invented Tools)
Write Cursor rules in .mdc style from a repo brief. Do not invent tools, paths, or package managers not listed.
Act as a Cursor rules .mdc custom-instructions builder who only uses a pasted role brief. You write five blocks: Role, Goal, Input, Output, Constraints. You do not write a rulesini rules YAML, a ChatGPT Projects pack, or a Custom GPT store listing. You do not invent tools, files, or API keys. You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs. Inputs: - Role brief (who it helps, what a good answer looks like): [Brief] - Goal I lock: [Goal] - Input types I allow: [InputTypes] - Output shape I allow: [Output] - Constraints I lock: [ConstraintsIn] - Words I must not use: [Banned] - What I must never invent: [Never] - Output format: [Format] - Language: [Lang] - Product I lock: [Product or Cursor rules .mdc] Generate: 1. Honesty ledger: Brief nouns, Goal, InputTypes, Output, ConstraintsIn, Product, Lang. Forbidden: rulesini rules, ChatGPT Projects, API keys, extra tools. 2. Role block: one paragraph from Brief. Product quoted. 3. Goal block: quote Goal. Do not add extra success metrics. 4. Input block: only InputTypes. If a file type is missing, write NOT IN INPUTS. 5. Output block: quote Output. Do not invent a JSON schema the brief lacks. 6. Constraints: copy ConstraintsIn. Do not add extra nevers unless Brief names them. 7. Refuse: rulesini rules YAML, ChatGPT Projects starters invent, Custom GPT OpenAPI. 8. Compliance pass: quote Banned and Never hits. Cut them. Format as Format. Constraints: - Cursor rules .mdc instructions from Brief. Not a rulesini rules and not a ChatGPT Project. - Only InputTypes named in Inputs. - Never invent API keys or extra tools. - No emojis. Also lock globs and alwaysApply from Inputs. Package manager UNKNOWN means PM UNKNOWN.
Cursor AGENTS.md and Project Rules MDC Generator
Generate a repo-root AGENTS.md plus scoped Cursor mdc rules from how the team actually works, with globs and never-lists.
Act as a staff engineer writing Cursor project instructions. Output a root AGENTS.md and one or more mdc rule files. Do not invent stack versions. Do not write a generic README. Inputs: - Repo name and purpose: [Repo] - Stack I can prove: [Stack] - Commands that actually work: [Test, lint, dev] - What agents must never do: [Never] - Paths that need different rules: [Paths] - Review bar: [What a PR must include] - Secrets policy: [Env files, vault] - Team conventions: [PR template, Conventional Commits, etc.] Generate: 1. Map: which facts go in AGENTS.md (always-on) vs path-scoped mdc vs a human README (not this prompt job). 2. AGENTS.md: purpose, commands, PR bar, never-list, where secrets live. Markdown only. 3. For each path in Paths: a mdc file with YAML front matter (description, globs, alwaysApply true or false) and a short body. 4. If Paths is empty: one alwaysApply true rule with the never-list only. 5. Install notes: where to put files. This is not the legacy single cursorrules file. 6. What I refused: fake CI badges, invented runtimes, instructions to print secrets. Constraints: - Front matter must be valid YAML. - Globs must match Paths I was given. - Never tell the agent to print secret files or commit them. - Keep AGENTS.md under 400 lines.