Usage Examples - VidAIze/cursor-project-rules GitHub Wiki

Usage Examples

This page provides practical examples of how to use Cursor Project Rules to enhance your development workflow. These examples demonstrate how to leverage the AI's knowledge of various frameworks and libraries.

Basic Usage

Once you have installed the Cursor Project Rules (see Installation Guide), the AI will automatically have access to the documentation when you ask related questions.

Example Prompts

Here are some example prompts you can use to leverage the documentation:

AI SDK Examples

"Create a simple chat interface using AI SDK with OpenAI provider"
"How do I stream text responses from the AI SDK?"
"Show me how to implement tool calling with AI SDK"

Clerk Authentication Examples

"Set up Clerk authentication in my Next.js app"
"How can I implement user sign-up with Clerk?"
"Create protected routes using Clerk in my application"

Schematic Payment Examples

"How do I integrate Schematic payments in my application?"
"Set up a subscription form with Schematic"
"Implement usage-based billing with Schematic"

Shadcn UI Examples

"Add a shadcn/ui dropdown component to my React application"
"Create a responsive form using shadcn/ui components"
"How do I customize themes in shadcn/ui?"

TailwindCSS v4 Examples

"Set up TailwindCSS v4 in my project"
"Create a responsive layout using TailwindCSS v4"
"How do I use the new features in TailwindCSS v4?"

Convex Examples

"Set up a Convex backend for my Next.js application"
"How do I create a schema and database tables with Convex?"
"Implement CRUD operations with Convex in my React app"

Polar Payment Examples

"Set up Polar for subscription payments in my application"
"How do I implement usage-based pricing with Polar?"
"Create a checkout page with Polar payments"

Advanced Usage Patterns

Combining Multiple Technologies

Cursor AI can help you integrate multiple technologies together:

"Create a login form with Clerk authentication and style it with shadcn/ui and TailwindCSS"
"Build a subscription dashboard that uses Schematic for payments and the AI SDK for analytics"
"Create a SaaS application with Convex as the backend, Clerk for authentication, and Polar for payments"

Complex Implementation Examples

For more complex implementations, provide context and specific requirements:

"I want to build a chat interface with the following features:
1. Authentication using Clerk
2. AI responses using the AI SDK with OpenAI
3. A clean UI with shadcn/ui components
4. Premium features locked behind Schematic payments

How should I approach this?"
"I'm building a SaaS app with these requirements:
1. Convex database for the backend
2. Clerk for user authentication
3. Polar for subscription management
4. TailwindCSS and shadcn for the UI

How should I structure this project?"

Code Refactoring

You can ask for help refactoring existing code to use these technologies:

"I have a basic authentication system using JWT. How can I migrate it to use Clerk instead?"
"My application uses regular CSS. How can I convert it to use TailwindCSS v4?"
"I'm using Firebase as my backend. How can I migrate to Convex?"

Best Practices

When interacting with the AI using these rules:

  1. Be Specific: Clearly state which technology you're working with
  2. Provide Context: Include relevant details about your project setup
  3. Ask Incremental Questions: Break down complex tasks into smaller steps
  4. Verify Implementation: Always test the generated code for accuracy

Troubleshooting

If the AI seems unfamiliar with a framework or provides outdated information:

  1. Check that you have the related rule installed
  2. Verify you're asking about a supported framework
  3. Try rephrasing your question to be more specific
  4. Use the [framework name] keyword at the beginning of your prompt

Next Steps

After you've familiarized yourself with these basic usage patterns, check out Rule Formats to learn how you can create or modify your own rules.