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.
Cursor reads your rules and knows exactly how to deploy to VibeSharing.
Deploy this to VibeSharing in the Product Redesign collection
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.
Update CLAUDE.md with what we built today and sync it
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.
Tell Cursor to deploy and it handles Vercel + VibeSharing registration automatically.
Rules enforce your team's prototype patterns: self-contained pages, inline data, Tailwind.
Rules prompt Cursor to keep CLAUDE.md updated and synced to VibeSharing after each session.
Once registered, your team sees the prototype instantly and leaves structured feedback.
Create a .cursor/rules/ directory and add the rules below. Commit them to git.
mkdir -p .cursor/rulesCursor 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"
}
}
}
}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.
Copy these into your .cursor/rules/ directory. Customize them for your team's stack and conventions.
.cursor/rules/vibesharing-deploy.mdcCursor 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.mdcActivates 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.mdcEnforces 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