FixWeb

// docs / ai fix prompts

AI improvement prompts

Every finding has a Copy prompt button beneath the remediation. Click it, paste into Claude / Cursor / Copilot, and the agent gets the canonical improvement recipe for that website-quality issue — no Claude API call from us.

Bí ó ṣe ń ṣiṣẹ́

Ìpín data méjì ń darapọ̀ nígbà click:

  • Finding náà — title, description, evidence, remediation, CWE — ti wà pẹ̀lú ìjábọ̀ náà tẹ́lẹ̀.
  • Framework codebase rẹ — a rí i láti findings discovery.tech-fingerprint ti scan náà (Next.js, React, Vue, Django, Express, Rails, Laravel, Flask). Ó máa fallback sí recipe gbogbogbo nígbà tí a kò bá rí framework (prompt agent náà yóò ní kí LLM rí i láti repo state).

Templates live in lib/scanner/fix-prompts.ts. The registry has check-specific guidance for crawlability, search presentation, semantic content, structured data, media, performance, accessibility, forms, mobile/i18n, runtime, owner journeys, and repo-quality issues. For everything else, the existing remediation field on the finding becomes the generic recipe.

Bí prompt ṣe rí

Fix the "Hero image is lazy-loaded and missing dimensions" finding on /pricing.

Issue: The largest above-the-fold image is marked loading="lazy" and has
no explicit width/height. That can delay LCP and create layout shift.

Codebase context: Next.js.

Recommended fix:
Use next/image or the existing image component with explicit width/height,
responsive sizes, meaningful alt text, and priority/fetchPriority for the
first major visual on the page.

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 performance 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: Core Web Vitals / Largest Contentful Paint guidance.

Frameworks tí a ṣe support

A ń fi snippets pàtó sí framework hàn fún:

  • Next.js, React, Vue, Nuxt, Svelte (frontend)
  • Express, Fastify (Node.js backend)
  • Django, Flask (Python)
  • Ruby on Rails
  • Laravel (PHP)
  • ASP.NET Core (a ń gbero, fallback sí generic lónìí)

Ìwárí framework jẹ́ best-effort. A sniff tags __NEXT_DATA__, __NUXT__, hash cookies (laravel_session), headers X-Powered-By, àti àwọn signal díẹ̀ míì. Bí o bá ń ṣiṣẹ́ pẹ̀lú custom framework, prompt máa fallback sí recipe gbogbogbo, agent náà yóò sì mọ̀ ọ́ láti package.json rẹ.

Lo ó láti AI agent rẹ

Bí o bá ti so MCP server pọ̀, prompt kan náà hàn gẹ́gẹ́ bí slash command. Láti Claude Desktop:

/fixweb-fix finding_id=550e8400-e29b-41d4-a716-446655440000

The renderer looks up the finding, detects the framework from the parent scan when available, renders the templated prompt, and injects it into your conversation as the user message. No round-trip to our Claude API; templates are pure and free.

Ìdí tí a kò fi ń pe Claude fún click kọ̀ọ̀kan

Ní ìbẹ̀rẹ̀ a rò pé ká pe Anthropic API fún click kọ̀ọ̀kan láti refine prompt pẹ̀lú context codebase. A kò ṣe bẹ́ẹ̀, nítorí pé:

  • Agent tí oníṣe lẹ̀ sínú rẹ ti ní context codebase tẹ́lẹ̀ — wọ́n ń lo Cursor / Claude Desktop pẹ̀lú repo wọn tí ó ṣí.
  • Templating fún (check × framework) kọ̀ọ̀kan bo ~80% iye náà láìsí cost click kọ̀ọ̀kan.
  • Opt-in “Refine with AI for my codebase” lè pe API lẹ́yìn náà bí àwọn oníṣe bá fẹ́. Lónìí, rárá.
AI improvement prompts — Docs · FixWeb