// 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.
Jinsi inavyofanya kazi
Vipande viwili vya data huunganishwa unapobofya:
- Ugunduzi β title, description, evidence, remediation, CWE β tayari vimepakiwa pamoja na ripoti.
- Framework ya codebase yako β hugunduliwa kutoka matokeo ya
discovery.tech-fingerprintya skani (Next.js, React, Vue, Django, Express, Rails, Laravel, Flask). Hurudi kwenye mapishi ya jumla ikiwa hakuna framework iliyogunduliwa (kisha dokezo la agent humwomba LLM aigundue kutoka hali ya repo).
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.
Dokezo linavyoonekana
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 zinazoungwa mkono
Tunaonyesha snippets mahususi kwa framework kwa:
- Next.js, React, Vue, Nuxt, Svelte (frontend)
- Express, Fastify (Node.js backend)
- Django, Flask (Python)
- Ruby on Rails
- Laravel (PHP)
- ASP.NET Core (imepangwa, leo hurudi kwenye generic)
Ugunduzi wa framework ni best-effort. Tunanusa tags za __NEXT_DATA__, __NUXT__, cookies za hash (laravel_session), headers za X-Powered-By, na ishara chache nyingine. Ikiwa unatumia framework ya maalum, dokezo hurudi kwenye mapishi ya jumla na agent huitambua kutoka package.json yako.
Itumie kutoka kwa agent wako wa AI
Ikiwa umeunganisha seva ya MCP, dokezo lile lile huwekwa wazi kama amri ya slash. Kutoka 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.
Kwa nini hatupigi Claude kwa kila bofyo
Wakati wa uzinduzi tulifikiria kuita Anthropic API kwa kila bofyo ili kuboresha dokezo kwa context ya codebase. Hatukufanya hivyo, kwa sababu:
- Agent ambamo mtumiaji hubandika tayari ana context ya codebase β wanatumia Cursor / Claude Desktop wakiwa na repo yao imefunguliwa.
- Kutengeneza templates kwa kila (check Γ framework) hufunika takriban 80% ya thamani bila gharama yoyote kwa kila bofyo.
- Chaguo la βRefine with AI for my codebaseβ linaweza kuanzisha API baadaye ikiwa watumiaji watalitaka. Leo, hapana.
