neo-svelte copilot-instructions.md

neo-svelte copilot-instructions.md is an instructions file for GitHub Copilot from dvcol/neo-svelte. It costs 4,900 tokens per session, scanned A, original, MIT.

Instructions for a Svelte 5 project, including how its newer system for managing changing data differs from Svelte 4.

In plain words
What is it for?
Use them when changing Svelte components, handling navigation, managing reactive state, or updating asynchronous code.
Why use it?
They help coding agents avoid outdated patterns and follow the project's rules for redirects, errors, cookies, promises, and navigation.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

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 instructions/dvcol/neo-svelte/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/dvcol/neo-svelte

Made for: GitHub Copilot.

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 neo-svelte copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dvcol/neo-svelte/copilot-instructions.svg)](https://agentmods.dev/instructions/dvcol/neo-svelte/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/dvcol/neo-svelte/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/dvcol/neo-svelte/copilot-instructions.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,900 This file is loaded in full into every session.
When invoked 4,900 The same file — it is already loaded in full.
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.1 $0.04900 $0.04900
Opus 5 $0.02450 $0.02450
Sonnet 5 $0.00980 $0.00980
Haiku 4.5 $0.00490 $0.00490

Measured 6d ago against content hash 0e96bd510fdd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

neo-svelte copilot-instructions.md 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 6d 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.

.github/copilot-instructions.md · 926 lines

How it starts

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

I'm using svelte 5 instead of svelte 4 here is an overview of the changes.

Overview

Svelte 5 introduces runes, a set of advanced primitives for controlling reactivity. The runes replace certain non-runes features and provide more explicit control over state and effects.

$state
  • Purpose: Declare reactive state.
  • Usage:
<script>let count = $state(0);</script>
  • Replaces: Top-level let declarations in non-runes mode.
  • Class Fields:
class Todo {
	done = $state(false);
	text = $state();
	constructor(text) {
		this.text = text;
	}
}
  • Deep Reactivity: Only plain objects and arrays become deeply reactive.
$state.raw
  • Purpose: Declare state that cannot be mutated, only reassigned.
  • Usage:
<script>let numbers = $state.raw([1, 2, 3]);</script>
  • Performance: Improves with large arrays and objects.
$state.snapshot
  • Purpose: Take a static snapshot of $state.
  • Usage:
<script>
	let counter = $state({ count: 0 });

	function onClick() {
		console.log($state.snapshot(counter));
	}
</script>
$derived
  • Purpose: Declare derived state.
  • Usage:
<script>let count = $state(0); let doubled = $derived(count * 2);</script>
  • Replaces: Reactive variables computed using $: in non-runes mode.
$derived.by
  • Purpose: Create complex derivations with a function.
  • Usage:
<script>
	let numbers = $state([1, 2, 3]); let total = $derived.by(() => numbers.reduce((a, b) => a + b,
	0));
</script>
$effect
  • Purpose: Run side-effects when values change.
  • Usage:
<script>
	let size = $state(50);
	let color = $state('#ff3e00');

	$effect(() => {
		const context = canvas.getContext('2d');
		context.clearRect(0, 0, canvas.width, canvas.height);
		context.fillStyle = color;
		context.fillRect(0, 0, size, size);
	});
</script>
  • Replacements: $effect replaces a substantial part of $: {} blocks triggering side-effects.
$effect.pre
  • Purpose: Run code before the DOM updates.
  • Usage:
<script>
	$effect.pre(() =>{' '}
	{
		// logic here
	}
	);
</script>
  • Replaces: beforeUpdate.
$effect.tracking
  • Purpose: Check if code is running inside a tracking context.
  • Usage:
<script>console.log('tracking:', $effect.tracking());</script>
$props
  • Purpose: Declare component props.
  • Usage:
<script>let {(prop1, prop2)} = $props();</script>
  • Replaces: export let syntax for declaring props.
$bindable
  • Purpose: Declare bindable props.
  • Usage:
<script>let {(bindableProp = $bindable('fallback'))} = $props();</script>
$inspect
  • Purpose: Equivalent to console.log but re-runs when its argument changes.
  • Usage:
<script>let count = $state(0); $inspect(count);</script>
$host
  • Purpose: Retrieve the this reference of the custom element.
  • Usage:
<script>
	function greet(greeting) {
		$host().dispatchEvent(new CustomEvent('greeting', { detail: greeting }));
	}
</script>
  • Note: Only available inside custom element components on the client-side.
Overview of snippets in svelte 5

Snippets, along with render tags, help create reusable chunks of markup inside your components, reducing duplication and enhancing maintainability.

Snippets Usage
  • Definition: Use the #snippet syntax to define reusable markup sections.
  • Basic Example:
{#snippet figure(image)}
	<figure>
		<img src={image.src} alt={image.caption} width={image.width} height={image.height} />
		<figcaption>{image.caption}</figcaption>
	</figure>
{/snippet}
  • Invocation: Render predefined snippets with @render:
{@render figure(image)}
  • Destructuring Parameters: Parameters can be destructured for concise usage:

Read the full file on GitHub · 926 lines

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. 6d ago First seen · 926 lines · 4,900 tokens per session scan A 0e96bd510fdd

Subscribe to this mod's changes

neo-svelte copilot-instructions.md is an instructions file published in the GitHub repository dvcol/neo-svelte (43 stars, last pushed today), licensed MIT. It adds 4,900 tokens to every session, about $0.0245 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.