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 1,757 tokens per session, scanned C, 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 1,757 This file is loaded in full into every session.
When invoked 1,757 The same file — it is already loaded in full.
Security scan C 1 finding. 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.01757 $0.01757
Opus 5 $0.00879 $0.00879
Sonnet 5 $0.00351 $0.00351
Haiku 4.5 $0.00176 $0.00176

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

Security

Grade C, and why

shadcn-svelte-mcp copilot-instructions.md scanned grade C with 1 finding 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 10d 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 -->
.github/copilot-instructions.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 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 Mastra-based AI tooling project that bundles: workflows, agents, MCP servers and custom tools. See src/index.ts for the Mastra bootstrap (workflows, agents, mcpServers).
  • Documentation is fetched in real-time from shadcn-svelte.com using Crawlee (Playwright for JS-heavy pages) and Cheerio (fallback for simple pages) under src/services/.
  1. How to run / common developer commands
  • Node engine: use Node >= 20.9.0 (see package.json "engines").
  • Development (app-level): bun run dev (calls mastra dev).
  • Type checking: bun run check (runs tsc --noEmit to check for TypeScript errors across the entire project).
  • Note: for quick smoke-tests and CI checks, we use bun run dev only (see the smoke-test guideline below). Other MCP helper scripts exist in package.json but the canonical developer workflow relies on bun run dev for early error detection.

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)
  • Mastra instance (src/index.ts): central entry that composes workflows (src/mastra/workflows), agents (src/mastra/agents), and mcpServers (src/mastra/mcp-server). MCP clients are used directly in agent definitions, not registered here.
  • MCP Server (src/mastra/mcp-server.*): exposes an object shadcn used by src/dev-server.ts and src/server.ts via startSSE/startHTTP/close. This SERVER exposes YOUR tools to external MCP clients.
  • MCP Client (src/mastra/mcp-client.ts): connects to EXTERNAL MCP servers (like Mastra's official server at mcp.mastra.ai) to USE their tools in your agents. This CLIENT consumes tools from other servers.
  • Tools (src/mastra/tools/*): each tool is created with createTool(...) from @mastra/core/tools and follows the pattern: zod input schema, execute({context}) returns result. Example tools: shadcn-svelte-get, shadcn-svelte-list, shadcn-svelte-icons.
  • Web scraping services: src/services/doc-fetcher.ts handles real-time documentation fetching from shadcn-svelte.com; src/services/component-discovery.ts dynamically discovers available components.
  1. Project-specific conventions and gotchas (do not invent alternatives)
  • Tools follow Mastra patterns using createTool with Zod schemas for input validation (see shadcn-svelte-get.ts). When creating new tools, follow the established patterns for tool development.
  • Tools use web scraping to fetch documentation in real-time from shadcn-svelte.com. The tooling parses markdown content returned from the scraping service.
  • File path resolution: tools resolve docs relative to the tool file (they use file URL + join with ../docs) — prefer relative paths instead of hard-coded absolute paths.
  • Web scraping approach: tools use real-time web scraping to fetch documentation from shadcn-svelte.com. Components are discovered dynamically from the live website.
  • Input validation: tools MUST use zod to validate inputs. Mastra's createTool requires Zod schemas for proper type inference and runtime validation. When updating or creating tools, use zod schemas (see existing examples in src/mastra/tools/*). Follow the pattern: import { z } from "zod" and define schemas with z.object({...}).
  • Test file organization: ALWAYS place test files in the test/ directory at the repository root, never in src/. Test files should be named descriptively (e.g., test-crawlee.ts, test-mcp.ts). Update package.json scripts when moving test files to reflect new paths. Use git mv when moving files to preserve version history.

Read the full file on GitHub · 79 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. 10d 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 2d ago), licensed MIT. It adds 1,757 tokens to every session, about $0.0088 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). 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

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,735 tokens