Prompt Library

Cursor prompts for project rules, AGENTS.md and review lists

30 copy-paste prompts

Generate always-applied rules, AGENTS.md and review checklists from files you mention. Distinct from feature and debug prompts. Do not invent stack facts the repo does not show.

In short: This page contains 30 copy-paste ready prompts, organized into 6 categories with a description and pro tip for each. The first 5 prompts are free instantly, no signup needed. Drafted with AI writing assistance and checked against our editorial policy.

Louis Corneloup
By Louis Corneloup · Founder, Techpresso
Last updated ·Drafted with AI assistance (how we make prompts)

Always Applied Rules

5 prompts

Always-apply frontmatter skeleton

1/30

✨ What it does

Writes a .mdc rule with alwaysApply true and at most 12 bullets from stack facts you confirmed. Missing tools are tagged, so the rule does not name a package manager you do not use.

Draft one Cursor project rule file named [RULE FILE NAME].mdc that should run on every Agent chat. Use frontmatter with alwaysApply set to true, and no globs. Body: at most 12 imperative bullets from these facts I already confirmed: [CONFIRMED STACK FACTS]. If a fact is missing (language, test command, package manager), write [VERIFY] as that bullet rather than inventing a tool. Do not invent a library, a folder or a script name I did not list. Output the full file in one markdown code block I can save under .cursor/rules/.

💡

Pro tip: Keep always-applied files short. Long ones waste context on every chat.

Ask before deleting files

2/30

✨ What it does

Creates a short always-applied rule that blocks deletes and renames until you confirm, including paths you mark as no-touch. A blank path list is tagged rather than filled with guessed folders.

Write an always-applied Cursor rule that forbids deleting or renaming files unless I said so in the current chat. Project: [PROJECT NAME]. Extra no-touch paths: [NO TOUCH PATHS]. The rule must tell the agent to list the paths it would remove and wait. If [NO TOUCH PATHS] is blank, put [VERIFY] in that section and still forbid deletes. Do not invent a backup step, a git command or a folder I did not name. Output .mdc frontmatter with alwaysApply true, then the body under 120 words.

💡

Pro tip: Add generated folders you care about, such as a local data directory, to the no-touch list.

Lock the test command

3/30

✨ What it does

Locks Agent to the test command and working directory you name. A blank command is tagged so the agent does not invent a runner or a coverage gate.

Write an always-applied rule that names the only test command this repo uses: [TEST COMMAND]. Working directory for that command: [TEST CWD]. The agent must run that command, not a neighbouring one. If I left [TEST COMMAND] blank, write [VERIFY] and tell the agent to ask me rather than inventing npm, pnpm or pytest. Do not invent flags, a coverage gate or a CI vendor. Output a .mdc file with alwaysApply true and a body of at most 8 bullets, including one on how to paste failing output back.

💡

Pro tip: Paste the command from your README or CI file, character for character.

Secret and env rule

4/30

✨ What it does

Writes an always-applied secrets rule that names your env files and forbidden patterns. Missing keys are tagged, and no vault product is added from guesswork.

Draft an always-applied rule about secrets for [REPO NAME]. Env files that exist: [ENV FILE NAMES]. Patterns that must never be committed or printed: [SECRET PATTERNS]. Tell the agent to read names from those files only when I @-mention them, and never to invent a key. If a needed key is not in the pasted list, it must write [VERIFY] and stop. Do not invent a vault product or a cloud vendor. Frontmatter: alwaysApply true. Body under 140 words.

💡

Pro tip: List key names, not values. Paste the names from a committed example env file.

When not to always-apply

5/30

✨ What it does

Reviews a draft rule and splits bullets into always, glob or manual, with a suggested glob when a bullet is area-specific. Unconfirmed tools are tagged instead of replaced.

I am about to mark a rule always-applied. Rule draft: [PASTE RULE DRAFT]. Repo areas: [REPO AREAS]. Advise in a table with columns Bullet, Always, Glob instead, or Manual, and a 12 word reason. If a bullet is specific to one area in [REPO AREAS], choose Glob instead and suggest a glob from that area. If the draft names a tool I did not confirm, mark it [VERIFY] and do not invent a replacement. Do not invent a folder. End with one sentence: keep always-applied or split the file.

