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.

របៀបវាដំណើរការ

Data ពីរផ្នែកបញ្ចូលគ្នាពេល click:

  • Finding — title, description, evidence, remediation, CWE — បាន loaded ជាមួយ report រួចហើយ។
  • Framework នៃ codebase របស់អ្នក — detected ពី findings discovery.tech-fingerprint របស់ scan (Next.js, React, Vue, Django, Express, Rails, Laravel, Flask)។ Fallback ទៅ generic recipe នៅពេលមិន detect framework (បន្ទាប់មក agent prompt ស្នើ LLM ឱ្យ detect ពី 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.

Prompt មើលទៅដូចម្តេច

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 ដែលគាំទ្រ

យើងបង្ហាញ framework-specific snippets សម្រាប់:

  • Next.js, React, Vue, Nuxt, Svelte (frontend)
  • Express, Fastify (Node.js backend)
  • Django, Flask (Python)
  • Ruby on Rails
  • Laravel (PHP)
  • ASP.NET Core (បានគ្រោង, ថ្ងៃនេះ fallback ទៅ generic)

Framework detection គឺ best-effort។ យើង sniff tags __NEXT_DATA__, __NUXT__, hash cookies (laravel_session), headers X-Powered-By, និង signals ផ្សេងទៀតមួយចំនួន។ ប្រសិនបើអ្នកប្រើ custom framework, prompt fallback ទៅ generic recipe ហើយ agent នឹងស្វែងយល់ពី package.json របស់អ្នក។

ប្រើវាពី AI agent របស់អ្នក

បើអ្នកបានភ្ជាប់ MCP server, prompt ដូចគ្នាត្រូវបាន expose ជា slash command។ ពី 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.

ហេតុអ្វីយើងមិន hit Claude រាល់ click

នៅពេល launch យើងបានពិចារណាហៅ Anthropic API សម្រាប់ click នីមួយៗ ដើម្បី refine prompt ជាមួយ codebase context។ យើងមិនបានធ្វើទេ ព្រោះ:

  • Agent ដែល user paste ចូល មាន codebase context រួចហើយ — ពួកគេកំពុងប្រើ Cursor / Claude Desktop ជាមួយ repo បើក។
  • Templating តាម (check × framework) គ្របដណ្តប់ ~80% នៃ value ដោយគ្មាន per-click cost។
  • Opt-in “Refine with AI for my codebase” អាច fire API ពេលក្រោយប្រសិនបើ users ចង់បាន។ ថ្ងៃនេះ មិនទេ។
AI improvement prompts — Docs · FixWeb