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.
curl -O https://raw.githubusercontent.com/Michael-Obele/shadcn-svelte-mcp/main/.github/copilot-instructions.mdgit clone --depth 1 https://github.com/Michael-Obele/shadcn-svelte-mcpWrote 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.
[](https://agentmods.dev/instructions/michael-obele/shadcn-svelte-mcp/copilot-instructions)<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.
<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>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.
| Model | Per session | Once 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 |
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 --> 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.
- What this repo is
- A Mastra-based AI tooling project that bundles: workflows, agents, MCP servers and custom tools. See
src/index.tsfor 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/.
- 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 --noEmitto check for TypeScript errors across the entire project). - Note: for quick smoke-tests and CI checks, we use
bun run devonly (see the smoke-test guideline below). Other MCP helper scripts exist inpackage.jsonbut the canonical developer workflow relies onbun run devfor 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
bashcommands. Provide exact, copyable bash snippets and usegitfor VCS operations. Wrap examples in bash code blocks and avoid platform-specific shells unless requested.
- 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
shadcnused bysrc/dev-server.tsandsrc/server.tsvia 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/toolsand 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.tshandles real-time documentation fetching from shadcn-svelte.com;src/services/component-discovery.tsdynamically discovers available components.
- Project-specific conventions and gotchas (do not invent alternatives)
- Tools follow Mastra patterns using
createToolwith Zod schemas for input validation (seeshadcn-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
zodto 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 insrc/mastra/tools/*). Follow the pattern:import { z } from "zod"and define schemas withz.object({...}). - Test file organization: ALWAYS place test files in the
test/directory at the repository root, never insrc/. 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. Usegit mvwhen moving files to preserve version history.
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.
- 10d ago First seen · 79 lines · 1,757 tokens per session scan C 2d57e211ce50
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.
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.
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.
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).
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).
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.
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.