shadcn-svelte-mcp: Instructions file for GitHub Copilot

.github/copilot-instructions.md

shadcn-svelte-mcp copilot-instructions.md is an instructions file for GitHub Copilot from Michael-Obele/shadcn-svelte-mcp. It costs 2,147 tokens per session, scanned D, original, MIT.

A set of instructions for an AI coding agent working in the Michael-Obele/shadcn-svelte-mcp repository. The repository is a Mastra-based project containing AI workflows, agents, MCP servers, and tools for fetching shadcn-svelte documentation.

In plain words
What is it for?
Use it when developing, checking, or troubleshooting this repository, including its Svelte documentation crawler and Mastra application.
Why use it?
It tells the agent how this specific codebase is organized and which commands are used for development and type checking. This reduces guesswork when changing or testing the project.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is Michael-Obele/shadcn-svelte-mcp's own configuration. It tells GitHub Copilot how to work on shadcn-svelte-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything shadcn-svelte-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Michael-Obele/shadcn-svelte-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Michael-Obele/shadcn-svelte-mcp/main/.github/copilot-instructions.md
Clone the repo
git clone --depth 1 https://github.com/Michael-Obele/shadcn-svelte-mcp

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/michael-obele/shadcn-svelte-mcp/copilot-instructions/github.svg)](https://agentmods.dev/instructions/michael-obele/shadcn-svelte-mcp/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/michael-obele/shadcn-svelte-mcp/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/michael-obele/shadcn-svelte-mcp/copilot-instructions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for shadcn-svelte-mcp copilot-instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/michael-obele/shadcn-svelte-mcp/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/michael-obele/shadcn-svelte-mcp/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,147 This file is loaded in full into every session.
When invoked 2,147 The same file — it is already loaded in full.
Security scan D 3 findings. A grade says what 26 rules found in the file — not that it is safe.
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.02147 $0.02147
Opus 5.5 $0.00859 $0.00859
Sonnet 5.5 $0.00429 $0.00429
Haiku 4.5 $0.00215 $0.00215

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

Security

Grade D, and why

shadcn-svelte-mcp copilot-instructions.md scanned grade D with 3 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 24d 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- .github/copilot-instructions.md - guidance for AI coding agents -->

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

- Verify protocol behavior with curl: `curl -X POST http://localhost:3000/mcp -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Verify protocol behavior with curl: `curl -X POST http://localhost:3000/mcp -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params
.github/copilot-instructions.md · 97 lines

How it starts

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

AI assistant quick-start for this repository

This file gives concise, actionable instructions for an AI coding agent to be productive in this codebase.

  1. What this repo is
  • A tmcp-based MCP server (lightweight, schema-agnostic MCP SDK). See src/mcp/server.ts for the McpServer assembly, src/index.ts for the Node/Bun HTTP entry, and src/stdio.ts for local MCP clients.
  • Documentation is fetched in real-time from shadcn-svelte.com using Cheerio + Turndown (HTML → Markdown) and direct .md / llms.txt endpoint fetching under src/services/.
  1. How to run / common developer commands
  • Runtimes: Node >= 20.9.0 or Bun >= 1.1 (see package.json "engines").
  • Development: bun run dev (HTTP server with watch on http://localhost:3000, MCP endpoint /mcp, health /health).
  • Type checking: bun run check (runs tsc --noEmit across the project).
  • Local MCP: bun run mcp (stdio transport).
  • Build: bun run build (bundles src/index.ts + src/stdio.ts → dist/ for Fly.io/Render).
  • Agent sync guard: bun run check:agents (fails if the per-editor agent bodies in agents/ drift apart; agents-md-snippet.md is a declared variant).
  • Version guard: bun run check-versions (package.json must match src/mcp/server.ts).
  • CI: .github/workflows/ci.yml runs check, check:agents, check-versions, bun test, and a report-only link check on every push and pull request. Only bun.lock exists, so CI uses bun install --frozen-lockfile — npm ci cannot work in this repo.

Important: AI-generated/progress documentation and ephemeral notes

  • All AI-generated progress docs, status logs, design notes, or autogenerated markdown should be created or updated only inside the ai-generated-docs/ folder at the repository root. Do not place generated progress docs in other directories.
  • When moving or manipulating files as part of progress updates, prefer Git-aware operations (for example git mv) so history is preserved.

Shell command preference

  • When suggesting or running commands, prefer POSIX bash commands. Provide exact, copyable bash snippets and use git for VCS operations. Wrap examples in bash code blocks and avoid platform-specific shells unless requested.
  1. Big-picture architecture (quick map)
  • MCP Server (src/mcp/server.ts): exports server (tmcp McpServer) and serverVersion. Registers 5 tools + 5 prompts, uses the Valibot adapter (@tmcp/adapter-valibot) — all schemas are valibot.
  • Entry points:
    • src/index.ts — srvx HTTP server (Node/Bun): Streamable HTTP at /mcp, /health endpoint.
    • src/stdio.ts — StdioTransport for local MCP clients.
  • Tools (src/mcp/tools/*): each is created with defineTool(...) from tmcp/tool and follows the pattern: valibot schema, async (input) => tool.text(...) | tool.error(...). Examples: shadcn-svelte-get, shadcn-svelte-list, shadcn-svelte-icons, shadcn-svelte-search, bits-ui-get.
  • Prompts (src/mcp/prompts/*): created with definePrompt(...) from tmcp/prompt, valibot schema, return { messages: [...] }.
  • Web scraping services: src/services/doc-fetcher.ts (real-time doc fetching), src/services/catalog.ts (unified live catalog: llms.txt categories + descriptions merged with the component-discovery.ts registry index and bits-ui-discovery.ts), src/services/catalog-search.ts (pure multi-term search core used by the search tool), src/services/cache-manager.ts (memory + optional KV + optional disk tiers, 3-day TTL).
  1. Project-specific conventions and gotchas (do not invent alternatives)
  • Tools use defineTool from tmcp/tool with valibot schemas (import * as v from "valibot") for input validation. Use v.object({...}), v.string(), v.number(), v.picklist([...]) for string literals, v.optional(schema, default) for optional-with-default, and v.pipe(schema, v.description("...")) for field descriptions. Tool handlers MUST return content via tool.text(...) / tool.error(...) from tmcp/utils — never a bare string.
  • Prompts use definePrompt from tmcp/prompt with the same valibot schema conventions and return { messages: [...] } (role: "user" | "assistant", content: { type: "text", text }).
  • The version anchor: version: "x.y.z" in src/mcp/server.ts MUST stay in sync with package.json (see scripts/check-versions.js / sync-versions*.js; regex is version:\s*"[^"]+",).
  • Web scraping approach: tools fetch documentation in real-time from shadcn-svelte.com (.md endpoints, llms.txt, Cheerio+Turndown HTML fallback). Components are discovered dynamically from the live website.
  • The cache manager loads node:fs dynamically so it stays loadable on runtimes without it, degrading to memory-only. Do not add static node:* imports to shared services.
  • Test file organization: ALWAYS place test files in the test/ directory at the repository root, never in src/. Use git mv when moving files to preserve version history.

Read the full file on GitHub · 97 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. 24d ago Changed · -8 lines · -179 tokens per session fd121a59eab3
  2. 25d ago Changed · +59 tokens per session 32a4e0d1afa7
  3. 26d ago Changed · +3 lines · +137 tokens per session 3f6c33286a55
  4. 1mo ago Changed · +23 lines · +373 tokens per session scan C → D 3c8e18e43bc8
  5. 1mo ago First seen · 79 lines · 1,757 tokens per session scan C 2d57e211ce50

Subscribe to this mod's changes

shadcn-svelte-mcp copilot-instructions.md is an instructions file published in the GitHub repository Michael-Obele/shadcn-svelte-mcp (58 stars, last pushed 24d ago), licensed MIT. It adds 2,147 tokens to every session, about $0.0086 per session on Opus 5.5. A static security scan graded it D with 3 findings (hidden instructions, sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories