$ Using AI Development Tools
Understand how to use AI Powered Development Tools to enhance your workflow.
We have a collection of tutorials, guides, and resources to help you get started.
These cover core topics like using Rules, Prompts, PRDs, mdc Files, and more.
Use the right tool
Answer a few questions about your development needs and get personalized AI tool recommendations.
The Right Tool for the Right Reasons
NewGet personalized AI tool recommendations based on your team's profile and needs.
- Custom tool stack recommendations
- Budget-aware suggestions
- Tech stack compatibility
- Complete development lifecycle coverage
Tutorials
Step-by-step tutorials to help you get started with AI tools and integrate them into your workflow.
Explore Our AI Tutorials Collection
New PageWe've moved all our tutorials to a dedicated page to make them easier to find and navigate. Check out our collection of detailed guides for various AI tools.
- Getting started with AI-powered IDEs
- Cursor & Windsurf AI setup guides
- Custom rules and prompt engineering
- External tutorials from trusted sources
Rules & Prompts
Learn how to use Project Rules in Cursor to enhance your development workflows and maintain code quality.
Comprehensive Analysis of Using Project Rules in Cursor AI
Comprehensive Analysis of Using Project Rules in Cursor AI
Creating Cursor Rules and Windsurf Rules
Both Cursor and Windsurf are AI-powered coding tools that use rules files to customize their behavior and provide context-aware assistance. Learn how to create, save, and use these rules to enhance your development workflow.
Syntax to Use
- Format: Both tools use plain text or Markdown syntax. Rules should be clear, concise, and structured with headings, lists, or code blocks for readability.
- Content: Include project context, coding standards, preferred tools/libraries, and specific instructions. Use natural language or pseudo-code when needed.
- Comments: Use # or // for comments to explain intent (optional but helpful).
- File References: In Cursor, you can use @file to reference other files; Windsurf doesn't natively support this but can infer context from mentioned files.
How to Save Files and Where
- Cursor Rules:
- File Name: .cursorrules (single file) or multiple .mdc files in a .cursor/rules directory (introduced in v0.45).
- Location: Place .cursorrules in your project's root directory (e.g., /my-project/.cursorrules). For the newer system, create a .cursor/rules folder in the root and add .mdc files like react-rules.mdc.
- Saving: Use any text editor (e.g., VS Code, Notepad) and save as plain text with the correct extension.
- Windsurf Rules:
- File Name: .windsurfrules
- Location: Save in your project's root directory (e.g., /my-project/.windsurfrules).
- Saving: Same as Cursor—use a text editor and save as plain text.
Examples of Well-Written Rules
Well-Written Cursor Rule (.cursorrules)
# Project: Task Tracker
## Context
- Building a React app with TypeScript, Tailwind CSS, and Next.js App Router.
- Focus on reusable components and minimal state.
## Guidelines
1. Use functional components with TypeScript interfaces for props.
2. Prefer Tailwind CSS for styling over CSS modules.
3. Avoid `useEffect` unless strictly necessary; use server components where possible.
4. Write concise, readable code with clear variable names.
## Example Component Structure
```tsx
interface ButtonProps {
label: string;
onClick: () => void;
}
export const Button = ({ label, onClick }: ButtonProps) => (
<button className="px-4 py-2 bg-blue-500 text-white rounded" onClick={onClick}>
{label}
</button>
);
```
Why it's good: Specific, structured, includes context, guidelines, and an example. Cursor can reliably follow this to generate consistent code.
Well-Written Windsurf Rule (.windsurfrules)
**Project: API Client**
**Context**
* Node.js backend with Express and TypeScript.
* Uses npm, not pnpm or yarn.
**Rules**
* Always use async/await for promises, no .then().
* Structure endpoints in routes/ folder (e.g., routes/users.ts).
* Validate inputs with Zod before processing.
**Sample Route**
```ts
import { Router } from 'express';
import { z } from 'zod';
const router = Router();
const userSchema = z.object({ name: z.string(), age: z.number() });
router.post('/users', async (req, res) => {
const data = userSchema.parse(req.body);
res.json({ message: 'User created', data });
});
```
Why it's good: Clear project context, actionable rules, and a practical example. Windsurf's Cascade can use this to generate or edit code accurately.
Tips for Success
- Be Specific: Define languages, frameworks, and patterns explicitly.
- Test Rules: After saving, ask the AI a simple task (e.g., "Write a button component") to ensure it follows your rules.
- Update as Needed: Refine rules as your project evolves.
- Leverage Structure: Use headings and examples to make rules easy for both you and the AI to interpret.
We All Gotta Be Prompt Now...
Cursor and Windsurf are advanced AI-driven coding platforms that assist with tasks like code generation, debugging, and explanations. Learn how to craft effective prompts to get the best results from these tools.
Writing Good AI Prompts
Prompts for Cursor and Windsurf should be written in plain English (or your preferred language), but they must be specific and structured to avoid ambiguity. Here's how to do it:
- Be Specific: Clearly define the task using action words like "generate," "refactor," "debug," or "explain." Vague requests lead to vague results.
- Provide Context: Mention the programming language, frameworks, or files involved to give the AI a clear scope.
- Use References: Both tools support referencing files or the codebase with syntax like @filename or @codebase to enhance context.
- Syntax: There's no strict format, but concise, logical sentences work best. For complex tasks, break them into steps (e.g., "First, create a file... Then, define a function...").
Tips
- Avoid jargon unless it's relevant to your codebase.
- If the AI's response isn't ideal, refine your prompt (e.g., "Fix the syntax error in the previous output").
Saving Prompts
You can save prompts in two ways, depending on their purpose:
- Project-Wide Instructions:
- Cursor: Store them in the .cursor/rules/ directory within your project, typically in a file like .cursor/rules/cursorrules.mdc. Use Markdown or plain text (e.g., "Always use TypeScript").
- Windsurf: Save them in a .windsurfrules file in the project root (e.g., "Prefer arrow functions over traditional functions").
- Task-Specific Prompts: These are usually written on the fly in the tool's interface (e.g., chat or inline edit features like Cursor's Composer or Windsurf's Cascade) and don't need saving unless you want to reuse them. For reuse, consider noting them in a personal file or using a text expansion tool like Espanso.
Where to Save
- .cursor/rules/ (Cursor) and .windsurfrules (Windsurf) live in your project directory.
- Check your tool's documentation for exact file naming or additional options.
Examples of Good and Bad Prompts
Well-Written Prompts
- Prompt: "Generate a React component in @components/Login.js with a form for email and password, styled with Tailwind CSS."
- Why it works: Specifies the task, file, and styling framework.
- Prompt: "Debug this JavaScript function in @sort.js; it should sort an array but fails with negative numbers."
- Why it works: Provides context and identifies the issue.
- Prompt: "Refactor this Python code to use async/await instead of promises."
- Why it works: Clear action and desired outcome.
Poorly Written Prompts
- Prompt: "Make a login page."
- Why it fails: Lacks details on framework, structure, or location.
- Prompt: "Fix this."
- Why it fails: No context or indication of what's wrong.
- Prompt: "Write some code."
- Why it fails: Too vague; the AI can't guess your intent.
See How Others Have Created Rules and Prompts
We are all learning together. Explore these GitHub repositories that offer curated collections, best practices, and community-driven resources for Cursor and Windsurf rules and prompts:
Instructa AI Prompts
This repository is dedicated to collecting and sharing AI prompts, best practices, and rules for developers. It includes examples specifically for Cursor and Windsurf, organized in a structured way to help you integrate them into AI-assisted coding environments.
Awesome Windsurf Rules
A community-driven collection featuring a curated list of global rules and Windsurf-specific rules. It's a great resource for finding well-crafted examples tailored to Windsurf.
Pontusab/Directories
This serves as a community hub for Cursor and Windsurf users. It provides a collection of rules and Model Context Protocols (MCPs) that can double as prompts, making it a useful spot for both finding and sharing examples.
Waynesutton/Promptstack
A searchable repository of AI prompts and code generation rules for various tools, including Cursor and Windsurf. It's designed to enhance developer workflows and offers a broad range of examples.
Ifengtech/AgentRules
This repository contains agent rules for Cursor and Windsurf, as well as prompts for GPTs, compiled from multiple sources. It's a versatile collection for different AI tool users.
Kinopeee/Windsurfrules
Focused specifically on Windsurf, this repository provides examples and configurations of rules that you can adapt or use directly.
Inventory of Project Rules
Browse a comprehensive inventory of available Project Rules for Cursor, featuring common configurations for different programming languages and frameworks.
Rule Categories
Error Prevention
Rules to catch common bugs and mistakes early in development.
View Error Prevention RulesUniversal Project Rules Inventory
Below is a table of universal project rules that can be implemented in Cursor AI. These rules can be adapted for any programming language and are essential for maintaining high-quality, consistent code across projects.
View Example Cursor Project Rules
Project-Specific Cursor Rules
Browse our comprehensive collection of project-specific rules for Cursor, organized by project type. These rules can be directly implemented in your Cursor Project Rules configuration.
mdc Files
Learn how to effectively use mdc files to enhance your AI development workflow.
.mdc Introduction
Understanding the fundamentals of mdc files, relationship with Rules and their role in software development
When to Use .mdc Files
Learn when and how to effectively use .mdc files in different development scenarios
.mdc Best Practices
Learn how to effectively create and use .mdc files to enhance your AI development workflow.
.mdc Simple Example
A practical guide with a simple example of an .mdc file implementation.
More Complex .mdc Examples
Explore a collection of sample MDC files and learn how to structure them effectively.
Using a PRD
Learn how to effectively use Product Requirements Documents (PRDs) in your development workflow.
PRD vs Project Rules
Understanding the key differences between Product Requirements Documents and Project Rules
Learn MorePRD SaaS Template
Access a comprehensive PRD template for a SaaS CRM application, including detailed specifications and requirements.
Learn MorePRD Best Practices
Learn the Do's and Don'ts for creating and maintaining effective PRDs.
Learn More