💡

Pro tip: Always-apply only the bullets that are true in every chat, including docs-only chats.

AGENTS.md

5 prompts

Root AGENTS.md from a README

6/30

✨ What it does

Converts your README into a root AGENTS.md with four sections and no frontmatter. Missing run commands are tagged, so Agent does not invent a start script.

Turn this README into a root AGENTS.md for Cursor. README: [PASTE README]. Keep sections: What this repo is, How to run, Where new code goes, What not to do. Use short imperative bullets. Copy commands and paths only if they appear in the README. If a run command is missing, write [VERIFY] in How to run rather than inventing one. Do not invent a stack, a cloud host or a script. Output the full AGENTS.md in one code block, under 200 lines, with no frontmatter.

💡

Pro tip: After you save it at the repo root, open a new Agent chat and check that Cursor picked it up.

Nested AGENTS.md for a package

7/30

✨ What it does

Writes a nested AGENTS.md for one package folder, adding only local commands and conventions. It does not repeat root rules, and a missing test command is tagged.

Write a nested AGENTS.md for the folder [PACKAGE PATH] in this monorepo. Package README or notes: [PASTE PACKAGE NOTES]. Root rules already say: [ROOT RULES SUMMARY]. The nested file should add only what is true inside [PACKAGE PATH]: commands, entry files and conventions from the notes. If the notes lack a test command, write [VERIFY]. Do not invent a package manager or a deploy target. Do not repeat the root summary. Explain in one line at the top that these instructions apply when Agent works under this folder.

💡

Pro tip: Put the file in the package directory, not in .cursor/rules, so Cursor scopes it to that tree.

AGENTS.md versus CLAUDE.md

8/30

✨ What it does

Diffs AGENTS.md and CLAUDE.md, then drafts a merged AGENTS.md that prefers your source of truth. Conflicts with no winner are tagged instead of quietly picking a side.

I have both files. AGENTS.md: [PASTE AGENTS MD]. CLAUDE.md: [PASTE CLAUDE MD]. Cursor reads both as always-on project instructions. Make a table with columns Topic, AGENTS.md says, CLAUDE.md says, and Action (keep one, merge, or [VERIFY] if they conflict and I gave no winner). Do not invent a third policy. Do not add a tool either file omitted. After the table, draft a merged AGENTS.md under 160 lines that prefers [SOURCE OF TRUTH] when both speak, and tags gaps [VERIFY] when neither does.

💡

Pro tip: Keep one always-on file for shared rules. Put Claude Code-only notes in CLAUDE.md after the merge.

Shrink a bloated AGENTS.md

9/30

✨ What it does

Shortens an AGENTS.md to your line target, keeping commands, paths and forbids. Mentioned-but-missing commands are tagged, and dropped bullets are listed for you to confirm.

Cut this AGENTS.md to [TARGET LINE COUNT] lines without losing commands. Current file: [PASTE AGENTS MD]. Keep: runnable commands, paths, and hard forbids. Drop: history, praise, and duplicated bullets. If a command is mentioned but not shown, write [VERIFY] rather than inventing flags. Do not invent a new section. Output the shortened file, then a list of dropped bullets grouped as safe to drop or ask me. Stay under the target line count.

💡

Pro tip: Aim for a file you would read in one sitting. Agent follows short files more reliably.

Onboarding blurb inside AGENTS.md

10/30

✨ What it does

Adds a First hour section to AGENTS.md from onboarding facts you supply. Missing folders or commands are tagged, and no Slack channel or person is invented.

Write a 80 to 120 word 'First hour' section for AGENTS.md for a new teammate on [PROJECT NAME]. Allowed facts: [ONBOARDING FACTS]. Include: which folder to open, which command to run, which rule files to read. If a fact is missing, put [VERIFY] in that sentence. Do not invent a Slack channel, a person or a badge. Do not mention debug workflows. Output only the section, as markdown, ready to paste under a heading First hour.

💡

Pro tip: Write the section for the last person who joined, using the steps they actually ran.

Scoped MDC Rules

5 prompts

Glob rule for one area

11/30

✨ What it does

