svelte-core-bestpractices

svelte-core-bestpractices is a skill for Claude Code, Codex from pinebasedev/svelteflare. It costs 59 tokens per session (1,784 once invoked), scanned A, a copy of svelte-core-bestpractices, MIT.

Svelte coding guidance for writing and reviewing components and modules. Svelte is a tool for building web interfaces, and this guidance covers its reactive state, events, styling, and library integrations.

In plain words
What is it for?
Use it when creating, editing, or analyzing Svelte components or modules, including code that uses reactive values, event handlers, styles, or external libraries.
Why use it?
It helps avoid incorrect state updates, inefficient reactive code, and integration mistakes when working in Svelte.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when creating, editing, or analyzing Svelte components or modules, including code that uses reactive values, event handlers, styles, or external libraries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pinebasedev/svelteflare/svelte-core-bestpractices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pinebasedev/svelteflare --skill svelte-core-bestpractices
Clone the repo
git clone --depth 1 https://github.com/pinebasedev/svelteflare

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for svelte-core-bestpractices

README.md
[![agentmods](https://agentmods.dev/badge/skills/pinebasedev/svelteflare/svelte-core-bestpractices.svg)](https://agentmods.dev/skills/pinebasedev/svelteflare/svelte-core-bestpractices)
Your own site
<a href="https://agentmods.dev/skills/pinebasedev/svelteflare/svelte-core-bestpractices"><img src="https://agentmods.dev/badge/skills/pinebasedev/svelteflare/svelte-core-bestpractices.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,784 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.01784
Opus 5 $0.00030 $0.00892
Sonnet 5 $0.00012 $0.00357
Haiku 4.5 $0.00006 $0.00178

Measured 7d ago against content hash a37d70b5fbc3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

svelte-core-bestpractices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

92% identical to svelte-core-bestpractices — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/svelte-core-bestpractices/SKILL.md · 179 lines

How it starts

The opening of the file, as written. The whole thing — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.

$state

Only use the $state rune for variables that should be reactive — in other words, variables that cause an $effect, $derived or template expression to update. Everything else can be a normal variable.

Objects and arrays ($state({...}) or $state([...])) are made deeply reactive, meaning mutation will trigger updates. This has a trade-off: in exchange for fine-grained reactivity, the objects must be proxied, which has performance overhead. In cases where you're dealing with large objects that are only ever reassigned (rather than mutated), use $state.raw instead. This is often the case with API responses, for example.

$derived

To compute something from state, use $derived rather than $effect:

// do this
let square = $derived(num * num);

// don't do this
let square;

$effect(() => {
	square = num * num;
});

[!NOTE] $derived is given an expression, not a function. If you need to use a function (because the expression is complex, for example) use $derived.by.

Deriveds are writable — you can assign to them, just like $state, except that they will re-evaluate when their expression changes.

If the derived expression is an object or array, it will be returned as-is — it is not made deeply reactive. You can, however, use $state inside $derived.by in the rare cases that you need this.

$effect

Effects are an escape hatch and should mostly be avoided. In particular, avoid updating state inside effects.

  • If you need to sync state to an external library such as D3, it is often neater to use {@attach ...}
  • If you need to run some code in response to user interaction, put the code directly in an event handler or use a function binding as appropriate
  • If you need to log values for debugging purposes, use $inspect
  • If you need to observe something external to Svelte, use createSubscriber

Never wrap the contents of an effect in if (browser) {...} or similar — effects do not run on the server.

Read the full file on GitHub · 179 lines

Files

What ships with it

9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 179 lines · 59 tokens per session scan A a37d70b5fbc3

Subscribe to this mod's changes

svelte-core-bestpractices is a skill published in the GitHub repository pinebasedev/svelteflare (47 stars, last pushed 1mo ago), licensed MIT. It adds 59 tokens to every session and 1,784 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to svelte-core-bestpractices, differing in 3 lines, and is treated as a copy.

Related

Other skills, from other repositories

form-submissions

Form submission patterns using useDynamicSubmitter, await submitJson, and formAction. Use when implementing forms, handling form submissions, or processing form data in React Router routes.

firtoz/cf-multiworker-starter-kit · 39 tokens

component-organization

Component organization patterns for React applications. Use when creating components, organizing files, or structuring routes. ALWAYS keep 1 component per file and routes simple.

firtoz/cf-multiworker-starter-kit · 35 tokens

routing

React Router v8 routing patterns and environment variable configuration. Use whenever you touch React Router–related code (routes, links, params, loaders, actions, route config, middleware, or env in route context).

firtoz/cf-multiworker-starter-kit · 44 tokens

socka-realtime

Socka + Durable Object WebSockets—defineSocka, SockaWebSocketDO, useSockaSession, SSR-safe ws URLs, web worker forwarding, live-draft vs commit, canvas/whiteboard acceptance, and pre-merge checks. Use for realtime features, /api/ws, or @firtoz/socka.

firtoz/cf-multiworker-starter-kit · 73 tokens

react-patterns

React patterns for callbacks, event handlers, JSX handler typing, and module-level constants. Use when writing React components, implementing event handlers, typing JSX handlers, or defining constants.

firtoz/cf-multiworker-starter-kit · 39 tokens

ui-ux-design-best-practices

UI/UX polish, component design, animation decisions, and Tailwind v4 patterns for making interfaces feel right. Use when reviewing, writing, or refactoring UI code involving animations, transitions, CSS transforms, gestures, Tailwind utility classes, or interactive component behavior. Triggers on tasks involving…

louisbrulenaudet/monorepo-template · 96 tokens