# Cursor rules files format aren't clear

**URL:** <https://forum.cursor.com/t/cursor-rules-files-format-arent-clear/51419>\
**Category:** Help\
**Created:** [February 16, 2025, 8:09pm UTC](https://forum.cursor.com/t/cursor-rules-files-format-arent-clear/51419 "2025-02-16T20:09:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![testacode](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/testacode/32/26987_2.png) [@testacode](https://forum.cursor.com/u/testacode)\
**Post date:** [February 16, 2025, 8:09pm UTC](https://forum.cursor.com/t/cursor-rules-files-format-arent-clear/51419/1 "2025-02-16T20:09:39Z")

</div>

Hi everyone!

I’m a newcomer client, and I want to start by saying that Cursor offers a really neat and structured way of working—kudos for that! However, after a few days of exploring, I’m still unsure about the correct format for the **Cursor Rules** file.

I tried using [Cursor Directory - Cursor Rules & MCP Servers](https://cursor.directory/generate) to ease the process and generate basic rules from my `package.json`, but the resulting file seems to already be deprecated.

When I checked the documentation ([Cursor – Rules for AI](https://docs.cursor.com/context/rules-for-ai)), I found it quite confusing. It’s unclear what these rule files should look like, and there seem to be multiple, sometimes conflicting, suggestions from others on how to implement them.

It would be a huge help if the documentation were clearer and more consistent. A few example files or a step-by-step guide on building valid rule files from scratch would make a world of difference for new users like me.

Thanks for the hard work, and I’m looking forward to seeing this improve!

---

<div class="post-metadata">

**Author:** ![gitcnd](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/gitcnd/32/25840_2.png) [@gitcnd](https://forum.cursor.com/u/gitcnd)\
**Post date:** [February 19, 2025, 10:44pm UTC](https://forum.cursor.com/t/cursor-rules-files-format-arent-clear/51419/2 "2025-02-19T22:44:12Z")

</div>

Control-Shift-P → “New Cursor Rule”

rules files must adhere to the below structure, live in the folder .cursor\rules\ have the file extension .mdc and use nothing other than lowercase and hyphens in their filename.

```
---
description: the agent will choose rules based on this description here 
globs: list of files and file patterns to trigger these rules to be auto-included to the agent context when matched; e.g. *.cs, src/config/**/*.json, *Test.cpp
---

- list of rules 
- You can @ files here
- You can use markdown but dont have to

```

- This is the master documentation for Cursor IDE rules: [Cursor – Rules for AI](https://docs.cursor.com/context/rules-for-ai)

---

<div class="post-metadata">

**Author:** ![testacode](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/testacode/32/26987_2.png) [@testacode](https://forum.cursor.com/u/testacode)\
**Post date:** [February 19, 2025, 11:12pm UTC](https://forum.cursor.com/t/cursor-rules-files-format-arent-clear/51419/3 "2025-02-19T23:12:39Z")

</div>

Thank you for the example, I must be blind because I couldn’t see that snippet in the page that you suggest. Cheers!

 ![docs.cursor.com_context_rules-for-ai](https://us1.discourse-cdn.com/cursor1/original/3X/4/1/411bf651653896ae9dce9094d60f7d7eb903cf53.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 18, 2026, 10:28am UTC](https://forum.cursor.com/t/cursor-rules-files-format-arent-clear/51419/4 "2026-06-18T10:28:43Z")

</div>

Closed on June 18, 2026, 10:28am UTC


