Cursor rules vs custom modes

I’m aware of both Cursor rules and Custom Modes.

According to the docs:

“Rules allow you to provide system-level guidance to the Agent and Cmd-K AI. Think of them as a persistent way to encode context, preferences, or workflows for your projects or for yourself”.

Whereas, custom modes:

Custom modes allows you to compose new modes with tools and prompts that fits your workflow. These are in addition to Agent, Ask, Manual, etc

From my perspective, there is some overlap between these two, and it’s not always clear when should we favor which.

If my goal is to let Cursor create unit tests for me based on a certain set of rules, i could either:

  1. Create custom rules for this particular case with all the standards we want to maintain
  2. Create a custom mode called “Unit Testing” that defines the model, etc as well as the instructions (same as the rules above).

I understand that custom modes allow further control and tuning of other things like model, tools… but for this particular use case, which is the favorable one? or there’s no clear winner ?

Just to make sure i understand the purpose of these 2 features…