Skills
Cursor .mdc Auto-Attached Rules with Deprecated Pattern Blocking
The legacy .cursorrules file is deprecated in favor of .cursor/rules/*.mdc files with frontmatter-controlled glob scope and activation mode, loading rules only when matching files are in context. The highest-impact technique is combining Auto Attached scope with explicit deprecated-pattern blocking: showing the outdated broken pattern alongside strong prohibitive language and a complete working replacement prevents the agent from generating stale API syntax it confidently knows. Building rules reactively from observed agent mistakes — rather than proactively from documentation — keeps each rule file under 500 lines and maximizes per-rule signal.
Source
↳ Follow the thread