svelte-core-bestpractices

svelte-core-bestpractices is a skill for Claude Code, Codex from rilldata/rill. It costs 59 tokens per session (1,711 once invoked), scanned A, original, Apache-2.0.

A set of guidelines for writing and reviewing Svelte components and modules. Svelte is a tool for building web interfaces.

In plain words
What is it for?
It helps choose between normal variables and reactive state, calculate values from state, handle events, style components, and connect Svelte code to libraries.
Why use it?
It helps avoid common mistakes with Svelte's reactive data, event handling, styling, and library integration, including unnecessary updates or performance costs.

Skill for Claude CodeCodex

About the project

Rill is a business intelligence tool for turning data sources into SQL models, metrics, dashboards, and natural-language analysis. It is used by business users and coding agents, with OLAP engines such as ClickHouse and DuckDB supporting its queries. Its catalogue add-ons support agent-driven work on Rill projects.

rilldata/rill · 2,863 stars · on GitHub

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.

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

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/rilldata/rill/svelte-core-bestpractices.svg)](https://agentmods.dev/skills/rilldata/rill/svelte-core-bestpractices)
Your own site
<a href="https://agentmods.dev/skills/rilldata/rill/svelte-core-bestpractices"><img src="https://agentmods.dev/badge/skills/rilldata/rill/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,711 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00059 $0.01711
Opus 5 $0.00030 $0.00856
Sonnet 5 $0.00012 $0.00342
Haiku 4.5 $0.00006 $0.00171

Measured 5d ago against content hash 66c152271d5f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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

Copies of this mod

5 near-identical copies found in the catalogue:

.claude/skills/svelte-core-bestpractices/SKILL.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 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 · 178 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. 5d ago First seen · 178 lines · 59 tokens per session scan A 66c152271d5f

Subscribe to this mod's changes

svelte-core-bestpractices is a skill published in the GitHub repository rilldata/rill (2,863 stars, last pushed today), licensed Apache-2.0. It adds 59 tokens to every session and 1,711 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

hardwood-cli

Inspect, debug, and convert Apache Parquet files with the hardwood CLI. Use whenever a user is debugging code that reads or writes Parquet (Arrow / Spark / Flink / Java / Python) and the data file itself may be the cause — to check the schema, physical and logical types, repetition, or a row sample. Use it to diagnose…

hardwood-hq/hardwood · 216 tokens

hardwood-pr-git

Rebase, rewrite, squash, reword and push Hardwood PR history — including contributor PRs whose author and committer identity must survive the rewrite. Use whenever the user asks to "rebase", "rebase onto main", "fix the commit message", "prefix with the issue key", "squash the commits", "force push (with lease)"…

hardwood-hq/hardwood · 163 tokens

hardwood-review

Review a Hardwood PR, local branch, or staged diff against the project's CLAUDE.md conventions and recurring failure modes. Use whenever the user asks to "review", "look over", "check", "audit", or "assess" a PR number, a branch, or pending changes in the hardwood-hq/hardwood repo. Also use when the user pastes a PR…

hardwood-hq/hardwood · 102 tokens

hardwood-address-review

Work through a reviews/pr- -review.md findings file against a Hardwood PR — check out the PR branch, make the fixes, surface each Decision with its options + recommendation for the maintainer to pick, tick off addressed items in the review file, and commit (do not push). Use whenever the user says "address review for.

hardwood-hq/hardwood · 75 tokens

parquet-dev-ml

Search the Apache parquet-dev mailing list by downloading the raw monthly mbox archives from lists.apache.org and grepping them locally. Use whenever the user wants to find, read, or quote a thread on the Parquet dev list ([email protected]) — e.g. "search the parquet-dev ML", "find the thread about X on the…

hardwood-hq/hardwood · 117 tokens

exasol-import-export

Exasol IMPORT and EXPORT SQL statements: syntax, file formats (CSV, FBV, Parquet), cloud storage (S3, Azure, GCS), connection objects, error handling, and ETL staging patterns.

exasol/mcp-server · 49 tokens