gk-svelte-effect-audit

Scans Svelte 5 $effect runes in src/ files, classifies six anti-patterns, and applies safe auto-fixes.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/MartinoPolo/Grovekeeper --skill gk-svelte-effect-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gk-svelte-effect-audit
Source: https://github.com/MartinoPolo/Grovekeeper/tree/main/.codex/gk-svelte-effect-audit
Command: npx skills add https://github.com/MartinoPolo/Grovekeeper --skill gk-svelte-effect-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you identify incorrect and risky uses of the Svelte 5 $effect rune so your app avoids bugs, inconsistent state, and performance problems.

Core Features & Use Cases

  • Anti-pattern detection: Flags $effect usages for circular-sync (E1), derived-via-effect (E2), state-update-in-effect (E3), missing cleanup (W1), browser-guard redundancy (W2), and logging-without-inspect (W3).
  • Severity-graded reporting: Produces a findings summary grouped by Errors vs Warnings, including file:line, pattern ID, confidence, and descriptions.
  • Confident auto-fixes: Applies fixes directly for high-confidence cases, and requests confirmation for medium-confidence cases.
  • Validation loop: Runs pnpm check:fast and uses the svelte autofixer tool on modified .svelte files, then iterates until clean.

Quick Start

Ask the AI to audit all $effect rune usages in the repository by scanning src/.svelte and src/.ts files, reporting issues with confidence and applying safe auto-fixes where possible.

Frequently Asked Questions about gk-svelte-effect-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find and fix circular state updates in Svelte 5 $effect runes?

To fix circular state updates in Svelte 5 $effect runes, scan your codebase for anti-patterns like state-update-in-effect and derived-via-effect, then apply safe edit-based auto-fixes and validate with pnpm check:fast.

What Svelte 5 $effect anti-patterns cause inconsistent state and performance issues?

Common $effect anti-patterns include circular-sync, derived-via-effect, state-update-in-effect, missing teardown, browser-guard redundancy, and logging-without-inspect, all of which cause inconsistent state and performance issues.

How do I audit $effect runes in a Svelte TypeScript codebase?

To audit $effect runes in a Svelte TypeScript codebase, scan src/.svelte and src/.ts files to pattern-match defined anti-patterns, classify findings by severity and confidence, and apply high-confidence auto-fixes.

Can I automatically fix missing teardown and cleanup logic in $effect runes?

Yes, you can automatically fix missing teardown and cleanup logic in $effect runes by running an audit that flags the missing cleanup anti-pattern and applies confident edit-based fixes followed by svelte autofixer validation.

Does the $effect rune audit work with $effect.pre and $effect.root usage?

Yes, the $effect rune audit works with $effect.pre and $effect.root usage by scanning Svelte component and TypeScript source files to identify risky patterns and apply severity-graded reporting with safe auto-fixes.

What is the best way to validate Svelte 5 $effect auto-fixes?

The best way to validate Svelte 5 $effect auto-fixes is to run pnpm check:fast and use the svelte autofixer tool on modified .svelte files, iterating subsequent autofix passes until the validation loop is clean.