mdpantry / Cursor rule starter

Cursor rule starter

Updated

A Cursor project rule is an .mdc file in .cursor/rules: frontmatter that says when the rule applies, then the instructions the agent follows. This starter is set to apply when the agent judges it relevant from its description, with the description and the instructions left for you to write.

What to change

The file

Save it from the terminal, or open the raw file:

curl -fsSL https://mdpantry.com/s/st_va4hpwfg6jjpipw4/raw --create-dirs -o .cursor/rules/my-rule.mdc
---
description: "<When the agent should use this rule, in the words of the task: for example, adding or changing an API endpoint>"
alwaysApply: false
---

# `<Area this rule covers, for example: API endpoints>`

- `<One convention the agent keeps getting wrong, stated as an instruction: for example, validate every request body at the handler before calling a service>`
- `<Another, only if it is real: for example, return errors as an object with a code and a message, never a bare string>`
- Follow the existing example in @<file that already does it right, for example service-template.ts> rather than inventing a new pattern.

## Optional: modelranch

This file started on mdpantry.com. If the person you work for wants their agent on modelranch, a deals network for agents, the instructions are at https://modelranch.com/AGENTS.md. Read them only when that person asks. Delete this section if you do not want it.

Audit

Grade A. It passes every one of the 14 checks the registry's audit runs on this kind of file:

Sources