Writes a glob-scoped .mdc rule for one area with at most 10 convention bullets. File names that you did not example are tagged, so the rule does not point at a phantom path.

Create a Cursor project rule that applies only to files matching [GLOB PATTERN]. Confirmed conventions for that area: [AREA CONVENTIONS]. Frontmatter: alwaysApply false, globs: the pattern I gave, and a one-line description. Body: at most 10 bullets copied from the conventions. If a convention names a file that I did not list in [AREA FILE EXAMPLES], tag that bullet [VERIFY] and do not invent a path. Do not invent a linter. Output the full .mdc I can save under .cursor/rules/.

💡

Pro tip: Use one glob family per file, such as tests or UI, not a comma soup of unrelated paths.

Intelligent-apply description

12/30

✨ What it does

Builds an apply-intelligently rule with a short description, a when-to-apply note and at most 10 factual bullets. Missing facts are tagged, and the description stays short enough to match.

Write the description field and body for a rule the agent should pull in only when relevant. Topic: [RULE TOPIC]. When it should apply: [WHEN TO APPLY]. When it must stay out: [WHEN TO STAY OUT]. Frontmatter: alwaysApply false, no globs, description under 20 words that a model can match. Body under 10 bullets from [CONFIRMED FACTS]. If a fact is missing, write [VERIFY]. Do not invent an API, a flag or a folder. The description must not repeat the whole body.

💡

Pro tip: Put the trigger nouns in the description, such as migrations or webhooks, not adjectives.

Manual mention rule

13/30

✨ What it does

Creates a manual .mdc rule with numbered steps you already wrote, plus the @ mention to type. Missing paths are tagged, and no CLI flag is added.

Write a rule I will @-mention as @[RULE SLUG] when I want it. Job it encodes: [MANUAL JOB]. Steps the agent must follow, from my notes: [PASTE STEPS]. Frontmatter: alwaysApply false, no globs, no description (so it stays manual). If a step needs a path or command I did not give, write [VERIFY] in that step. Do not invent a CLI flag. Output the .mdc and, under it, the exact @ mention I should type in chat. Keep the body under 15 numbered steps.

💡

Pro tip: Use manual rules for rare jobs such as a release checklist, not for everyday style.

Split a mixed rules file

14/30

✨ What it does

Splits a mixed .mdc into up to four files with the right apply mode. Globs that you cannot support from known paths are tagged, and no extra concern is created.

This single rule file mixes concerns: [PASTE MDC]. Split it into up to four .mdc files. For each, choose Always, Glob [suggested glob from [KNOWN PATHS]], Intelligent, or Manual. Copy bullets; do not invent new ones. If a bullet needs a glob but [KNOWN PATHS] has no match, mark that file's glob [VERIFY]. Output each file with frontmatter. Do not invent a fifth concern. End with a one-line note on which file should stay always-applied, if any.

💡

Pro tip: Name files after the concern, such as api.mdc, not after the date you wrote them.

Frontend versus API glob pair

15/30

✨ What it does

Produces a frontend rule and an API rule with separate globs, moving shared bullets out to AGENTS.md. A blank glob is tagged, and no framework name is invented.

Write two glob-scoped rules, one for [FRONTEND GLOB] and one for [API GLOB]. Frontend conventions: [FRONTEND CONVENTIONS]. API conventions: [API CONVENTIONS]. Each file: alwaysApply false, matching globs, description in one line, body of at most 8 bullets. If a convention would apply to both, put it in neither file and list it under Shared for me to add to AGENTS.md. Do not invent a component library or an HTTP framework. If a glob is blank, write [VERIFY] in that file's frontmatter instead of inventing a pattern.

💡

Pro tip: Check a file that should match each glob by opening it and asking Agent which rules applied.

Like these prompts? There are full tutorials behind them.

Learn the workflows, not just the prompts. Easy-to-follow tutorials inside AI Academy, and the library keeps growing.

Try AI Academy Free

Review Checklists

5 prompts

Pull request review checklist rule

16/30

✨ What it does

Turns your existing review checklist into a glob-scoped rule Agent prints and ticks. Missing commands are tagged, and no coverage number or merge bot is invented.

Write a Cursor rule that Agent must walk before it says a change is ready. Change type: [CHANGE TYPE]. Checklist items I already use: [PASTE CHECKLIST]. Format the body as a numbered list the agent prints and ticks. If an item needs a command I did not give, write [VERIFY] beside it. Do not invent a coverage number, a reviewer name or a merge bot. Frontmatter: alwaysApply false, globs [REVIEW GLOBS], description 'print this review checklist before claiming done'. Keep the list to 12 items or fewer.

💡

Pro tip: Scope the glob to the area this checklist is for, or Agent will print it on unrelated chats.

API diff checklist

17/30

✨ What it does

Builds an API review rule that tables changed endpoints against the schema you pasted. Fields and endpoints not in that schema are tagged, so breaking changes cannot be waved through.

Create a review checklist rule for HTTP or RPC changes. Endpoints I actually have, from [PASTE ROUTES OR SCHEMA]: only those. The agent must list each changed endpoint, the request fields, the response fields, and whether a field was added, removed or renamed. If a field appears in the diff but not in the pasted schema, mark it [VERIFY] and do not invent a type. Do not invent an endpoint. Output .mdc with globs [API GLOBS], alwaysApply false, and a body that forbids claiming 'no breaking change' without filling the table.

💡

Pro tip: Paste the route list from code, not from memory, before you generate the rule.

Migration review checklist

18/30

✨ What it does

Creates a migration review rule from checks you already use, ending in safe to apply or hold. Production facts you did not paste are tagged, and no rollback vendor is invented.

Write a checklist rule for schema migrations in [MIGRATION FOLDER]. Required checks from our notes: [MIGRATION CHECKS]. The agent must refuse to mark a migration done if a check is unanswered. If a check needs a production fact I did not paste, that line is [VERIFY], not a guess. Do not invent a lock, a vendor, or a rollback tool. Frontmatter: globs [MIGRATION GLOB], alwaysApply false. Body: numbered checks, then a final line the agent must print: safe to apply or hold.

💡

Pro tip: Keep expand-then-contract steps as separate checks if that is how you migrate.

Accessibility pass as a rule

19/30

✨ What it does

Writes a glob-scoped UI review rule that ticks your accessibility checks with evidence from files in context. Missing tokens are tagged, and no contrast number is invented.

Draft a review rule for UI files matching [UI GLOB]. Checks I require: [A11Y CHECKS]. The agent must inspect only files in context and tick each check with evidence from the markup I pasted or @-mentioned. If a check needs a design token I did not give, write [VERIFY]. Do not invent a contrast ratio, a screen reader, or a legal standard. Frontmatter: alwaysApply false, globs [UI GLOB]. Body: at most 10 checks, each with a pass, fail or [VERIFY] slot.

💡

Pro tip: Name the checks as things in the markup, such as labels and headings, not as slogans.

Changelog line checklist

20/30

✨ What it does

Adds a rule that drafts one changelog entry in your format and refuses to finish without a path. Version numbers and dates are not invented, and a blank path is tagged.

Write a rule that forces a changelog line before Agent finishes a user-facing change. Changelog path: [CHANGELOG PATH]. Format we use: [ENTRY FORMAT]. The agent must draft one entry from the diff summary [DIFF SUMMARY] and stop if [CHANGELOG PATH] is blank, writing [VERIFY] instead of inventing a file. Do not invent a version number or a date. Do not claim a user-facing change is done with no entry. Frontmatter: alwaysApply false, description 'add a changelog line for user-facing diffs'.

💡

Pro tip: Point the path at the file your release process already reads.

Rule Audits

5 prompts

Conflict audit across rule files

21/30

✨ What it does

Finds contradictions across pasted rule files and names a winner only from your source of truth. Unresolved conflicts are tagged, and no extra rule is invented to paper over them.

Compare these Cursor instruction files for contradictions. Files: [PASTE RULE FILES]. List each conflict as a row: Topic, File A quote, File B quote, Suggested winner from [SOURCE OF TRUTH], or [VERIFY] if I named no winner. Do not invent a third quote. Do not add a rule that is in neither file. After the table, write two bullets I can paste to make the winner explicit in AGENTS.md. Keep quotes under 20 words each.

💡

Pro tip: Paste AGENTS.md plus every always-applied .mdc. Nested files can wait for a second pass.

