2-1 What are Prompts? How to Set Up Prompts with ./cursor/rules?

April 19, 2025

☕️ Support Us
Your support will help us to continue to provide quality content.👉 Buy Me a Coffee

In this article, we'll explore how to get higher quality responses when using Cursor, and how to achieve your goals more precisely when asking AI agents to help complete tasks. We'll start with "prompts" in this first unit, as prompts are a crucial component when asking AI to answer questions or complete tasks. We'll first introduce what prompts are, and then show you how to set up prompts through Cursor Rules to boost your Cursor efficiency.

What are Prompts?

A prompt is essentially a hint or instruction you give to an AI model. Through this prompt, you can guide the AI to give responses that best match your expectations. "Best match your expectations" means the response actually meets your needs.

Here's an example to illustrate this: imagine you ask AI to answer a question, but you don't specify whether you want a detailed or concise response. The AI might give you too much detail, making it feel overwhelming, or it might oversimplify and lack enough context to meet your needs. This is where prompts come in - they clearly tell the AI what kind of response style you want.

For example:

  • If you want a concise response, you can include in your prompt: "Please ensure your answer is brief and to the point, without excessive detail."
  • If you're unfamiliar with a topic and want more background information, you can write: "Please ensure your answer is detailed with sufficient context so that someone unfamiliar with the concept can easily understand."

For readers interested in learning more, I recommend checking out our Prompt Engineering Basics article.

How to Set Up Prompts in Cursor?

In Cursor, you can set up prompts through Cursor Rules. According to the official documentation, there are two ways to set this up:

Global Cursor Rules

Global Cursor Rules are settings that apply to all conversations or AI agents when no specific prompt is specified. Here are two practical global prompts we recommend:

Shared by Cursor Employee (link)

Global prompt shared by Cursor employee
Global prompt shared by Cursor employee

Recommended by OpenAI Researcher (link)

Global prompt recommended by OpenAI researcher
Global prompt recommended by OpenAI researcher

Project-Specific Cursor Rules

Beyond global settings, Cursor also supports project-level prompts. To set this up, create a .cursor folder in your project, then create a rules subfolder inside .cursor, and set up different prompt files within it.

Setting up project-specific prompts has these advantages:

  • Direct reference, reducing repetitive input: For example, when writing tests, without prompts you might need to input a complete instruction to get high-quality test code. But with prompts set up, you can reference them directly, saving significant time.
  • AI agents use them automatically: When using AI agent mode (Command + I), the agent automatically looks for suitable prompts in .cursor/rules and applies them automatically.

Where Can You Find More Prompt Resources?

If you're looking for more prompt inspiration, here are two resources we recommend:

  1. cursor.directory (https://cursor.directory/: A collection of project prompts specifically for Cursor, organized by programming language, framework, and package.
  2. The awesome-cursorrules project on GitHub (https://github.com/PatrickJS/awesome-cursorrules): Also organizes prompts for various languages and frameworks, perfect for open-source enthusiasts to explore.
Various prompts collected in cursor.directory
Various prompts collected in cursor.directory

Support ExplainThis

If you found this content valuable, please consider supporting our work with a one-time donation of whatever amount feels right to you through this Buy Me a Coffee page.

Creating in-depth technical content takes significant time. Your support helps us continue producing high-quality educational content accessible to everyone.

☕️ Support Us
Your support will help us to continue to provide quality content.👉 Buy Me a Coffee