Borrowing it
Nothing to install: this file belongs to chayuto/ws-ESP32-S3-CAM. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/chayuto/ws-ESP32-S3-CAM/main/.claude/commands/peripherals.mdgit clone --depth 1 https://github.com/chayuto/ws-ESP32-S3-CAMWrote 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/commands/chayuto/ws-esp32-s3-cam/peripherals)<a href="https://agentmods.dev/commands/chayuto/ws-esp32-s3-cam/peripherals"><img src="https://agentmods.dev/badge/commands/chayuto/ws-esp32-s3-cam/peripherals.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.1 | $0.00000 | $0.01861 |
| Opus 5 | $0.00000 | $0.00931 |
| Sonnet 5 | $0.00000 | $0.00372 |
| Haiku 4.5 | $0.00000 | $0.00186 |
Grade A, and why
peripherals 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 7d 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 — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Peripheral cookbook — ESP32-S3-CAM-GC2145
Use the vendor BSP waveshare/esp32_s3_cam_ovxxxx for anything nontrivial. It hides the CH32V003 IO-expander quirks, I²C bus init, camera pin config, and codec addresses. Header: ref/demo/ESP32-S3-CAM-OVxxxx/examples/ESP-IDF-v5.5.1/04_dvp_camera_display/components/waveshare__esp32_s3_cam_ovxxxx/include/bsp/esp32_s3_cam_ovxxxx.h
Dependency Line
# main/idf_component.yml
dependencies:
waveshare/esp32_s3_cam_ovxxxx: ^1.0.0
Standard Init Sequence
#include "bsp/esp-bsp.h"
bsp_i2c_init(); // GPIO 7/8 shared bus for everything
bsp_io_expander_init(); // CH32V003 — needed before display/touch/LED
bsp_audio_init(NULL); // default duplex mono 16-bit 22050 Hz
// Then any of:
esp_codec_dev_handle_t spk = bsp_audio_codec_speaker_init(); // ES8311 DAC
esp_codec_dev_handle_t mic = bsp_audio_codec_microphone_init(); // ES7210 ADC
esp_camera_init(&(camera_config_t)BSP_CAMERA_DEFAULT_CONFIG); // GC2145
// bsp_display_start() only if an LCD is fitted
Camera (GC2145)
Driver auto-detects the sensor. BSP provides a filled-in config macro:
camera_config_t cfg = BSP_CAMERA_DEFAULT_CONFIG;
// cfg: pin_xclk=38, pin_pclk=41, pin_vsync=17, pin_href=18, D0-D7 = 45/47/48/46/42/40/39/21
// cfg: RGB565, QVGA (320×240), 2 framebuffers in PSRAM, XCLK 20 MHz, JPEG q=12
esp_camera_init(&cfg);
sensor_t *s = esp_camera_sensor_get();
s->set_framesize(s, FRAMESIZE_UXGA); // 1600×1200 if you want max
s->set_pixformat(s, PIXFORMAT_JPEG); // or RGB565/YUV422
Boot log expectation: 3 E (…) SCCB probe-miss lines for OV2640/OV5640/GC0308 before I (…) gc2145: Detected Camera sensor PID=0x2145. Not errors.
- SCCB shares the main I²C (no separate pins)
- PWDN and RESET are NC — sensor is always powered; no software power-cycle
- XCLK ≥ 16 MHz enables EDMA to PSRAM (faster throughput)
Audio Out (ES8311 → speaker)
esp_codec_dev_handle_t spk = bsp_audio_codec_speaker_init();
esp_codec_dev_sample_info_t fs = {
.sample_rate = 16000, .channel = 1, .bits_per_sample = 16,
};
esp_codec_dev_open(spk, &fs);
esp_codec_dev_set_out_vol(spk, 70); // 0-100
esp_codec_dev_write(spk, wav_samples, len);
esp_codec_dev_close(spk);
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.
- 7d ago First seen · 151 lines · 0 tokens per session scan A e4ea0b2b1002
peripherals is a command published in the GitHub repository chayuto/ws-ESP32-S3-CAM (5 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,861 tokens. 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-31.
Other commands, from other repositories
review-firmware
Run embedded firmware code review (memory safety, ISR, RTOS, C/C++ UB).
power-budget
Calculate power budget for the current embedded project.
bom
Generate or analyze Bill of Materials from KiCad project.
debug
Start GDB debug session with OpenOCD or probe-rs.
flash
Build and flash firmware to target device (ESP-IDF or PlatformIO).
ruview-app
Run a RuView sensing application — presence, vitals, pose, sleep, environment mapping, MAT, point cloud, or a novel RF app.