No. 126 Write the change
// Qwik.js Basic Setup (with TypeScript and Vite)…
// Qwik.js Basic Setup (with TypeScript an.
- Claude Code
- Codex
- Cursor
- Write the change
// Qwik.js Basic Setup (with TypeScript and Vite) .cursorrules // Prefer functional components const preferFunctionalComponents = true; // Qwik.js best practices const qwikBestPractices = [ "Use $ suffix for lazy-loaded functions", "Utilize useSignal() for reactive state", "Implement useStore() for complex state objects", "Use useResource$() for data fetching", "Implement useTask$() for side effects", "Utilize useVisibleTask$() for browser-only code", "Leverage TypeScript for type safety", "Use Vite's fast HMR for development", ]; // Folder structure const folderStructure = ` src/ components/ routes/ global.css root.tsx entry.ssr.tsx public/ vite.config.ts tsconfig.json `; // Additional instructions const additionalInstructions = ` 1. Use TypeScript for all .ts and .tsx files 2. Implement proper error boundaries 3. Utilize Qwik City for routing when applicable 4. Use Qwik's built-in optimization features 5. Implement lazy-loading for improved performance 6. Follow Qwik's naming conventions and best practices 7. Use server$ for server-side code execution 8. Leverage Vite plugins for optimized builds `;
When to use
“// Qwik.js Basic Setup (with TypeScript and Vite)…” fits when the behavior is already chosen and a file should change, because it says “// Qwik.js Basic Setup (with TypeScript and Vite) .cursorrules”, and it is written to stay in force on later turns rather than to finish one task.
For “// Qwik.js Basic Setup (with TypeScript and Vite)…”, the extra line you type is the requirement those steps ask for, for example “make src/cart.js return 0 on an empty cart and skip a line with no price”, and the file then starts at “Use TypeScript for all .ts and .tsx files”.
When not to use
Leave “// Qwik.js Basic Setup (with TypeScript and Vite)…” unused when you only wanted the file explained, or two designs are still open, because “// Qwik.js Basic Setup (with TypeScript and Vite) .cursorrules” points the other way
How to run it
Claude Code
Claude Code loads “// Qwik.js Basic Setup (with TypeScript and Vite)…” from .claude/rules on later sessions, so “// Qwik.js Basic Setup (with TypeScript and Vite) .cursorrules” survives a new chat, which a one-off paste does not.
Codex
Codex keeps “// Qwik.js Basic Setup (with TypeScript and Vite)…” only if you put “// Qwik.js Basic Setup (with TypeScript and Vite) .cursorrules” 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 “// Qwik.js Basic Setup (with TypeScript and Vite)…” by saving “// Qwik.js Basic Setup (with TypeScript and Vite) .cursorrules” 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: Write the change
- Same stage: RTL (Right-to-Left) Development Rules
来源:PatrickJS awesome-cursorrules · https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/qwik-basic-cursorrules-prompt-file.mdc · CC0-1.0 · 2026-12-01