website
Copilot instructions1.2k starsChanged 10 days agoMITView on GitHub
This file contains custom instructions for GitHub Copilot. These instructions are based on the .cursorrules file and provide guidelines for Svelte 5, SvelteKit, and TypeScript development. You are an expert in Svelte 5, SvelteKit, TypeScript, and modern web development. Key Principles Code Style and Structure Naming Conventions TypeScript Usage Svelte Runes UI and Styling SvelteKit Project Structure Component Development State Management
We split this copilot-instructions.md into the rules it gives an agent
39 rules. About 0 are common, 31 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈31
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Write concise, technical code with accurate Svelte 5 and SvelteKit examples.
- Distinctive: line 12
Use descriptive variable names and follow Svelte and SvelteKit conventions.
- Distinctive: line 17
Write concise, technical TypeScript or JavaScript code with accurate examples.
- Distinctive: line 18
Use functional and declarative programming patterns.
- Distinctive: line 19
Prefer iteration and modularization over code duplication.
- Distinctive: line 21
Follow Svelte's official documentation for setup and configuration: https://svelte.dev/docs/svelte/overview
- Very specific: line 25
Use PascalCase for component files (e.g., components/AuthForm.svelte).
- Distinctive: line 26
Use PascalCase for component names in imports and usage.
- Distinctive: line 27
Use snake_case for variables, functions, and props.
- Very specific: line 28
Use UPPER_CASE for true constants but not general const vars
- Distinctive: line 32
Use TypeScript for all code.
- Distinctive: line 33
Avoid enums; use string literals instead and const objects if needed.
- Very specific: line 67
Use css vars defined in src/styles/variables.css for css vars.
- Distinctive: line 68
Prefer css vars for any property where they exist.
- Distinctive: line 69
Use Svelte's built-in transition and animation features.
- Very specific: line 70
Use bg and fg convention for background and color properties respecitvely.
- Distinctive: line 74
Use the recommended SvelteKit project structure:
- Very specific: line 91
Import with the package.json subpath imports (#lib/*, #server/*, #state/*, #utilities/*, #actions/*, #assets/*, #styles/*, #const) and …
- Distinctive: line 96
Create .svelte files for Svelte components.
- Very specific: line 97
Use .svelte.ts files for state.
- Distinctive: line 99
Use Svelte's props for data passing.
- Distinctive: line 104
Use classes for complex state management (state machines):
- Distinctive: line 144
Use load functions for server-side data fetching and pre-rendering.
- Very specific: line 156
Use {#key} blocks to force re-rendering of components when needed.
- Distinctive: line 160
Use modern html elements and features wherever possible.
- Distinctive: line 165
Use load functions for server-side data fetching.
- Very specific: line 167
Create API routes in the src/routes/api/ directory.
- Distinctive: line 169
Use SvelteKit's hooks for global API middleware.
- Distinctive: line 174
Use Svelte:head component for adding meta information.
- Distinctive: line 176
Create reusable SEO components for consistent meta tag management.
- Distinctive: line 182
Use progressive enhancement for JavaScript-optional form submissions.
- Distinctive: line 186
Ensure proper semantic HTML structure in Svelte components.
- Distinctive: line 188
Ensure keyboard navigation support for interactive elements.
- Distinctive: line 189
Use Svelte's bind:this for managing focus programmatically.
- Distinctive: line 194
Use SvelteKit for full-stack applications with SSR and API routes.
- Distinctive: line 196
Use environment variables for configuration management.
- Distinctive: line 197
Follow Svelte's best practices for component composition and state management.
- Distinctive: line 198
Ensure cross-browser compatibility by testing on multiple platforms.
- Distinctive: line 199
Keep your Svelte and SvelteKit versions up to date.
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Copilot Instructions
This file contains custom instructions for GitHub Copilot. These instructions are based on the .cursorrules file and provide guidelines for Svelte 5, SvelteKit, and TypeScript development.
You are an expert in Svelte 5, SvelteKit, TypeScript, and modern web development.
Key Principles
- Write concise, technical code with accurate Svelte 5 and SvelteKit examples.
- Leverage SvelteKit's server-side rendering (SSR) and static site generation (SSG) capabilities.
- Prioritize performance optimization and minimal JavaScript for optimal user experience.
- Use descriptive variable names and follow Svelte and SvelteKit conventions.
- Organize files using SvelteKit's file-based routing system.
Code Style and Structure
- Write concise, technical TypeScript or JavaScript code with accurate examples.
- Use functional and declarative programming patterns; avoid unnecessary classes except for state machines.
- Prefer iteration and modularization over code duplication.
- Structure files: types, component logic, markup, styles.
- Follow Svelte's official documentation for setup and configuration: https://svelte.dev/docs/svelte/overview
Naming Conventions
- Use PascalCase for component files (e.g.,
components/AuthForm.svelte). - Use PascalCase for component names in imports and usage.
- Use snake_case for variables, functions, and props.
- Use UPPER_CASE for true constants but not general const vars
TypeScript Usage
- Use TypeScript for all code; prefer interfaces over types.
- Avoid enums; use string literals instead and const objects if needed.
- Enable strict mode in TypeScript for better type safety.
Svelte Runes
$state: Declare reactive statelet count = $state(0);$derived: Compute derived valueslet doubled = $derived(count * 2);$effect: Manage side effects and lifecycle$effect(() => { console.log(`Count is now ${count}`); });$props: Declare component propslet { optionalProp = 42, requiredProp } = $props();$bindable: Create two-way bindable propslet { bindableProp = $bindable() } = $props();$inspect: Debug reactive state (development only)$inspect(count);
UI and Styling
- Use css vars defined in
src/styles/variables.cssfor css vars. - Prefer css vars for any property where they exist. Colors specifically cannot be defined without css vars.
- Use Svelte's built-in transition and animation features.
- Use
bgandfgconvention for background and color properties respecitvely.
SvelteKit Project Structure
- Use the recommended SvelteKit project structure:
- src/ - lib/ - routes/ - assets/ - server/ - actions/ - state/ - utilities/ - app.html - env.ts - params.ts - static/ - vite.config.ts - SvelteKit config lives in the
sveltekit()plugin invite.config.ts; there is nosvelte.config.js. - Import with the
package.jsonsubpath imports (#lib/*,#server/*,#state/*,#utilities/*,#actions/*,#assets/*,#styles/*,#const) and include the file extension (.jsfor.tsfiles). - Declare environment variables in
src/env.tsand import them from$app/env/privateor$app/env/public.
Component Development
- Create .svelte files for Svelte components.
- Use .svelte.ts files for state.
- Implement proper component composition and reusability.
- Use Svelte's props for data passing.
- Leverage Svelte's reactive declarations for local state management.
State Management
Use classes for complex state management (state machines):
// counter.svelte.ts class Counter { count = $state(0); incrementor = $state(1); increment() { this.count += this.incrementor; } resetCount() { this.count = 0; } resetIncrementor() { this.incrementor = 1; } } export const counter = new Counter();Use in components:
<script lang="ts"> import { counter } from './counter.svelte.ts'; </script> <button onclick={() => counter.increment()}> Count: {counter.count} </button>
Routing and Pages
- Utilize SvelteKit's file-based routing system in the src/routes/ directory.
- Implement dynamic routes using [slug] syntax.
- Use load functions for server-side data fetching and pre-rendering.
- Implement proper error handling with +error.svelte pages.
Server-Side Rendering (SSR) and Static Site Generation (SSG)
- Leverage SvelteKit's SSR capabilities for dynamic content.
- Implement SSG for static pages using prerender option.
- Deploys to Vercel with adapter-vercel (Node.js 22 runtime).
Performance Optimization
- Leverage Svelte's compile-time optimizations.
- Use
{#key}blocks to force re-rendering of components when needed. - Implement code splitting using dynamic imports for large applications.
- Profile and monitor performance using browser developer tools.
- Minimize use of client-side JavaScript; leverage SvelteKit's SSR and SSG.
- Use modern html elements and features wherever possible.
- Implement proper lazy loading for images and other assets.
Data Fetching and API Routes
- Use load functions for server-side data fetching.
- Implement proper error handling for data fetching operations.
- Create API routes in the src/routes/api/ directory.
- Implement proper request handling and response formatting in API routes.
- Use SvelteKit's hooks for global API middleware.
- Data comes from Prisma via a Planetscale Mysql database.
SEO and Meta Tags
- Use Svelte:head component for adding meta information.
- Implement canonical URLs for proper SEO.
- Create reusable SEO components for consistent meta tag management.
Forms and Actions
- Utilize SvelteKit's form actions for server-side form handling.
- Implement proper client-side form validation using Svelte's reactive declarations.
- Use progressive enhancement for JavaScript-optional form submissions.
Accessibility
- Ensure proper semantic HTML structure in Svelte components.
- Implement ARIA attributes where necessary.
- Ensure keyboard navigation support for interactive elements.
- Use Svelte's bind:this for managing focus programmatically.
Key Conventions
- Embrace Svelte's simplicity and avoid over-engineering solutions.
- Use SvelteKit for full-stack applications with SSR and API routes.
- Prioritize Web Vitals (LCP, INP, CLS) for performance optimization.
- Use environment variables for configuration management.
- Follow Svelte's best practices for component composition and state management.
- Ensure cross-browser compatibility by testing on multiple platforms.
- Keep your Svelte and SvelteKit versions up to date.
Documentation
- Svelte Documentation: https://svelte.dev/docs/svelte/overview
- SvelteKit Documentation: https://svelte.dev/docs/kit/introduction
- Prisma Documentation: https://www.prisma.io/docs
Refer to Svelte, SvelteKit, and Prisma documentation for detailed information on components, database queries, and best practices.
Trending
Quiet since January.thin dataabout the whole repository
Who's talking about syntaxfm/website
- @tolin.ski“If you want to follow along https://github.com/syntaxfm/website The branch for the new site is v2. We’ll be …”Bluesky · May 5, 2023 · 5 likes
- syntaxfm/synhax“Enable source maps for CSS”GitHub · Jan 20, 2026 · 1 reactions
- syntaxfm/synhax“Enable CSS source maps in development”GitHub · Jan 20, 2026
- getsentry/sentry-javascript“fsevents from '@sentry/profiling-node' causes Github Action to fail”GitHub · Nov 1, 2024
- microsoft/playwright“[Bug]: Error: Process from config.webServer was not able to start. Exit code: 139”GitHub · Nov 1, 2024
The biggest 5 of 8 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 8
Talked about on GitHub and Bluesky (8 times).
On GitHub · 7
- Jan 20, 2026Enable source maps for CSS — syntaxfm/synhax1 reaction
- Jan 20, 2026Enable CSS source maps in development — syntaxfm/synhax0 reactions · 1 comment
- Nov 1, 2024fsevents from '@sentry/profiling-node' causes Github Action to fail — getsentry/sentry-javascript0 reactions · 5 comments
- Nov 1, 2024[Bug]: Error: Process from config.webServer was not able to start. Exit code: 139 — microsoft/playwright0 reactions · 1 comment
- Dec 16, 2023Add social badges — syntaxfm/.github0 reactions
2 more on GitHub
- Dec 15, 2023fix(sveltekit): Add conditional exports — getsentry/sentry-javascript0 reactions
- Nov 3, 2023fix(browser-profiling): Remove `BrowserTracing` from Nextjs and Sveltekit snippets — getsentry/sentry-docs0 reactions · 4 comments
On Bluesky · 1
- May 5, 2023If you want to follow along https://github.com/syntaxfm/website The branch for the new site is v2. We’ll be building in public. Trying to… — @tolin.ski5 likes and reposts · 1 reply
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