Dead rule hunt

22/30

✨ What it does

Marks globs that match no existing path and always-applied bullets that name unknown commands. Short path lists are called incomplete, so a thin paste cannot declare the repo clean.

Here are our rule files and a list of paths that exist: [PASTE RULES] and [EXISTING PATHS]. Flag any glob that matches nothing in [EXISTING PATHS] as dead. Flag any always-applied bullet that names a command not in [CONFIRMED COMMANDS] as suspect. Output a table: Rule file, Issue, Evidence, Action (delete glob, retag [VERIFY], or keep). Do not invent a path. Do not invent a command. If [EXISTING PATHS] is short, say the hunt is incomplete rather than declaring the repo clean.

💡

Pro tip: Generate the path list from git ls-files for the globs you care about, then paste it.

Rule size budget

23/30

✨ What it does

Scores instruction files against your line and always-apply budgets, then proposes cuts that quote repeated lines. Unknown apply modes are tagged, and leftover files are not invented unless you allow a split.

Measure these instruction files against a budget of [MAX LINES PER FILE] lines and [MAX ALWAYS APPLY FILES] always-applied files. Files: [PASTE FILES WITH NAMES]. Table: File, Lines, Apply mode, Over budget (yes or no). Then propose cuts that only delete repetition, listing each cut as a quote. If you cannot tell the apply mode from frontmatter, write [VERIFY] in Apply mode. Do not invent a line count. Do not invent a new file to hold leftovers unless I set [ALLOW SPLIT] to yes.

💡

Pro tip: Count lines yourself once and compare. Models miscount; the table is a draft.

Evidence check for a new rule

24/30

✨ What it does

Tests a proposed rule against pasted repo evidence and drops unsupported bullets instead of softening them. Missing evidence is tagged, and no best-practice filler is kept.

I want to add this rule: [PROPOSED RULE]. Evidence from the repo: [PASTE EVIDENCE]. For each bullet, mark Supported, Unsupported or [VERIFY]. Unsupported bullets must be deleted in a rewritten rule, not softened. Do not invent evidence. Do not keep a bullet because it sounds like a best practice. Output the rewritten .mdc with the same apply mode as [APPLY MODE], and a short list of bullets you dropped.

💡

Pro tip: Paste the files that supposedly justify the rule, not a description of them.

Regression after a rule edit

25/30

✨ What it does

Diffs an old and new rule against a sample task, flagging new paths or libraries that you did not confirm. The close is keep, revert or edit again, with no score.

I changed a rule. Old: [OLD RULE]. New: [NEW RULE]. Same task I will ask Agent: [SAMPLE TASK]. List what the agent is now told to do that it was not told before, and what it lost. If the new rule names a path, command or library that is not in [CONFIRMED FACTS], mark it [VERIFY] as a possible invention. Do not invent a quality score. End with keep, revert or edit again. Stay under 180 words.

💡

Pro tip: Re-run one real Agent task after you keep a change, using the same sample task text.

Go from copy-pasting to actually mastering AI.

AI Academy: hands-on tutorials on ChatGPT, Claude, Midjourney, and many other tools. New tutorials are added regularly.

Start Your Free Trial

Team Conventions

5 prompts

User rules versus project rules

26/30

✨ What it does

Splits your bullets into user-wide versus this-repo rules, and drafts the project list as AGENTS.md. Ambiguous bullets are tagged with a question, and no secret is added.

Sort these bullets into User rules (this machine, all repos) versus Project rules (this repo). Bullets: [PASTE BULLETS]. Project: [PROJECT NAME]. Output two lists. A bullet that names a path in this repo goes to Project. A bullet about my tone or editor goes to User. If a bullet could be either, mark it [VERIFY] and ask one question. Do not invent a bullet. Do not put secrets in either list. After the lists, draft the Project list as AGENTS.md bullets only.

💡

Pro tip: Keep user rules tiny. Project facts belong in the repo so teammates get them.

Import and path convention rule

27/30

✨ What it does

Turns real import examples into a glob-scoped rule on aliases, barrels and forbidden packages. Disagreements are tagged, and no alias is invented.

