Cursor Resources

My commands and prompts for Cursor

Review React code for unnecessary useEffect usage based on react.dev guidelines

command · installs to .cursor/commands/you-might-not-need-an-effect.md
Arguments:
- scope: what to analyze (default: your current changes). Examples: "diff to main", "PR #123", "src/components/", "whole codebase"
- fix: whether to apply fixes (default: true). Set to false to only propose changes.

Steps:
1. Read https://react.dev/learn/you-might-not-need-an-effect to understand the guidelines
2. Analyze the specified scope for useEffect anti-patterns
3. If fix=true, apply the fixes. If fix=false, propose the fixes without applying.
Tip

Run with /council to find shit code across the codebase

Example prompts

/you-might-not-need-an-effect/you-might-not-need-an-effect scope=diff to main/you-might-not-need-an-effect fix=false