// docs / ai fix prompts
مطالبات الإصلاح بالذكاء الاصطناعي
Code and configuration findings have a Copy coding-agent prompt button beneath the remediation. DNS, provider-console, secret-rotation, and manual-review findings show operator steps instead, because an IDE agent cannot change those settings for you. No Claude API call is made by FixVibe.
كيف يعمل
تجتمع قطعتان من البيانات عند النقر:
- The finding - ملخص المشكلة، والسطح المتأثر، وإرشادات المعالجة، والأدلة الآمنة اللازمة لمساعدة وكيل الترميز في إصلاحها.
- Your app context — FixVibe يستخدم سياق الفحص عندما يكون متاحًا لاختيار شكل معالجة مدرك لإطار العمل، ويعود إلى الوصفة العامة عندما لا يتمكن من استنتاج سياق كافٍ.
Coding-agent prompts and operator steps are rendered server-side from FixVibe remediation guidance. They are designed for copy-paste use in Cursor, Claude Desktop, Copilot, or the relevant provider console without exposing the internal prompt registry in the browser.
كيف تبدو المطالبة
Fix the "Reflected XSS in /search?q=" vulnerability at /search.
Issue: Query parameter q is rendered into the response body without
escaping; an attacker can inject <script> via crafted URLs.
Codebase context: Next.js.
Recommended fix:
In Next.js, render user-supplied values through JSX ({value}) so React's
automatic escaping kicks in. For server components rendering rich HTML,
sanitize with DOMPurify (server-side via JSDOM) before output.
Constraints:
- Don't break existing tests; run the test suite after the change.
- Match the codebase's existing style and lint config.
- Add a brief comment explaining the security reasoning only where the
fix would otherwise look arbitrary.
- If the fix needs a new dependency, install it via the project's
package manager (npm / pnpm / pip / bundle / composer).
Reference: CWE-79 — see https://cwe.mitre.org/data/definitions/79.htmlالأطر المدعومة
نعرِض مقتطفات خاصة بالأطر من أجل:
- Next.js، React، Vue، Nuxt، Svelte (واجهة أمامية)
- Express، Fastify (خلفية Node.js)
- Django، Flask (Python)
- روبي أون ريلز
- لارافيل (PHP)
- ASP.NET التوجيه الاحتياطي الأساسي
سياق الإطار هو أفضل جهد. إذا لم يتمكن FixVibe من استنتاج ما يكفي من الفحص بشكل آمن، فستطلب المطالبة من وكيل الترميز الخاص بك فحص المستودع قبل تطبيق الإصلاح.
استخدمه من وكيل الذكاء الاصطناعي لديك
إذا وصلت خادم MCP، فالمطالبة نفسها مكشوفة كأمر شرطة مائلة. من Claude Desktop:
/fixvibe-fix finding_id=550e8400-e29b-41d4-a716-446655440000
يبحث الخادم عن النتائج، ويطبق سياق الفحص المتوفر، ويعرض مطالبة الإصلاح، ويدخلها في محادثتك كرسالة مستخدم. لم يتم إجراء أي اتصال من جهة خارجية LLM API بواسطة FixVibe لهذه المطالبة القالبة.
لماذا لا نستدعي Claude عند كل نقرة
عند الإطلاق فكرنا في استدعاء Anthropic API لكل نقرة لتحسين المطالبة بسياق قاعدة الشفرة. لم نفعل ذلك، لأن:
- الوكيل الذي يلصق فيه المستخدم لديه بالفعل سياق قاعدة الشفرة — فهو يستخدم Cursor / Claude Desktop مع المستودع مفتوحًا.
- تغطي القوالب من جانب الخادم مسارات المعالجة الشائعة دون أي استدعاء نموذج لكل نقرة.
- يمكن لخيار اشتراك “حسّن بالذكاء الاصطناعي لقاعدة شفرتي” أن يشغل API لاحقًا إذا أراده المستخدمون. اليوم، لا.
