Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/polterguy/magic/agents-mdgit clone --depth 1 https://github.com/polterguy/magicWhat 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 | $0.00650 | $0.00650 |
| Opus 5 | $0.00325 | $0.00325 |
| Sonnet 5 | $0.00130 | $0.00130 |
| Haiku 4.5 | $0.00065 | $0.00065 |
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 — 71 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
Project facts
- .NET 10 SDK required (no global.json pins it)
- Frontend uses Vite + React + TypeScript, not Angular CLI
- Default login: root / root
- CI triggers only on version tags (v*..), not on branch pushes or PRs
- Running
dotnet test magic.slnfrom the repo root builds and tests all backend projects including plugins
Counterintuitive patterns
backend/backend.csprojcopiesfiles/**to the output directory with PreserveNewest. Editing files underbackend/files/changes runtime behavior without a rebuild.- Plugins communicate through slots/signals, not direct project references.
A C# slot is registered with
[Slot(Name = "...", ValueKind = ...)]and invoked by name in Hyperlambda. Adding a new slot does not require referencing the consuming project. magic.nodeandmagic.signalsare foundational — changes ripple to all plugins. Plan before touching them.backend/backend.csprojreferences only three plugin projects directly (magic.lambda.python, magic.lambda.system, magic.library). Other plugins are pulled in transitively throughmagic.library.
Risk controls
backend/files/config/appsettings.jsoncontains secrets and is git-tracked. Never commit changes to this file.- Do not modify
frontend/public/ngsw-worker.js— it is a generated PWA service worker. - Do not run database migrations or schema changes without asking.
- SQLite native plugins in
backend/sqlite-plugins/are platform-specific binaries; do not replace them with builds from another architecture. - Do not modify files under
.do/ordocker.*— they are deployment artifacts with an immutability policy.
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 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,184 stars, last pushed 2d ago), licensed MIT. It adds 650 tokens to every session, about $0.0032 per session on Opus 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.
Other instructions, from other repositories
nocobase AGENTS.md
AGENTS.md instructions for nocobase/nocobase, covering agents, personal local rules, project structure, code style rules and database & migrations.
nocobase CLAUDE.md
Claude Code instructions for nocobase/nocobase, a project described as: NocoBase is an open-source AI + no-code platform for building business systems fast. Instead of generating everything from scratch, AI works on top of production-proven infrastructure and a WYSIWYG no-code interface, so you get both speed and…
openops AGENTS.md
AGENTS.md instructions for openops-cloud/openops, covering agent onboarding — openops-cloud/openops, repo structure, tech stack, local development setup and prerequisites.
openops copilot-instructions.md
Copilot instructions for openops-cloud/openops, covering pull request review guidelines, general review rules, security review, code quality and readability review and performance and reliability review.
openops CLAUDE.md
Claude Code instructions for openops-cloud/openops, covering claude-specific instructions and skills.
intelligent-terminal rust.instructions.md
Concise Rust coding conventions for this repository.