Magic turns plain-language descriptions into full-stack applications and AI agents with a database, secured API, business logic, and frontend running on the user's own hardware. It is used to build business applications, database-driven agents, chatbots, legacy-database APIs, and wrappers around third-party APIs. The catalogue includes an instruction and an MCP server for working with Magic and exposing its endpoints to agents.
Borrowing it
Nothing to install: this file belongs to polterguy/magic. 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/polterguy/magic/master/AGENTS.mdgit clone --depth 1 https://github.com/polterguy/magicWrote 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/polterguy/magic/agents-md)<a href="https://agentmods.dev/instructions/polterguy/magic/agents-md"><img src="https://agentmods.dev/badge/instructions/polterguy/magic/agents-md/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/polterguy/magic/agents-md"><img src="https://agentmods.dev/badge/instructions/polterguy/magic/agents-md.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.00903 | $0.00903 |
| Opus 5.5 | $0.00361 | $0.00361 |
| Sonnet 5.5 | $0.00181 | $0.00181 |
| Haiku 4.5 | $0.00090 | $0.00090 |
Grade A, and why
magic AGENTS.md scanned grade A with 0 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 yesterday.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Magic Cloud is a .NET 10 backend + React/Vite/TypeScript frontend with a
Hyperlambda DSL runtime built on the Active Events (slots/signals) pattern.
~30 C# plugin projects live in plugins/, each with a .tests companion.
Commands
Backend — builds and starts API on http://localhost:5000
cd backend && dotnet run
Frontend — dev server on http://localhost:4201
cd frontend && npm install && npm run dev
One plugin's tests
cd plugins//.tests && dotnet test
All backend tests (run from repo root)
dotnet test magic.sln
Frontend typecheck + production build
cd frontend && npm run build
Frontend tests (single run, no watch)
cd frontend && npm run test
Frontend lint (zero warnings) and formatting
cd frontend && npm run lint && npm run format:check
Project facts
-
.NET 10 SDK required (no global.json pins it)
-
Frontend uses Vite + React + TypeScript, not Angular CLI
-
The C# build treats warnings as errors, and runs the Sonar rules (SonarAnalyzer.CSharp) next to the Roslyn ones, with the severities of
.editorconfig. A violation failsdotnet build, so fix it, or, for a rule that is not meant for that code, say so in.editorconfigwith the reason. The SonarCloud workflow builds with-p:SonarGate=false -
Default login: root / root
-
A version tag (v*..) builds and publishes the Docker images. Pushes to master and pull requests run the analyzer build, the frontend build and tests, SonarCloud, CodeQL and the secret scan
-
Running
dotnet test magic.slnfrom the repo root builds and tests all backend projects including plugins -
Commits follow Conventional Commits (
feat(frontend): ...,fix: ...), enforced by commitlint in a huskycommit-msghook. The hooks live infrontend/.husky/and install withnpm installinfrontend/.pre-commitruns Prettier and ESLint on staged frontend files, andpre-pushruns format check, lint, typecheck and tests only when the pushed commits touchfrontend/
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.
- yesterday Changed · +8 lines · +131 tokens per session d19680eb4ed5
- 4d ago Changed · +4 lines · +122 tokens per session fb1a8196aa5a
- 2mo ago First seen · 71 lines · 650 tokens per session scan A 4a11d75d8791
magic AGENTS.md is an instructions file published in the GitHub repository polterguy/magic (1,237 stars, last pushed yesterday), licensed MIT. It adds 903 tokens to every session, about $0.0036 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
magic AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| magic AGENTS.mdpolterguy/magic | Instructions file | 1.2k | yesterday | MIT | A | 903 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |