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/dotnet/maui-labs/devflow-architecturegit clone --depth 1 https://github.com/dotnet/maui-labsWhat 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.02643 | $0.02643 |
| Opus 5 | $0.01321 | $0.01321 |
| Sonnet 5 | $0.00529 | $0.00529 |
| Haiku 4.5 | $0.00264 | $0.00264 |
Grade A, and why
maui-labs devflow-architecture.instructions.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 3d 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.
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 — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.
DevFlow Architecture
Communication Model
DevFlow uses a three-tier architecture:
┌──────────────┐ ┌──────────────┐ ┌──────────────────────────┐
│ CLI / MCP │ HTTP (direct) │ Broker │ WebSocket │ Agent (in-app) │
│ (maui devflow)│ ◄──────────► │ (port 19223) │ ◄───────────── │ (dynamic port) │
└──────────────┘ (after port └──────────────┘ (registration) └──────────────────────────┘
│ discovery) │ │
│ HTTP (direct, after discovery) │ │ Platform APIs
└────────────────────────────────┼────────────────────────────────┘
▲
│ MCP (stdio)
▼
┌──────────────┐
│ AI Agent │
│ (Copilot, │
│ Claude, │
│ etc.) │
└──────────────┘
- Agent runs inside the app process (added via NuGet package — MAUI or plain .NET). Exposes HTTP API on a dynamic port. Registers with the Broker over WebSocket. Has direct access to the visual tree, pages, platform views.
- Broker runs on the developer machine (port 19223). Agents register with it via WebSocket. CLI discovers agent ports through the broker's HTTP API.
- CLI (
maui devflow) discovers agents via the broker, then communicates directly with agents over HTTP. Also hosts the MCP server for AI agent integration.
Package Dependency Graph
Microsoft.Maui.DevFlow.CLI (global tool)
├── Microsoft.Maui.DevFlow.Driver (platform drivers)
│ └── Microsoft.Maui.DevFlow.Client (AgentClient — public protocol API)
├── ModelContextProtocol (MCP server)
├── System.CommandLine (CLI framework)
├── Spectre.Console (terminal UI)
└── Websocket.Client (broker transport)
Microsoft.Maui.DevFlow.Client (netstandard2.0 + modern .NET)
├── AgentClient, ElementInfo, protocol DTOs, HTTP/JSON operations
└── System.Text.Json
Microsoft.Maui.DevFlow.Driver (modern .NET, platform-specific)
├── Microsoft.Maui.DevFlow.Client
├── App process management, UI Automation, Mac accessibility
└── SkiaSharp (screenshot processing)
Microsoft.Maui.DevFlow.Agent.Abstractions (no MAUI dependency)
├── AgentHttpServer, AgentOptions, routing, DevFlowAgentService
├── ElementInfo + DTOs, Css/, Network/, Profiling/, extensions
├── Fizzler (CSS selector parsing)
└── SkiaSharp (screenshot capture/resize)
Microsoft.Maui.DevFlow.Agent.Core (MAUI UI backend)
└── Microsoft.Maui.DevFlow.Agent.Abstractions
Microsoft.Maui.DevFlow.Agent (NuGet package for MAUI app developers)
├── Microsoft.Maui.DevFlow.Agent.Core
└── Microsoft.Maui.DevFlow.Blazor (optional — CDP bridge for Blazor WebViews)
Microsoft.Maui.DevFlow.Agent.Gtk (NuGet package for GTK/Linux apps)
├── Microsoft.Maui.DevFlow.Agent.Core
└── Microsoft.Maui.DevFlow.Blazor.Gtk (optional — WebKitGTK CDP)
Microsoft.Maui.DevFlow.Agent.WPF (NuGet package for WPF apps)
└── Microsoft.Maui.DevFlow.Agent.Core
Microsoft.Maui.DevFlow.Agent.Native (plain .NET android/ios/maccatalyst/macos — no MAUI)
├── Microsoft.Maui.DevFlow.Agent.Abstractions
└── NativeUi.{Android,UIKit,AppKit}, NativeDevFlowAgentService, DevFlowAgent.Start()
Microsoft.Maui.DevFlow.Agent.Native.Essentials (optional add-on)
└── Microsoft.Maui.DevFlow.Agent.Native + Microsoft.Maui.Essentials
Microsoft.Maui.DevFlow.Logging (standalone — no MAUI dependency)
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.
- 3d ago First seen · 205 lines · 2,643 tokens per session scan A fdfde23ec283
maui-labs devflow-architecture.instructions.md is an instructions file published in the GitHub repository dotnet/maui-labs (212 stars, last pushed 5d ago), licensed MIT. It adds 2,643 tokens to every session, about $0.0132 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
react-native-restart CLAUDE.md
Instructions for avishayil/react-native-restart, covering claude.md, what this is, architecture, repository map and common commands.
tapflow AGENTS.md
AGENTS.md instructions for jo-duchan/tapflow, covering tapflow — agents.md (common rules), what, core value, two testing modes and why.
AppClaw CLAUDE.md
Instructions for appclawhq/AppClaw, covering claude.md, what is appclaw?, build & run commands, architecture and entry point & cli modes (src/index.ts).
mobile-observability CLAUDE.md
Instructions for nexus-labs-automation/mobile-observability, covering mobile observability plugin, project context, plugin components, key commands and skills.
metamask-mobile AGENTS.md
AGENTS.md instructions for MetaMask/metamask-mobile, covering agents.md, project overview, essential commands, setup & installation and expo development (recommended for js-only development).
AppBootstrapAI CLAUDE.md
Instructions for kelvinkosbab/AppBootstrapAI, covering claude.md, project overview, what's in the box, how to onboard this into a new app project and update an already-managed repo — never a plain re-install.