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/78/xiaozhi-esp32/agents-mdgit clone --depth 1 https://github.com/78/xiaozhi-esp32Wrote 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.
[](https://agentmods.dev/instructions/78/xiaozhi-esp32/agents-md)<a href="https://agentmods.dev/instructions/78/xiaozhi-esp32/agents-md"><img src="https://agentmods.dev/badge/instructions/78/xiaozhi-esp32/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01079 | $0.01079 |
| Opus 5 | $0.00540 | $0.00540 |
| Sonnet 5 | $0.00216 | $0.00216 |
| Haiku 4.5 | $0.00108 | $0.00108 |
Grade A, and why
xiaozhi-esp32 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 4d 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 — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Project
XiaoZhi is an ESP-IDF C/C++ voice-assistant firmware supporting many chips, boards, displays, audio devices, and network transports. A build selects exactly one board implementation.
Use ESP-IDF v6.0.2 when possible. IDF 5.5.x is retained only for documented legacy boards.
Architecture
main/application.*: main event loop, protocol lifecycle, and high-level behavior.main/device_state_machine.*: legal runtime state transitions.main/boards/common/: board interfaces and reusable hardware/network helpers.main/boards/**/: board-specific pins, initialization, and build variants.main/audio/: codecs, audio tasks, engines, wake words, and queues.main/protocols/: transport-neutral API plus WebSocket and MQTT/UDP.main/display/andmain/led/: reusable UI implementations.main/mcp_server.*: common device-side MCP tools and dispatch.main/Kconfig.projbuild: board and feature configuration.main/CMakeLists.txt: source, board, locale, font, and asset selection.scripts/build.py: canonical board/variant build entry point.
Read the closest existing implementation before adding a new one. Prefer the narrowest owning layer; do not put board-specific behavior into core modules.
Required Rules
- Preserve unrelated worktree changes and keep patches focused.
- A build must export exactly one board factory through
DECLARE_BOARD(...). - Never alter an existing board's pins to support different hardware. Add a uniquely named board or release variant; board identity affects OTA compatibility.
- Core code depends on
Boardinterfaces, never a concrete board class or boardconfig.h. - Treat camera, backlight, display, LED, battery, and similar capabilities as optional.
- Change runtime state through
Application::SetDeviceState()and the state machine. - Callbacks may run outside the main task. Schedule application mutations with
Application::Schedule()or event bits. - Do not block the main event loop or audio tasks. Avoid unbounded queues and repeated large allocations in audio paths.
- Keep shared message semantics in
Protocol; verify both transports when changing its contract. - Validate network input and preserve
cJSONownership. NVS keys are persistent API and require migration when changed. - Guard target-specific features with Kconfig/component rules. Do not assume every target has PSRAM or S3/P4 resources.
- Do not manually edit generated/vendor output:
build/,releases/,managed_components/,components/,sdkconfig*,main/assets/lang_config.h, or generated mmap headers. - Format only touched C/C++ files with the repository
.clang-format; avoid unrelated mass formatting.
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.
- 4d ago First seen · 95 lines · 1,079 tokens per session scan A b8b4a28987b9
xiaozhi-esp32 AGENTS.md is an instructions file published in the GitHub repository 78/xiaozhi-esp32 (29,582 stars, last pushed 4d ago), licensed MIT. It adds 1,079 tokens to every session, about $0.0054 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
FastLED GEMINI.md
Gemini CLI instructions for FastLED/FastLED, a project described as: The FastLED library for colored LED animation on Arduino. Please direct questions/requests for help to the FastLED Reddit community: http://fastled.io/r We'd like to use github "issues" just for tracking library bugs / enhancements.
mdb-esp32-cashless AGENTS.md
Instructions for nodestark/mdb-esp32-cashless, covering vmflow — agent context, 1. mqtt rpc — real-time device control, 2. supabase rest — data & credits, 3. agent playbooks and notes.
ROS AGENTS.md
Instructions for lawliet206/ROS, covering agents.md, 项目是什么, 环境版本(不可随意升级/降级), 目录结构(catkin 工作空间根 = 仓库根) and 重要 launch 与脚本(命名与参数以代码为准,改文档必须同步).
p3a AGENTS.md
AGENTS.md instructions for fabkury/p3a: You are a highly proficient embedded systems developer with expertise in ESP-IDF and ESP32-P4. The project is p3a, a Wi-Fi pixel art player. When using idf.py, activate the ESP-IDF v5.5.4 environment with . C:\Espressif\tools\Microsoft.v5.5.4.PowerShellprofile.ps1, then set…
tamaclaude CLAUDE.md
Instructions for thaitop/tamaclaude, covering claude.md, what this is, where a reason goes, data flow and commands.
arduino-skills GEMINI.md
Instructions for wedsamuel1230/arduino-skills: The shared source of truth is skills/. Load only the specialist skill and references needed for the request. Preserve the board intake, ordered constexpr int declarations, C/C++ embedded-first orientation, and explicit hardware evidence gates.