Cursor Rule: General
optics/cursor-rule-generalFreeUtility
Cursor rule file for general development guidelines.
See it running
Open the demo on optics
optics.agusmayol.com.ar/components/cursor-rule-generalInstall it
npx shadcn@latest add https://optics.agusmayol.com.ar/r/cursor-rule-general.jsonSource
1---2description: General rules for all propmts3globs: *4alwaysApply: true5---6# General Development Rules78## Core Working Principles910Your responses will always be in the user's preferred language, while code and technical content will be written in English or the project's language.1112Code and files will always be written in JavaScript, never TypeScript, unless the user explicitly requests it.1314Always follow user requirements exactly as specified.1516Think step by step: describe the plan in pseudocode or plain language before writing code.1718Confirm your approach before writing code for complex or ambiguous tasks.1920Code must be complete and production-ready, with no TODOs, placeholders, or missing pieces.2122Use clear, descriptive names. Follow camelCase for variables and functions, PascalCase for components and classes.2324Prioritize readable and maintainable code over premature optimization.2526Minimize prose and explanations. Focus on delivering working code.2728Name new files in kebab-case (user-profile.js, api-client.js).2930Use `const` by default. Use `let` only when reassignment is necessary. Never use `var`.3132User-facing content must be localized appropriately for the project's target audience.3334## Best Practices3536Apply DRY (Don't Repeat Yourself) principles. Extract repeated logic into reusable functions or components.3738Minimize unnecessary variables. Calculate values inline when they're only used once.3940Break large components into smaller, focused, reusable components.4142Always anticipate execution errors and user errors (layer 8). Implement proper error handling and validation.4344Incorporate security measures in both frontend and backend code.4546If you don't know the answer to something, say so clearly. Don't guess or make assumptions.4748## Package Management4950Always use Bun as the preferred package manager for installing dependencies and running scripts.5152Never use npm, pnpm, npx, yarn, or other package managers unless explicitly requested by the user or required by project constraints.5354Examples:55- `bun install <package>` instead of `npm install <package>`56- `bun run dev` instead of `npm run dev`57- `bunx <command>` instead of `npx <command>`5859## Accessibility6061Implement accessibility features in all user interfaces:62- Use `tabindex` for keyboard navigation63- Add `aria-label` and `aria-describedby` for screen readers64- Implement `onKeyDown` handlers alongside `onClick` for interactive elements65- Use semantic HTML elements66- Ensure sufficient color contrast67// … truncated
Files it writes
More from optics
All 79 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Cursor Rule: Back Endcursor-rule-back-end | optics | Utilities | Free | no deps | |
| Cursor Rule: Bulk Processingcursor-rule-bulk-processing | optics | Utilities | Free | no deps | |
| Cursor Rule: Commits Conventioncursor-rule-commits-convention | optics | Utilities | Free | no deps | |
| Cursor Rule: Front Endcursor-rule-front-end | optics | Utilities | Free | no deps | |
| Cursor Rule: React Optimizationcursor-rule-react-optimization | optics | Utilities | Free | no deps | |
| Cursor Rule: Web Interface Guidelinescursor-rule-web-interface-guidelines | optics | Utilities | Free | no deps | |
| Get strict contextget-strict-context | optics | Utilities | Free | no deps | |
| Use auto heightuse-auto-height | optics | Utilities | Free | no deps |
