FixVibe

// docs / ai fix prompts

AI 修正プロンプト

すべての検出結果には、修正内容の下に「修正プロンプトをコピー」ボタンがあります。クリックして Claude / Cursor / Copilot に貼り付けると、その脆弱性に対する標準の修正レシピが、あなたのコードベースのフレームワーク向けに渡されます。FixVibe から Claude API を呼ぶことはありません。

仕組み

クリック時に2つのデータが組み合わさります。

  • 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.

プロンプトの見た目

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)
  • 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.

AI エージェントから使う

MCP server を接続している場合、同じプロンプトがスラッシュコマンドとして公開されます。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.

クリックごとに Claude を呼ばない理由

ローンチ時には、コードベースの文脈でプロンプトを洗練するため、クリックごとに Anthropic API を呼ぶことも検討しました。そうしなかった理由は次のとおりです。

  • ユーザーが貼り付ける先のエージェントには、すでにコードベースの文脈があります。Cursor / Claude Desktop でリポジトリを開いて使っているためです。
  • Server-side templating covers the common remediation paths without any per-click model call.
  • ユーザーが望む場合、将来的に「自分のコードベース向けに AI で洗練する」オプトインで API を呼べます。現時点では呼びません。
AI 修正プロンプト — Docs · FixVibe