Write a glob-scoped rule for imports under [SOURCE GLOB]. Confirmed examples from the repo: [PASTE IMPORT EXAMPLES]. Encode: alias versus relative, barrel files yes or no from the examples, and forbidden packages from [FORBIDDEN PACKAGES]. If the examples disagree, write [VERIFY] and do not pick a winner. Do not invent an alias that is not in the examples. Frontmatter: alwaysApply false, globs [SOURCE GLOB]. Body: at most 8 bullets plus one counter-example copied from the paste.

💡

Pro tip: Paste five real imports from recent diffs, including one you consider wrong.

Error handling convention

28/30

✨ What it does

Writes a glob-scoped error-handling rule from patterns and an example you pasted. Unknown types are tagged, and no telemetry vendor or new helper is introduced.

Draft a rule for how we handle errors in [AREA GLOB]. Patterns I confirmed: [ERROR PATTERNS]. The agent must follow those patterns and must not invent a new helper, a telemetry vendor or a catch-all. If a pattern names a type that is not in [PASTE TYPE NAMES], mark it [VERIFY]. Frontmatter: alwaysApply false, globs [AREA GLOB], description under 18 words. Body: do, do not, and one example copied from [PASTE EXAMPLE], shortened to 20 lines.

💡

Pro tip: Copy the example from a function you like, not from a blog post.

Feature flag naming rule

29/30

✨ What it does

Creates a glob-scoped rule that reuses existing flag names and waits before adding a new one. New names stay tagged until you accept them, and no flag service is invented.

Write a rule for feature flags in [FLAG FILES GLOB]. Flag names already in the repo: [FLAG NAMES]. Naming pattern I want: [NAMING PATTERN]. The agent must reuse a name from the list when the job matches, and must not invent a flag. If it needs a new name, it must propose one that matches the pattern and wait, tagging the proposal [VERIFY] until I accept. Do not invent a flag service. Frontmatter: alwaysApply false, globs [FLAG FILES GLOB]. Body under 10 bullets.

💡

Pro tip: Paste the current flag list from code. Stale wiki lists cause duplicate flags.

Docs-only chat rule

30/30

✨ What it does

Adds an always-applied rule that keeps docs-only chats out of application code unless you approve the file list. A blank docs glob is tagged, and no docs host is invented.

Write an always-applied rule for chats that only edit docs under [DOCS GLOB]. If the user is clearly asking for documentation, the agent must not change application code. If the request is mixed, it must list the code files it would touch and wait. Docs folder: [DOCS GLOB]. Do not invent a docs generator or a site host. If [DOCS GLOB] is blank, write [VERIFY] and still forbid surprise code edits. Frontmatter: alwaysApply true. Body under 100 words.

💡

Pro tip: Pair this with a glob-scoped style rule for the docs folder itself.

Free tool

Prompt Optimizer

Turn a rough idea into a structured, professional AI prompt.

Try it free →

Frequently Asked Questions

This page writes project rules, AGENTS.md, always-applied instructions and review checklists. The general Cursor page covers everyday Agent work. The debugging page covers repros, traces and tests. Use this page when you are editing .cursor/rules or AGENTS.md, not when you are fixing a bug.
Use AGENTS.md at the repo root for short, always-on guidance in plain markdown. Use .cursor/rules .mdc files when you need alwaysApply, globs, a description for intelligent apply, or a manual @ mention. Nested AGENTS.md files apply when Agent works in that folder.
A rule that names the wrong test command or folder will fire on every chat. The prompts copy commands and paths you paste, and they tag gaps instead of guessing. Read each generated file against the repo before you commit it.
No. Cursor applies project rules, AGENTS.md and user rules to Agent chat. They do not drive Tab completion. Keep rules aimed at Agent behaviour: where files go, which commands to run, and which checklists to print.
Fill it from the repo or delete the bullet. Do not commit a rule that still contains the tag. A tagged command in an always-applied file is worse than a missing bullet, because Agent may treat the tag as a real step.

Prompts are the starting line. Tutorials are the finish.

A growing library of hands-on tutorials on ChatGPT, Claude, Midjourney, and many other AI tools. New tutorials are added regularly.

Start 7-Day Free TrialCancel anytime.
Explore AI for Product Managers