The cursor rule file is quite practical, but don't overuse it. Don't make it too long, because it will cause the context to be too long each time and affect the generation effect. There is no need for Chinese replies, markdown, etc., because when you enter Chinese prompts, the default Chinese reply is required. You only need the most critical points: - Your project type - Main framework - Naming rules, etc. For example, the following is what I use
In principle, this rules file will be sent to the API by default every time. If the rules file contains too much content, the content in x.com/ch1lam_/status…to be compressed. After all, the overall context window length is limited. In addition, not every request requires so many rules. Only the general ones are needed here. It is enough to add additional requirements each time you write a prompt.
If the code is short, it has little impact; longer is better. If the code is long, a shorter one is better. Also, the stronger the model, the greater the support for the context window length, the smaller the impact. It depends on the specific situation.
The most important skill to use Cursor well is Instruction + Context: Instruction: It is important to be clear about what to do each time and what results you expect; and the instruction should be as small and atomic as possible, that is, it is best to iterate a small MVP at a time, and it is best not to have too many tasks at a time. Context: That is, what are your related codes, it is best to add them to the Composer context manually one by one
Although the Claude model follows instructions well and the context window length is not small, the AI editor will do engineering optimization and may accidentally optimize out long content.