magic AGENTS.md

Project-specific instructions for working on Magic Cloud, a .NET backend and React frontend made up of many plugin projects. It documents the commands, local server addresses, tests, builds, and notable project rules.

In plain words
What is it for?
Use it when developing or testing Magic Cloud’s backend, frontend, or plugins, including running the API, starting the development server, building the frontend, and running selected or complete test suites.
Why use it?
It gives a coding agent the repository’s exact setup and test commands, reducing mistakes caused by guessing how the project works.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/polterguy/magic/agents-md
Clone the repo
git clone --depth 1 https://github.com/polterguy/magic

Made for: Codex, OpenCode.

Per session 650 This file is loaded in full into every session.
When invoked 650 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00650 $0.00650
Opus 5 $0.00325 $0.00325
Sonnet 5 $0.00130 $0.00130
Haiku 4.5 $0.00065 $0.00065

Measured yesterday against content hash 4a11d75d8791, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

AGENTS.md · 71 lines

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.sln from the repo root builds and tests all backend projects including plugins

Counterintuitive patterns

  • backend/backend.csproj copies files/** to the output directory with PreserveNewest. Editing files under backend/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.node and magic.signals are foundational — changes ripple to all plugins. Plan before touching them.
  • backend/backend.csproj references only three plugin projects directly (magic.lambda.python, magic.lambda.system, magic.library). Other plugins are pulled in transitively through magic.library.

Risk controls

  • backend/files/config/appsettings.json contains 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/ or docker.* — they are deployment artifacts with an immutability policy.

Read the full file on GitHub · 71 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. yesterday First seen · 71 lines · 650 tokens per session scan A 4a11d75d8791

Subscribe to this mod's changes

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.