AI code review specialized for Svelte 5 & SvelteKit โ on every pull request.
Generic review bots don't know that a $effect setting derived state should be a
$derived, that importing $env/static/private into a component leaks a secret to
the browser, or that touching window at the top level crashes SSR. Svelte Autopilot
does. It reads each PR's diff and leaves a focused review of the issues that actually
matter for Svelte 5 and SvelteKit.
Two ways to use it
- ๐ Free GitHub Action (this repo) โ bring your own OpenAI key. Setup below.
- โก Hosted Pro โ no API key, no CI setup, unlimited reviews. Install the app โ ยท Dashboard
OPENAI_API_KEY
(Settings โ Secrets and variables โ Actions)..github/workflows/svelte-review.yml:name: Svelte Autopilot
on:
pull_request:
permissions:
contents: read
pull-requests: write
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: isabellehuecloser-ctrl/svelte-autopilot@v0
with:
api-key: ${{ secrets.OPENAI_API_KEY }}
No checkout needed โ the diff is read through the GitHub API. Open a PR and the bot posts (and keeps updating) a single review comment.
Runes & reactivity
$effect used to compute derived state (should be $derived)$state losing reactivitylet in .svelte.ts modules$bindable propsSvelteKit
load (+page.ts) instead of +page.server.ts$env/static/private imported into client-reachable code (leak)window / document / localStorage at module top level (SSR crash)use:enhance, and invalidate misuseSecurity & a11y
{@html} on unsanitized input (XSS)alt, label association, keyboard handlers| Input | Required | Default | Description |
|---|---|---|---|
api-key |
yes | โ | OpenAI API key. Pass via a repository secret. |
model |
no | gpt-4o |
OpenAI model. gpt-4o for best accuracy; gpt-4o-mini to cut cost. |
github-token |
no | workflow token | Token used to read the PR and post the review. |
max-files |
no | 20 |
Max changed files reviewed per run. |
include |
no | **/*.svelte,**/*.ts,**/*.js,โฆ |
Comma-separated file extensions to review. |
| Output | Description |
|---|---|
findings-count |
Number of review findings reported. |
You bring your own OpenAI key, so the review runs on your account โ no diff passes through any third-party service besides your chosen AI provider.
.svelte-autopilot.json): severity threshold, custom rulesMIT ยฉ Isabelle Hue