1. Habit
  2. Skills
  3. Svelte code writer skill
sveltejs · 13K installs

Svelte code writer skill
Runs by itself, Svelte files changed.

Ship Svelte components the autofixer accepts.

Install the Svelte code writer skill and make it a habit: follow https://gethabit.dev/skills/sveltejs/svelte-code-writer.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

13K installs334 starsMIT licenceSource on GitHub ↗

Svelte code writer

by sveltejs · 13K installs

The skill

The svelte code writer skill gives your agent the @sveltejs/mcp CLI to look up Svelte 5 and SvelteKit docs and run the svelte-autofixer on components, for developers who write or review Svelte code.

Only when you ask.

The habit

Ship Svelte components the autofixer accepts.

↻ Runs by itselfSvelte files changed

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops when every changed Svelte file passes, or after two fix retries per file.

  1. 01

    List changed files

    The agent collects the changed .svelte, .svelte.ts and .svelte.js files, ideally inside the svelte-file-editor subagent.

  2. 02

    Read the version

    It takes the full Svelte version from package.json for the --svelte-version option.

  3. 03

    Look up docs

    If syntax is unclear, it runs list-sections and then get-documentation for the topics it needs.

  4. 04

    Run the autofixer

    npx @sveltejs/mcp svelte-autofixer checks each file, with --async when the project uses async mode.

  5. 05

    Fix and recheck

    The agent applies the fixes and runs the autofixer again until no issue is left.

  6. 06

    Log the issues

    Each file and its issues go into the log.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the Svelte code writer skill helps.

Use it when

  • ✓ You create or edit a Svelte component
  • ✓ You are unsure about runes syntax
  • ✓ You review Svelte code before merge

Skip it when

  • – Your project does not use Svelte
  • – You only change plain JavaScript files

Questions

Svelte code writer skill, answered.

Does it work for Svelte 4?

Yes. The autofixer accepts major version 4 or 5 through --svelte-version.

Why pass the full version?

The skill says a full version such as the one in package.json turns on version-specific suggestions.

What about runes in inline code?

When code with runes goes through the terminal, the dollar sign is escaped so the shell does not replace it.

How do I install the Svelte code writer skill?

Copy the prompt at the top into your agent. It installs the skill from sveltejs/ai-tools and sets up the habit. Or run npx skills add sveltejs/ai-tools --skill svelte-code-writer.

Is the Svelte code writer skill free?

Yes. It is published under MIT. Habit is free too.

Svelte code writer. Now as a habit.

Install the Svelte code writer skill and make it a habit: follow https://gethabit.dev/skills/sveltejs/svelte-code-writer.md

  • Free
  • No account
  • Undo in one line

All sveltejs skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by sveltejs, published under MIT. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.