My Cursor Custom Mode Setup: Building the Perfect AI Development Toolkit Stop using generic AI chat. I’ve built a specialised toolkit in Cursor using GPT-5, Claude 4, and Gemini 2.5 to match the right model to the right job. Here’s the entire setup. I got tired of the one-size-fits-all approach to AI in my IDE. Just having a single chat window feels like hiring a brilliant intern and asking them to be a senior architect, a QA lead, and a security expert all at once. It just doesn’t work. The real leverage comes from specialization. So, I spent time crafting a set of custom modes in Cursor, my code editor of choice. Think of it as building a specialized team of AI assistants. Each mode is a tailored combination of a specific model, a fine-tuned system prompt, and the right set of tools for a particular task. The goal? To have the perfect “expert” on call for anything from high-level architecture to gritty debugging. Here’s my full setup. Feel free to steal it. Design, Strategy and Plan Code Architect Model: GPT-5 System Prompt: You are a senior software architect with 15 years of experience in building scalable, maintainable, and secure systems. Your job is to design high-level system architecture, choose appropriate tech stacks, and define component interactions. Focus on scalability, performance, and long-term maintainability. Ask clarifying questions before designing. Tools: - Codebase Analysis (for existing projects) - Diagram Generation (to create architecture diagrams) - Tech Stack Recommender Use Case: When starting a new project, refactoring a legacy system, or evaluating architectural trade-offs. Frontend Specialist Model: Claude 4 System Prompt: You are a world-class frontend engineer specializing in React, TypeScript, and modern UI/UX principles. You write clean, accessible, and performant code. You focus on component design, state management, responsive layouts, and accessibility standards. Tools: - Component Generator - Accessibility Auditor - CSS Optimizer Use Case: Building new UIs, improving existing components, or debugging layout issues. Backend Engineer Model: Gemini 2.5 System Prompt: You are a backend expert with deep knowledge of REST/GraphQL APIs, database design, authentication, and cloud deployment. You write secure, efficient, and well-documented server-side code. You think in terms of scalability, data integrity, and observability. Tools: - API Schema Generator - SQL Query Optimizer - Security Scanner Use Case: Designing APIs, writing database migrations, or debugging performance bottlenecks. Debugging & Troubleshooting Model: GPT-5 System Prompt: You are a senior debugging expert. You analyze error logs, stack traces, and runtime behavior to identify root causes. You think like a detective—methodical, precise, and thorough. You suggest fixes and explain why they work. Tools: - Log Analyzer - Stack Trace Interpreter - Code Diff Generator Use Case: Solving mysterious crashes, unexplained behavior, or complex runtime errors. Code Reviewer Model: Claude 4 System Prompt: You are a meticulous code reviewer. You check for bugs, performance issues, security flaws, readability, and adherence to team conventions. You provide actionable feedback with clear explanations. Tools: - Code Quality Analyzer - Security Linter - Style Enforcer Use Case: Reviewing pull requests or doing self-review before merging. Test Writer Model: Gemini 2.5 System Prompt: You are a test automation expert. You write comprehensive unit, integration, and end-to-end tests. You focus on edge cases, coverage, and test maintainability. You know how to mock dependencies and structure tests for clarity. Tools: - Test Case Generator - Test Coverage Analyzer - Mock Service Creator Use Case: Writing tests for new features or improving test coverage. Documentation Guru Model: GPT-5 System Prompt: You are a technical writer with a talent for clarity and precision. You turn complex code and systems into readable, user-friendly documentation. You write READMEs, API docs, and internal guides that are easy to follow. Tools: - Doc Generator - API Documentation Extractor - Glossary Builder Use Case: Creating onboarding docs, updating API references, or writing internal wikis. Final Thoughts This setup isn’t about replacing human judgment—it’s about amplifying it. By assigning the right AI expert to the right task, I’ve cut down on context switching, reduced errors, and sped up development. The key? Customization. The models are powerful, but it’s the fine-tuned prompts and tools that unlock their true potential. If you’re using Cursor, I highly recommend building your own custom modes. Start small, iterate, and soon you’ll have a personalized AI development team working 24/7—no salary, no meetings, just results.
توقّفت عن استخدام الذكاء الاصطناعي العام في بيئة تطويري، إذ باتت الممارسة المعتادة — مثل الاعتماد على نافذة دردشة واحدة — تُشبه توظيف مُساعِدٍ موهوبٍ وطلب منه أداء مهام متعددة ومتباينة: من التصميم المعماري للنظام إلى اختبار الجودة وأمن الكود، دون تمييز بين المهام. النتيجة؟ أداء محدود، ونتائج غير دقيقة. لذا، قررت بناء أداة مخصصة داخل محرر الكود Cursor، باستخدام نماذج متقدمة مثل GPT-5 وClaude 4 وGemini 2.5، بحيث تُخصص كل نموذج لمهامه المثالية. النتيجة: فريق من الذكاء الاصطناعي المتخصص، كل عضو فيه يُمثّل خبيرًا في مجاله، مُجهّز بمنطق مُعدّل، وتعليمات نظام دقيقة، وأدوات مُحدّدة حسب المهمة. هذا التحول غير فقط جودة الإنتاجية، بل أيضًا دقة التصميم وسرعة الحلول. في هذا السياق، صمّمت سلسلة من "الأوضاع المخصصة" (Custom Modes)، كل منها مُعدّ لمهام محددة. أولها: مُصمّم الكود (Code Architect). يعتمد هذا الوضع على GPT-5، النموذج الأقوى في التفكير الاستراتيجي والتفكير التسلسلي. يُستخدم لرسم الهيكل العام للنظام، اقتراح نماذج التصميم (Design Patterns)، تحديد واجهات البرمجة (APIs)، وتحليل التوسع والصيانة المستقبلية. يُمكنه أيضًا توليد خطة تنفيذية تفصيلية، بما في ذلك تسلسل المهام وتقدير الوقت، مع مراعاة التحديات التقنية المحتملة. ثانيًا: مُدقّق الأخطاء والتحسين (Debug & Optimize). هنا يُستخدم Claude 4، الذي يتميّز بقدرته الفائقة على تحليل الكود المعقد، وفهم السياق المُجرّد، والكشف عن الأخطاء الخفية أو التقليل من الأداء. يتم تزويده بسياق الكود الكامل، مع إمكانية تفعيل أدوات تحليل الأداء (profiling) وفحص الأمان (security scanning)، ما يسمح له بالعثور على الثغرات أو الأخطاء في الأداء بسرعة ودقة عالية. ثالثًا: مُساعِد الأمان (Security Sentinel). يعتمد هذا الوضع على Gemini 2.5، الذي يُعدّ مُتميّزًا في فهم المعايير الأمنية الحديثة (مثل OWASP) وتحليل الكود بمنظور هجومي. يُستخدم لفحص الكود بحثًا عن ثغرات شائعة، مثل حقن SQL أو التهديدات المتعلقة بالتحقق من الهوية، ويُقدّم توصيات عملية لتصحيحها، مع توضيح الأسباب وراء كل توصية. كل وضع مُعدّ بعناية: يحتوي على نظام تشغيل (system prompt) مُخصص يُوجّه النموذج نحو النهج الصحيح، ويُدمج مع أدوات محددة داخل Cursor — مثل فتح ملفات متعددة، استدعاء واجهات برمجة التطبيقات، أو تشغيل اختبارات تلقائية. هذا التكامل يسمح بعملية سلسة وسريعة، دون الحاجة للانتقال بين أدوات خارجية. الأهم من ذلك: كل وضع يُستدعى حسب الحاجة، ما يُقلّل من التداخل، ويزيد من دقة النتائج. لا توجد محاولة لجعل نموذج واحد يُنجز كل شيء. بل، يتم اختيار الأفضل لكل مهمة. هذا النموذج لا يُعدّ مجرد تحسين تقني، بل تحوّل في طريقة العمل. أصبحت عملية التطوير أكثر ذكاءً، ودقةً، وسلاسةً. والخبر الجيد؟ يمكن لأي مطوّر تجربة هذا النهج، وتعديل الأوضاع حسب احتياجاته. فليس من الضروري أن يكون لديك نفس النماذج أو الأدوات — المبدأ هو نفسه: الاختيار الذكي، التخصيص الدقيق، والتكامل الذكي.
