Create Cursor rules for persistent AI guidance. Use when the user wants to create a rule, add coding standards, set up project conventions, configure file-specific patterns, create RULE.md files, or asks about .cursor/rules/ or AGENTS.md.
Create project rules in .cursor/rules/ to provide persistent context for the AI agent.
Before creating a rule, determine:
If you have previous conversation context, infer rules from what was discussed. You can create multiple rules if the conversation covers distinct topics or patterns. Don't ask redundant questions if the context already provides the answers.
If the user hasn't specified scope, ask:
If they mentioned specific files and haven't provided concrete patterns, ask:
**/*.ts, )backend/**/*.pyIt's very important that we get clarity on the file patterns.
Use the AskQuestion tool when available to gather this efficiently.
Rules are .mdc files in .cursor/rules/ with YAML frontmatter:
.cursor/rules/
typescript-standards.mdc
react-patterns.mdc
api-conventions.mdc
---