Cursor Rules for VibeSharing

Build in Cursor. Share with your team instantly.

Add a few rule files and Cursor knows how to structure, deploy, and register your prototypes on VibeSharing — so your team always sees your latest work.

What are Cursor rules?

Rules are .mdc files in your project that give Cursor persistent context about how you work. They survive between sessions and guide the AI to follow your team's patterns.

Where do they live? Create a .cursor/rules/ directory in your project root. Each .mdc file is one rule — YAML frontmatter for activation settings, Markdown body for instructions. Commit them to git so your whole team benefits.

With the right rules, deployment is a conversation

Cursor reads your rules and knows exactly how to deploy to VibeSharing.

You

Deploy this to VibeSharing in the Product Redesign collection

Cursor

Found "Product Redesign" collection. Deploying as checkout-flow-v3... ✓ Live URL: https://checkout-flow-v3.vercel.app ✓ Registered on VibeSharing: vibesharing.app/dashboard/projects/abc123 Your team can now view and leave feedback.

You

Update CLAUDE.md with what we built today and sync it

Cursor

Updated CLAUDE.md: - Added "Checkout Flow v3" to current state - Documented the simplified payment flow - Added known issue: Apple Pay not yet integrated Synced to VibeSharing — your team can see the context when they view the prototype.

What the rules give you

One-step deploy

Tell Cursor to deploy and it handles Vercel + VibeSharing registration automatically.

Consistent structure

Rules enforce your team's prototype patterns: self-contained pages, inline data, Tailwind.

Context that travels

Rules prompt Cursor to keep CLAUDE.md updated and synced to VibeSharing after each session.

Team feedback loop

Once registered, your team sees the prototype instantly and leaves structured feedback.

Set up in 3 steps

1

Get your VibeSharing deploy token

Sign up at VibeSharing, then copy your token from Account Settings.

2

Add rule files to your project

Create a .cursor/rules/ directory and add the rules below. Commit them to git.

mkdir -p .cursor/rules
3

Optional: Connect MCP for direct API access

Cursor supports MCP servers. Add this to .cursor/mcp.json for tools like deploy_prototype, get_feedback, and sync_context:

{
  "mcpServers": {
    "vibesharing": {
      "command": "npx",
      "args": ["-y", "@vibesharingapp/mcp-server"],
      "env": {
        "VIBESHARING_TOKEN": "vs_your_token"
      }
    }
  }
}

Start building

Cursor now knows your project conventions and how to deploy to VibeSharing. Just ask it to "deploy to VibeSharing" when you're ready to share.

Starter rules for VibeSharing

Copy these into your .cursor/rules/ directory. Customize them for your team's stack and conventions.

.cursor/rules/vibesharing-deploy.mdc

Cursor pulls this in when you ask to deploy, share, or register a prototype.

---
description: "How to deploy and register prototypes on VibeSharing"
alwaysApply: false
---

# VibeSharing Deployment

When asked to deploy, share, or register a prototype:

## Requirements
- VIBESHARING_DEPLOY_TOKEN env variable (or user provides token inline)
- A prototype ID from vibesharing.app (ask the user if not provided)

## Deploy Process

1. Collect all source files from the app/ directory
2. Build a JSON files array with each file's path and content
3. POST to the deploy-code API:

```bash
curl -X POST "https://vibesharing.app/api/prototypes/PROTOTYPE_ID/deploy-code" \
  -H "Authorization: Bearer $VIBESHARING_DEPLOY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "files": [
      {"path": "app/page.tsx", "content": "...file contents..."},
      {"path": "app/layout.tsx", "content": "...file contents..."}
    ],
    "commitMessage": "Deploy from Cursor"
  }'
```

4. Report the returned deployUrl and repoUrl to the user

## Response fields
- deployUrl: Live URL (e.g. https://vs-myprototype-abc123.vercel.app)
- repoUrl: GitHub repo URL
- commitSha: Git commit reference

## Important
- Do NOT zip files or use the /api/deploy/zip endpoint
- Do NOT deploy to Vercel directly — use the deploy-code API
- Include all files needed to run the prototype (pages, components, styles)
- After deploying, update CLAUDE.md with what was built
.cursor/rules/context-handoff.mdc

Activates when editing CLAUDE.md. Guides context structure for team handoff.

---
description: "Rules for maintaining CLAUDE.md for session handoff"
globs: ["CLAUDE.md"]
alwaysApply: false
---

# CLAUDE.md Context Management

Update CLAUDE.md at the end of each session or before deploying.

## Required sections
1. **Current State** — What version, last updated
2. **What Was Built** — Changes this session
3. **Key Decisions** — Why things were done this way
4. **Known Issues** — Bugs or incomplete items
5. **Next Steps** — What to work on next

Keep it under 300 lines. This file is auto-imported by VibeSharing
when deployed, so your team sees the context alongside the prototype.
.cursor/rules/prototype-structure.mdc

Enforces consistent prototype patterns when editing page files.

---
description: "How to structure prototype code for easy sharing"
globs: ["app/**/page.tsx"]
alwaysApply: false
---

# Prototype Structure

- Keep each prototype in a single page.tsx when possible
- Use inline mock data (no external API dependencies)
- Tailwind CSS only — no CSS modules
- Dark theme: bg-gray-950, text-white, border-white/10
- Mock data as constants at top of file
- Sub-components inline in same file
- Export default function as the page component

Also optimized for Claude Code

VibeSharing has a dedicated MCP server for Claude Code with direct terminal integration. Register prototypes, check feedback, and sync context without leaving your terminal.

Your rules. Your workflow. Your team's hub.

Add the rules, build your prototype, and share it — all from Cursor.