// docs / ai fix prompts
Prompts càraidh AI
Tha putan Copy fix prompt aig gach finding fon remediation. Briog air, cuir a-steach e ann an Claude / Cursor / Copilot, agus gheibh an agent an reasabaidh càraidh canonical airson an vuln sin ann am framework do codebase — gun ghairm Claude API bhuainn.
Mar a dh'obraicheas e
Thig dà phìos dàta còmhla air click:
- The finding — the issue summary, affected surface, remediation guidance, and safe evidence needed to help your coding agent fix it.
- Your app context — FixVibe uses scan context when available to choose a framework-aware remediation shape, and falls back to a generic recipe when it cannot infer enough context.
Fix prompts are rendered server-side from FixVibe remediation guidance. They are designed for copy-paste use in Cursor, Claude Desktop, Copilot, or another coding agent without exposing the internal prompt registry in the browser.
Cò ris a tha am prompt coltach
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.htmlFrameworks le taic
Bidh sinn a' sealltainn snippets framework-specific airson:
- Next.js, React, Vue, Nuxt, Svelte (aghaidh)
- Express, Fastify (backend Node.js)
- Django, Flask (Python)
- Ruby on Rails
- Laravel (PHP)
- ASP.NET Core fallback guidance
Framework context is best-effort. If FixVibe cannot infer enough safely from the scan, the prompt asks your coding agent to inspect the repository before applying the fix.
Cleachd e bhon agent AI agad
Ma tha thu air am frithealaiche MCP a wired up, tha an aon prompt fosgailte mar slash command. Bho Claude Desktop:
/fixvibe-fix finding_id=550e8400-e29b-41d4-a716-446655440000
The server looks up the finding, applies available scan context, renders the remediation prompt, and injects it into your conversation as the user message. No third-party LLM API call is made by FixVibe for this templated prompt.
Carson nach buail sinn Claude gach click
Aig launch smaoinich sinn air an Anthropic API a ghairm airson gach click gus am prompt a refine le context codebase. Cha do rinn sinn sin, oir:
- Tha context codebase aig an agent dhan cuir an cleachdaiche paste mu thràth — tha iad a' cleachdadh Cursor / Claude Desktop leis an repo fosgailte.
- Server-side templating covers the common remediation paths without any per-click model call.
- Dh'fhaodadh opt-in “Refine with AI for my codebase” an API a fire nas fhaide air adhart ma tha luchd-cleachdaidh ga iarraidh. An-diugh, chan eil.
