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/tig/mcec/agents-mdgit clone --depth 1 https://github.com/tig/mcecWhat 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.04279 | $0.04279 |
| Opus 5 | $0.02139 | $0.02139 |
| Sonnet 5 | $0.00856 | $0.00856 |
| Haiku 4.5 | $0.00428 | $0.00428 |
Grade A, and why
mcec 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 2d 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 — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md: driving (and testing) MCEC with an agent
MCEC 3.0 (the Model Context Environment Controller) gives an AI agent eyes, hands, and a safe
front door on Windows (Windows computer use, in the sense Claude, Codex, and similar agents use the
term). This file is the self-reinforcing guidance loop: the canonical guidance an
agent needs, plus the recipe to dogfood it (drive MCEC through its own MCP server) so the guidance
stays honest. Each time MCEC changes, re-run the dogfood and refine the guidance below and in
AgentServer.Instructions.
The built-in guidance (single source of truth)
The connect-time guidance an MCP client shows the model is authored in
src/Agent/AgentInstructions.md. It is embedded into the exe at build
time and returned in the MCP initialize response (result.instructions) via AgentServer.Instructions,
which loads the embedded file and collapses each blank-line-separated paragraph to one line.
Work the loop observe → target → act → observe.
- Target a window by
window(title substring),process(name without.exe),className, orforeground:true. At least one is required; a call with no target fails by design.- Observe:
querydumps the UI Automation tree (controlType, name, automationId, bounds, state, value; bounded bymaxDepthandmaxNodes);capturereturns a PNG (renders composited WinUI/WPF surfaces correctly). Check results before trusting them: acapturewitherrorCategory: capture-blankis a black/empty frame (minimized/cloaked/occluded/locked session); restore or foreground the window and retry, don't trust the image; acapture-fallbackwarning means PrintWindow was refused and the picture may be wrong; aquerywithtruncated:true(atree-truncatedwarning) hit the node cap; raisemaxNodesor target a deeper window.warningsare non-fatal;errorCategorytells you how to recover. (Shape:docs/agent_control.mdandagent-tool-result.schema.json.)- Act: prefer
invoke(byname/automationId/classname;actioninvoke|toggle|setvalue| setfocus|expand|collapse|select) over coordinate clicks.invokefast-fails if the control isn't present (it does not wait), sofind/wait-forthe control first; aninvokethat returnsno-targetmeans it hasn't appeared yet;wait-forit rather than retrying blindly. Useselectfor TabItem/ListItem/RadioButton. To drag (resize a window by its sizing border, move one by its title bar, or drag a slider/handle; noinvokefor these), use thedragtool: give afromandto, each an element{ by, value }or an absolute screen pixel{ x, y }, plus optionalpathwaypoints; the whole press-move-release is dispatched atomically (prefer it over hand-rollingmouse:lbd/mouse:mt/mouse:lbu, which can interleave with other input). To click a pointinvokecan't reach (a custom-drawn cell, a canvas/map coordinate, a bare pixel), use theclicktool. Before firing an app's own keyboard shortcut at a specific surface (e.g. a MAUI GraphicsView),focusit first; keystrokes only reach the foreground window's focused control.send_commandis the raw escape hatch for any other MCEC command (keystrokes, a single mouse action, launch). Re-queryafter acting; bounds have moved.- Verify with another
query/capture.Compose creatively. Many tasks have no single dedicated tool; build them from primitives. Launch an app with the
launchtool (preferred). Useinvokeaction:select for tabs/list/radios. Drag/resize/move with thedragtool; switch a tab byinvokeselect orclick; record a window by passing itsquery'd bounds as therecordregion; wait on window state with thewindowstool + atimeoutand acondition(appears/disappears/foreground). A capable agent uses the full command set; reach for a rawsend_commandbefore concluding something can't be done.
There is exactly one copy: edit that file. It is the observe → target → act → observe playbook
(targeting; observation with query/capture/record/displays; invoke, drag, click, focus and
send_command; the result
envelope; creative composition of primitives; the on-screen overlay; and the security gates). Nothing here
to keep in sync.
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.
- 2d ago First seen · 217 lines · 4,279 tokens per session scan A b9aae5acb188
mcec AGENTS.md is an instructions file published in the GitHub repository tig/mcec (102 stars, last pushed 8d ago), licensed MIT. It adds 4,279 tokens to every session, about $0.0214 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
Windows-MCP CLAUDE.md
Claude Code instructions for CursorTouch/Windows-MCP, covering claude.md, project overview, build & development commands, architecture and code style.
ha-mcp AGENTS.md
AGENTS.md instructions for homeassistant-ai/ha-mcp, covering agents.md, instruction structure, repository structure, worktree workflow and project overview.
Gladys AGENTS.md
AGENTS.md instructions for GladysAssistant/Gladys, covering agents.md, cursor cloud specific instructions, running the app (dev mode), non-obvious caveats and feature specs (spec-first process).
core copilot-instructions.md
Copilot instructions for home-assistant/core, covering copilot code review instructions, pull request template, breaking change, proposed change and type of change.
unifi-mcp AGENTS.md
AGENTS.md instructions for sirkirby/unifi-mcp, covering project rules, non-goals, architecture rules, layering and singletons.
HomeAssistant-Tapo-Control copilot-instructions.md
Instructions for JurajNyiri/HomeAssistant-Tapo-Control: Follow AGENTS.md and CONTRIBUTING.md for this repository.