agentleFS
JustineDevsJustineDevs/premortem/.cursor/rules/CO-STAR-UI-CREATOR/README.md

premortem / CO-STAR-UI-CREATOR

Cursor rule2 starsChanged 5 months agoApache-2.0View on GitHub

A structured prompt system for building React/Next.js UIs with modern component registries (shadcn, Magic UI, Aceternity, etc.). Use this guide to set up and use the CO-STAR prompts in your IDE. Mac / Linux (Bash): Windows (PowerShell): What this does: Put only ui.md in commands/. Put the rest of the files in rules/CO-STAR-UI-CREATOR/. When you invoke /ui or /ui.md, it automatically uses and redirects to the files in rules/. Paths: - Command (invoke): your-project/.cursor/commands/ui.md - Resources (referenced by ui.md): your-project/.cursor/rules/CO-STAR-UI-CREATOR/

  • Deletes or force-pushes

The file

We split this README.md into the rules it gives an agent

10 rules. About 0 are common, 2 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Put only ui.md in commands/.

    line 64
  2. Very specific:

    How it works: When you type /ui or /ui.md, the command runs ui.md.

    line 85
  3. Very specific:

    Create .cursor in your project root if it doesn't exist.

    line 108
  4. Very specific:

    Put ui.md in .cursor/commands/ui.md.

    line 109
  5. Very specific:

    Put the rest (AGENT.mdc, CO-STAR-PROMPT.md, CO-STAR-CREATOR.md, README.md) in .cursor/rules/CO-STAR-UI-CREATOR/.

    line 110
  6. Very specific:

    If your IDE doesn't support .cursor rules or commands:

    line 117
  7. Very specific:

    Use CO-STAR-CREATOR.md when you want to create a custom CO STAR prompt.

    line 123
  8. Distinctive:

    Use the resulting prompt as a custom system prompt or reference in your IDE.

    line 154
  9. Distinctive:

    Start a new chat.

    line 161
  10. Very specific:

    If it doesn’t, reference the prompt directly: @rules/CO-STAR-UI-CREATOR/CO-STAR-PROMPT.md or paste the relevant section into the chat.

    line 165

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
README.md

CO-STAR UI Creator — Setup & Usage Guide

A structured prompt system for building React/Next.js UIs with modern component registries (shadcn, Magic UI, Aceternity, etc.). Use this guide to set up and use the CO-STAR prompts in your IDE.


Plug & play — copy, paste, go

Just get the folder (fastest & simplest)

  1. Open your terminal (Bash or PowerShell) inside your project folder (where you want .cursor/ to live).
  2. Copy and paste one block below and run it.

Mac / Linux (Bash):

# 1. Download only that specific folder
git clone --depth 1 --filter=blob:none --sparse https://github.com/JustineDevs/Public-Github-Repo.git
cd Public-Github-Repo
git sparse-checkout set "AI Development/.cursor/commands/ui-template/CO-STAR-UI-CREATOR"
# 2. Move files to your project and clean up
mkdir -p ../.cursor/commands ../.cursor/rules
cp "AI Development/.cursor/commands/ui-template/CO-STAR-UI-CREATOR/ui.md" "../.cursor/commands/"
cp -r "AI Development/.cursor/commands/ui-template/CO-STAR-UI-CREATOR" "../.cursor/rules/"
cd .. && rm -rf Public-Github-Repo

Windows (PowerShell):

# 1. Download only that specific folder
git clone --depth 1 --filter=blob:none --sparse https://github.com/JustineDevs/Public-Github-Repo.git
cd Public-Github-Repo
git sparse-checkout set "AI Development/.cursor/commands/ui-template/CO-STAR-UI-CREATOR"
# 2. Move files to your project and clean up
New-Item -ItemType Directory -Force -Path "..\.cursor\commands", "..\.cursor\rules" | Out-Null
Copy-Item "AI Development\.cursor\commands\ui-template\CO-STAR-UI-CREATOR\ui.md" "..\.cursor\commands\"
Copy-Item -Recurse "AI Development\.cursor\commands\ui-template\CO-STAR-UI-CREATOR" "..\.cursor\rules\"
cd ..; Remove-Item -Recurse -Force Public-Github-Repo

What this does:

  1. Snatched the folder — Grabs only that directory from GitHub (no full repo).
  2. Placed it correctly — Creates .cursor/commands and .cursor/rules in your project and puts the files there.
  3. Self-deleted — Removes the temporary Public-Github-Repo folder so your workspace stays clean.

What's in this folder

FilePurpose
ui.mdUniversal command — put in commands/ only. Invoke with /ui or /ui.md; AI uses and redirects to files in rules/CO-STAR-UI-CREATOR/.
CO-STAR-PROMPT.mdMain development prompt — keep in rules/CO-STAR-UI-CREATOR/. Used when building or implementing UI.
CO-STAR-CREATOR.mdGuide for creating your own CO STAR prompt — keep in rules/CO-STAR-UI-CREATOR/.
AGENT.mdcCursor rule — keep in rules/CO-STAR-UI-CREATOR/. Tells the AI to use the prompts correctly.

Where to put these files

Cursor (recommended layout)

Put only ui.md in commands/. Put the rest of the files in rules/CO-STAR-UI-CREATOR/. When you invoke /ui or /ui.md, it automatically uses and redirects to the files in rules/.

File tree:

your-project/
└── .cursor/
    ├── commands/
    │   └── ui.md                    ← only this in commands; invoke /ui or /ui.md
    └── rules/
        └── CO-STAR-UI-CREATOR/
            ├── AGENT.mdc
            ├── CO-STAR-PROMPT.md
            ├── CO-STAR-CREATOR.md
            └── README.md

Paths:

  • Command (invoke): your-project/.cursor/commands/ui.md
  • Resources (referenced by ui.md): your-project/.cursor/rules/CO-STAR-UI-CREATOR/

How it works: When you type /ui or /ui.md, the command runs ui.md. The AI then uses and redirects to the prompts in rules/CO-STAR-UI-CREATOR/ (CO-STAR-PROMPT.md, CO-STAR-CREATOR.md) as defined in ui.md. No long path — everything is resolved from the command.

Alternative (all in commands): You can instead keep the full folder under commands/:

your-project/
└── .cursor/
    └── commands/
        └── ui-template/
            └── CO-STAR-UI-CREATOR/
                ├── ui.md
                ├── AGENT.mdc
                ├── CO-STAR-PROMPT.md
                ├── CO-STAR-CREATOR.md
                └── README.md

Then /ui or /ui.md still works; the prompts live next to ui.md in the same folder.


VS Code (with Cursor or similar AI)

  1. Create .cursor in your project root if it doesn't exist.
  2. Put ui.md in .cursor/commands/ui.md.
  3. Put the rest (AGENT.mdc, CO-STAR-PROMPT.md, CO-STAR-CREATOR.md, README.md) in .cursor/rules/CO-STAR-UI-CREATOR/.
  4. Same behavior: /ui or /ui.md uses and redirects to the rules folder.

Other IDEs (generic)

If your IDE doesn't support .cursor rules or commands:

  1. Copy the folder anywhere in your project (e.g. docs/prompts/CO-STAR-UI-CREATOR/).
  2. Reference the prompts manually:
    • Open CO-STAR-PROMPT.md when doing UI development.
    • Copy its contents (or the relevant section) into your AI chat as context.
    • Use CO-STAR-CREATOR.md when you want to create a custom CO STAR prompt.
  3. Bookmark the folder so you can quickly open and paste prompts into your AI assistant.

Invoke the command (short)

With ui.md in .cursor/commands/, use the universal command:

You typeResult
/ui or /ui.mdCommand runs ui.md; AI automatically uses and redirects to the files in rules/CO-STAR-UI-CREATOR/ (CO-STAR-PROMPT.md or CO-STAR-CREATOR.md). Short — no long path.

Example: type /ui or /ui.md in chat, then your request (e.g. "add a pricing section"). The AI routes to the right file in the rules folder and responds without you pasting a long path.


How to use

For UI development (building components, pages, design systems)

  1. Open a chat with your AI assistant in the project.
  2. Reference or paste CO-STAR-PROMPT.md (or @CO-STAR-PROMPT.md in Cursor).
  3. Describe what you want to build (e.g. "Add a pricing section using shadcn-style components").
  4. The AI will follow the CO-STAR flow: discovery questions → plan → implementation.

For creating your own CO STAR prompt

  1. Open CO-STAR-CREATOR.md.
  2. Work through the sections (Context, Objective, Style, Tone, Audience, Response format).
  3. Fill in your product, design system, and goals.
  4. Use the resulting prompt as a custom system prompt or reference in your IDE.

Verifying it works (Cursor)

  1. Open your project in Cursor (with ui.md in .cursor/commands/ and CO-STAR-UI-CREATOR in .cursor/rules/).
  2. Start a new chat.
  3. Type /ui or /ui.md, then e.g. "Help me add a hero section following the CO-STAR approach."
  4. The AI should use ui.md, redirect to the rules folder, and follow the CO-STAR flow (discovery → plan → implementation).

If it doesn’t, reference the prompt directly: @rules/CO-STAR-UI-CREATOR/CO-STAR-PROMPT.md or paste the relevant section into the chat.


Troubleshooting

IssueFix
AI ignores the CO-STAR flowExplicitly @ mention CO-STAR-PROMPT.md in your message.
Rules not applyingEnsure AGENT.mdc has alwaysApply: true or the right glob patterns.
Wrong folder locationPut ui.md in .cursor/commands/ui.md; put prompts in .cursor/rules/CO-STAR-UI-CREATOR/.
/ui or /ui.md not showingEnsure ui.md is at .cursor/commands/ui.md so the slash command is available.
Using a different IDECopy prompts manually into your AI chat when needed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.