pydevices-examples: Instructions file for Codex

AGENTS.md

pydevices-examples AGENTS.md is an instructions file for Codex, OpenCode from PyDevices/pydevices-examples. It costs 2,784 tokens per session, scanned A, original, MIT.

Repository guidance for PyDevices examples, a collection of hardware and PyScript demonstrations rather than the product libraries themselves. It explains the environment, documentation, tests, linting, and headless checks for examples with or without a graphical display.

In plain words
What is it for?
Running example programs, checking GUI behavior without a physical display, finding the right documentation, and testing or linting changes.
Why use it?
It prevents changes from being made in the wrong repository or with incorrect hardware, display, and library assumptions.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to PyDevices/pydevices-examples. 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/PyDevices/pydevices-examples/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/PyDevices/pydevices-examples

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/pydevices/pydevices-examples/agents-md/github.svg)](https://agentmods.dev/instructions/pydevices/pydevices-examples/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/pydevices/pydevices-examples/agents-md"><img src="https://agentmods.dev/badge/instructions/pydevices/pydevices-examples/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 pydevices-examples AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/pydevices/pydevices-examples/agents-md"><img src="https://agentmods.dev/badge/instructions/pydevices/pydevices-examples/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,784 This file is loaded in full into every session.
When invoked 2,784 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.02784 $0.02784
Opus 5.5 $0.01114 $0.01114
Sonnet 5.5 $0.00557 $0.00557
Haiku 4.5 $0.00278 $0.00278

Measured 11d ago against content hash 284e4f13b510, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pydevices-examples 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 11d 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.

AGENTS.md · 182 lines

How it starts

The opening of the file, as written. The whole thing — 182 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Cursor Cloud specific instructions

This repo is a showcase: examples and a PyScript gallery for the PyDevices driver stack, not the product itself. The shareable product libraries and their docs live in sibling pydevices. There is no build step for examples. .site/pyscript/lib is a symlink to ../../lib, so editing lib/ updates the PyScript gallery too.

Docs map (the site's source is docs/, built with Sphinx; see docs/index.md): docs/guides/use-a-peter-hinch-gui.md (Nano-GUI / Micro-GUI / MicroPython-Touch), docs/guides/run-the-tft-examples.md (@russhughes TFT GUI stub), docs/reference/screenshots.md (images are in docs/screenshots/). Code-adjacent runbooks: tools/README.md (example test matrix, PyScript/Playwright debugging, LVGL timer harnesses), lib/utils/README.md, scripts/README.md, tests/README.md.

Environment

displaydev, audiodev, optional appdev, multimer, events, keys, and portable hardware utilities live in sibling pydevices, which also owns TestPyPI/MIP publishing. Non-LVGL examples instantiate appdev.App(board_config); LVGL examples import it from display_driver. Board configs never own an appdev.App. AutoDisplay is imported from displaydev.auto only.

  • Cursor Cloud (multi-repo workspace): do not use a local .cursor/environment.json in this repo. The canonical cloud environment lives in PyDevices/.github — start Cloud Agents from that repo with the saved Pydevices Cloud Workspace environment. Its install command is bash scripts/cloud-workspace-install.sh (relative to the .github checkout), which symlinks /agent/repos/* into ~/gh/pydevices/. See AGENTS.md there.
  • Use the repo-root virtualenv at .venv for all Python tooling (.venv/bin/python, .venv/bin/ruff, .venv/bin/pytest). The system python3 has no project dependencies installed.
  • Browser testing with Playwright: see the multi-repo workspace's .agents/rules/playwright_environment_rule.md, one level above this checkout (not part of this repo).
  • Desktop matrices use repo .venv (cpython-venv) plus interpreters on PATH (micropython, circuitpython, and when present micropython.exe / python.exe). jupyter.py (from pydevices/bin), ./scripts/pyscript.sh, and android.py (from pydevices/bin, on PATH) aid Jupyter, PyScript, and Android (adb stage onto org.pydevices.runner; cwd paths like CLI Python — not PyScript gallery). Opt-in matrix: tools/example_test_kit.py --only-interpreter android ….
  • The desktop display backend on CPython on Windows is PGDisplay (pygame-ce; import pygame). Prefer python.exe for PG work. Do not install pygame-ce into .venv / system python3 on this laptop — those stay SDL-primary; board_config falls back to SDLDisplay when pygame-ce's public pygame.Window API is missing. pygame-ce is intentionally not in requirements-dev.txt.

Read the full file on GitHub · 182 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. 11d ago Changed · +1 lines · +29 tokens per session 284e4f13b510
  2. 19d ago Changed · +18 tokens per session 5a524518696b
  3. 27d ago Changed · +1 lines · +21 tokens per session 2ae70b314ce1
  4. 1mo ago Changed 26be78120d5c
  5. 1mo ago Changed · +1 lines · +2 tokens per session 492e5017e212
  6. 1mo ago Changed · -6 tokens per session 2c8571a3be64
  7. 2mo ago Changed · -4 tokens per session 0b1477dfce70
  8. 2mo ago First seen · 179 lines · 2,724 tokens per session scan A a0de6313da55

Subscribe to this mod's changes

pydevices-examples AGENTS.md is an instructions file published in the GitHub repository PyDevices/pydevices-examples (53 stars, last pushed 11d ago), licensed MIT. It adds 2,784 tokens to every session, about $0.0111 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

pydevices-examples AGENTS.md compared with instructions from other repositories

pydevices-examples AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pydevices-examples AGENTS.mdPyDevices/pydevices-examplesInstructions file5311d agoMITA2,784Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot