pydevices-examples AGENTS.md

pydevices-examples AGENTS.md is an instructions file for Codex, OpenCode from PyDevices/pydevices-examples. It costs 2,720 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

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/pydevices/pydevices-examples/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,720 This file is loaded in full into every session.
When invoked 2,720 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.02720 $0.02720
Opus 5 $0.01360 $0.01360
Sonnet 5 $0.00544 $0.00544
Haiku 4.5 $0.00272 $0.00272

Measured today against content hash 0b1477dfce70, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 today.

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 · 179 lines

How it starts

The opening of the file, as written. The whole thing — 179 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 (this repo's docs/ is small on purpose — see docs/README.md): docs/peterhinch-guis.md (Nano-GUI / Micro-GUI / MicroPython-Touch), docs/tft-gui.md (@russhughes TFT GUI stub), 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 (or cmods) 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 .agents/rules/playwright_environment_rule.md.
  • 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 · 179 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. today Changed · -4 tokens per session 0b1477dfce70
  2. 4d 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 (52 stars, last pushed yesterday), licensed MIT. It adds 2,720 tokens to every session, about $0.0136 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.