ws-ESP32-S3-CAM: Command for Claude Code

.claude/commands/build.md

build is a command for Claude Code from chayuto/ws-ESP32-S3-CAM. It costs 0 tokens per session (753 once invoked), scanned A, original, MIT.

A command for building ESP32-S3-CAM projects with Espressif's ESP-IDF development framework, using a separate build folder outside the project.

In plain words
What is it for?
Use it to activate ESP-IDF and compile a project or vendor example whose top-level folder contains a CMakeLists.txt file.
Why use it?
It provides a repeatable build process and documents fixes for common dependency and flash-size errors.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is chayuto/ws-ESP32-S3-CAM's own configuration. It tells Claude Code how to work on ws-ESP32-S3-CAM 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 ws-ESP32-S3-CAM configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/chayuto/ws-ESP32-S3-CAM/main/.claude/commands/build.md
Clone the repo
git clone --depth 1 https://github.com/chayuto/ws-ESP32-S3-CAM

Made for: Claude Code.

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 build

README.md
[![agentmods](https://agentmods.dev/badge/commands/chayuto/ws-esp32-s3-cam/build.svg)](https://agentmods.dev/commands/chayuto/ws-esp32-s3-cam/build)
Your own site
<a href="https://agentmods.dev/commands/chayuto/ws-esp32-s3-cam/build"><img src="https://agentmods.dev/badge/commands/chayuto/ws-esp32-s3-cam/build.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 753 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00753
Opus 5 $0.00000 $0.00377
Sonnet 5 $0.00000 $0.00151
Haiku 4.5 $0.00000 $0.00075

Measured 8d ago against content hash 28e0153469c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

build 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 8d 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.

.claude/commands/build.md · 55 lines

How it starts

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

Build an ESP-IDF project for ESP32-S3-CAM

Activate ESP-IDF v5.5.3+ and build out-of-tree. Usage: /build <project_path>

<project_path> is anything with a top-level CMakeLists.txt — a projects/<name>/ folder you wrote, or a vendor example under ref/demo/ESP32-S3-CAM-OVxxxx/examples/ESP-IDF-v5.5.1/<n>/.

Steps

  1. Activate IDF:

    . ~/esp/esp-idf/export.sh 2>/dev/null
    
  2. Pick a build directory outside the project so vendor clones stay clean:

    BUILD=/tmp/ws-esp32s3-build/$(basename <project_path>)
    mkdir -p "$BUILD"
    
  3. Run the build:

    idf.py -C <project_path> -B "$BUILD" build 2>&1 | tail -25
    

Known Failure Recovery

Symptom Cause Fix
The "path" field in the manifest file "/System/Volumes/Data/home/wxggc/esp/v551/esp-idf/..." Vendor dependencies.lock has Waveshare's build-machine IDF_PATH baked in rm <project>/dependencies.lock and rebuild
Partitions tables occupies 5.1MB of flash which does not fit in configured flash size 2MB sdkconfig was deleted; regenerated from minimal sdkconfig.defaults lost 16MB flash setting cd <vendor example> && git checkout sdkconfig to restore hand-tuned config
IDF_TARGET not set or IRAM overflow Wrong target idf.py -C <path> set-target esp32s3 (NOT esp32c6 — that's sibling repos)
ESP_VIDEO or camera component missing main/idf_component.yml missing deps Ensure it lists espressif/esp_video and waveshare/custom_io_expander_ch32v003
app partition is too small Custom partition not activated sdkconfig.defaults needs CONFIG_PARTITION_TABLE_CUSTOM=y, CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv", CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
managed_components/ dir polluting vendor clone idf.py downloads deps into project dir Inevitable but gitignored in our .gitignore

Patching Wi-Fi Credentials

Vendor examples use example_connect (protocol_examples_common). Keys are CONFIG_EXAMPLE_WIFI_SSID / CONFIG_EXAMPLE_WIFI_PASSWORD.

Read the full file on GitHub · 55 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. 8d ago First seen · 55 lines · 0 tokens per session scan A 28e0153469c6

Subscribe to this mod's changes

build 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 753 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.