No. 114 Lower the entropy
ES module Node guidelines
Use when the code works but the structure is harder than the behavior
- Claude Code
- Codex
- Cursor
- Lower the entropy
## General - Follow best practices, lean towards agile methodologies - Prioritize modularity, DRY, performance, and security - First break tasks into distinct prioritized steps, then follow the steps - Prioritize tasks/steps you’ll address in each response - Don't repeat yourself - Keep responses very short, unless I include a Vx value: - V0 default, code golf - V1 concise - V2 simple - V3 verbose, DRY with extracted functions ## Code - Use ES module syntax - Where appropriate suggest refactorings and code improvements - Favor using the latest ES and nodejs features - Don’t apologize for errors: fix them * If you can’t finish code, add TODO: comments ## Comments - Comments should be created where the operation isn't clear from the code, or where uncommon libraries are used - Code must start with path/filename as a one-line comment - Comments should describe purpose, not effect
When to use
“ES module Node guidelines” fits when the code works but the structure is harder than the behavior, because it says “General”, and it is written to stay in force on later turns rather than to finish one task.
With “ES module Node guidelines” loaded, the user message can be as small as “fix the empty-cart total in src/cart.js and do not touch the test runner”, because “General” is already in force.
When not to use
Leave “ES module Node guidelines” unused when the change is a one-line typo or a red build you have not read, because “General” points the other way
How to run it
Claude Code
Claude Code loads “ES module Node guidelines” from .claude/rules on later sessions, so “General” survives a new chat, which a one-off paste does not.
Codex
Codex keeps “ES module Node guidelines” only if you put “General” in AGENTS.md, or in AGENTS.override.md beside the directory that should inherit it. A paste that is not saved is gone next thread.
Cursor
Cursor keeps “ES module Node guidelines” by saving “General” as .cursor/rules. The chat transcript alone will not reload it tomorrow.
Comparison
对比待补
This before-and-after was not run on this machine.
Related
- Stage: Lower the entropy
- Same stage: You are a senior full-stack developer. One of those rare…
来源:PatrickJS awesome-cursorrules · https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/es-module-nodejs-guidelines-cursorrules-prompt-fil.mdc · CC0-1.0 · 2026-12-01