magic: Instructions file for Codex

AGENTS.md

magic AGENTS.md is an instructions file for Codex, OpenCode from polterguy/magic. It costs 903 tokens per session, scanned A, original, MIT.

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

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is polterguy/magic's own configuration. It tells Codex and OpenCode how to work on magic 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 magic configures →

About the project

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.

polterguy/magic · 1,237 stars · on GitHub · hyperlambda.dev

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/polterguy/magic/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/polterguy/magic

Made for: Codex, OpenCode.

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 magic AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/polterguy/magic/agents-md/github.svg)](https://agentmods.dev/instructions/polterguy/magic/agents-md)
Your own site
<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.

agentmods 80×15 button for magic AGENTS.md

Your own site · 80×15
<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>
Per session 903 This file is loaded in full into every session.
When invoked 903 The same file — it is already loaded in full.
Security scan A 0 findings. 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.00903 $0.00903
Opus 5.5 $0.00361 $0.00361
Sonnet 5.5 $0.00181 $0.00181
Haiku 4.5 $0.00090 $0.00090

Measured yesterday against content hash d19680eb4ed5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 · 83 lines

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 fails dotnet build, so fix it, or, for a rule that is not meant for that code, say so in .editorconfig with 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.sln from the repo root builds and tests all backend projects including plugins

  • Commits follow Conventional Commits (feat(frontend): ..., fix: ...), enforced by commitlint in a husky commit-msg hook. The hooks live in frontend/.husky/ and install with npm install in frontend/. pre-commit runs Prettier and ESLint on staged frontend files, and pre-push runs format check, lint, typecheck and tests only when the pushed commits touch frontend/

Read the full file on GitHub · 83 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 Changed · +8 lines · +131 tokens per session d19680eb4ed5
  2. 4d ago Changed · +4 lines · +122 tokens per session fb1a8196aa5a
  3. 2mo ago 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,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.

Related

magic AGENTS.md compared with instructions from other repositories

magic AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
magic AGENTS.mdpolterguy/magicInstructions file1.2kyesterdayMITA903Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode