agentleFS
syntaxfmsyntaxfm/website/.github/copilot-instructions.md

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
  1. Distinctive:

    Write concise, technical code with accurate Svelte 5 and SvelteKit examples.

    line 9
  2. Distinctive:

    Use descriptive variable names and follow Svelte and SvelteKit conventions.

    line 12
  3. Distinctive:

    Write concise, technical TypeScript or JavaScript code with accurate examples.

    line 17
  4. Distinctive:

    Use functional and declarative programming patterns.

    line 18
  5. Distinctive:

    Prefer iteration and modularization over code duplication.

    line 19
  6. Distinctive:

    Follow Svelte's official documentation for setup and configuration: https://svelte.dev/docs/svelte/overview

    line 21
  7. Very specific:

    Use PascalCase for component files (e.g., components/AuthForm.svelte).

    line 25
  8. Distinctive:

    Use PascalCase for component names in imports and usage.

    line 26
  9. Distinctive:

    Use snake_case for variables, functions, and props.

    line 27
  10. Very specific:

    Use UPPER_CASE for true constants but not general const vars

    line 28
  11. Distinctive:

    Use TypeScript for all code.

    line 32
  12. Distinctive:

    Avoid enums; use string literals instead and const objects if needed.

    line 33
  13. Very specific:

    Use css vars defined in src/styles/variables.css for css vars.

    line 67
  14. Distinctive:

    Prefer css vars for any property where they exist.

    line 68
  15. Distinctive:

    Use Svelte's built-in transition and animation features.

    line 69
  16. Very specific:

    Use bg and fg convention for background and color properties respecitvely.

    line 70
  17. Distinctive:

    Use the recommended SvelteKit project structure:

    line 74
  18. Very specific:

    Import with the package.json subpath imports (#lib/*, #server/*, #state/*, #utilities/*, #actions/*, #assets/*, #styles/*, #const) and …

    line 91
  19. Distinctive:

    Create .svelte files for Svelte components.

    line 96
  20. Very specific:

    Use .svelte.ts files for state.

    line 97
  21. Distinctive:

    Use Svelte's props for data passing.

    line 99
  22. Distinctive:

    Use classes for complex state management (state machines):

    line 104
  23. Distinctive:

    Use load functions for server-side data fetching and pre-rendering.

    line 144
  24. Very specific:

    Use {#key} blocks to force re-rendering of components when needed.

    line 156
  25. Distinctive:

    Use modern html elements and features wherever possible.

    line 160
  26. Distinctive:

    Use load functions for server-side data fetching.

    line 165
  27. Very specific:

    Create API routes in the src/routes/api/ directory.

    line 167
  28. Distinctive:

    Use SvelteKit's hooks for global API middleware.

    line 169
  29. Distinctive:

    Use Svelte:head component for adding meta information.

    line 174
  30. Distinctive:

    Create reusable SEO components for consistent meta tag management.

    line 176
  31. Distinctive:

    Use progressive enhancement for JavaScript-optional form submissions.

    line 182
  32. Distinctive:

    Ensure proper semantic HTML structure in Svelte components.

    line 186
  33. Distinctive:

    Ensure keyboard navigation support for interactive elements.

    line 188
  34. Distinctive:

    Use Svelte's bind:this for managing focus programmatically.

    line 189
  35. Distinctive:

    Use SvelteKit for full-stack applications with SSR and API routes.

    line 194
  36. Distinctive:

    Use environment variables for configuration management.

    line 196
  37. Distinctive:

    Follow Svelte's best practices for component composition and state management.

    line 197
  38. Distinctive:

    Ensure cross-browser compatibility by testing on multiple platforms.

    line 198
  39. Distinctive:

    Keep your Svelte and SvelteKit versions up to date.

    line 199

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

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 state
    let count = $state(0);
  • $derived: Compute derived values
    let doubled = $derived(count * 2);
  • $effect: Manage side effects and lifecycle
    $effect(() => {
    	console.log(`Count is now ${count}`);
    });
  • $props: Declare component props
    let { optionalProp = 42, requiredProp } = $props();
  • $bindable: Create two-way bindable props
    let { bindableProp = $bindable() } = $props();
  • $inspect: Debug reactive state (development only)
    $inspect(count);

UI and Styling

  • Use css vars defined in src/styles/variables.css for 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 bg and fg convention 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 in vite.config.ts; there is no svelte.config.js.
  • Import with the package.json subpath imports (#lib/*, #server/*, #state/*, #utilities/*, #actions/*, #assets/*, #styles/*, #const) and include the file extension (.js for .ts files).
  • Declare environment variables in src/env.ts and import them from $app/env/private or $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

  1. Embrace Svelte's simplicity and avoid over-engineering solutions.
  2. Use SvelteKit for full-stack applications with SSR and API routes.
  3. Prioritize Web Vitals (LCP, INP, CLS) for performance optimization.
  4. Use environment variables for configuration management.
  5. Follow Svelte's best practices for component composition and state management.
  6. Ensure cross-browser compatibility by testing on multiple platforms.
  7. Keep your Svelte and SvelteKit versions up to date.

Documentation

Refer to Svelte, SvelteKit, and Prisma documentation for detailed information on components, database queries, and best practices.

Download now (ZIP)

Trending

Quiet since January.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 2 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the syntaxfm/website repository that our weekly crawl found: only 8 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about syntaxfm/website

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

2 more on GitHub
  • 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.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.