Esp32 Arch Reviewのロゴ

Esp32 Arch Review

コミュニティ
agodianel
esp32-arch-review

Reviews ESP32 firmware architecture for FreeRTOS safety, memory and stack sizing, ISR rules, error handling, peripheral and pin safety, networking, storage, logging and build configuration, and returns a PASS / PASS WITH NOTES / FAIL report. Use when the user asks to "review the architecture", "code review this firmware", "is this RTOS-safe", "check for race conditions", "audit task stacks", "memory leak", "heap fragmentation", "stack overflow risk", "/arch-review", or before merging a significant ESP-IDF change or inheriting an existing ESP32 project.

概要

公開者agodianel
リポジトリesp32-claude-workbench
スキル名esp32-arch-review
スター
81
フォーク
7
同梱ファイル
2
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    agodianelがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Esp32 Arch Review」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/agodianel/esp32-claude-workbench/tree/main/skills/esp32-arch-review
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/agodianel/esp32-claude-workbench.git /tmp/esp32-claude-workbench
mkdir -p .claude/skills
cp -r /tmp/esp32-claude-workbench/skills/esp32-arch-review .claude/skills/esp32-arch-review
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでEsp32 Arch Reviewを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にEsp32 Arch Reviewを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Esp32 Arch Reviewは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

ESP32 Architecture Review

Structured, evidence-based review of embedded-specific correctness. Read-only unless the user asks for fixes (fixes then go through an implementation contract).

Tools

If the esp32-workbench MCP server is connected, call its tools; otherwise run the CLI. If esp32wb is not on PATH, use uvx --from git+https://github.com/agodianel/esp32-claude-workbench esp32wb <args>. Add --json for machine-readable output.

NeedMCP toolCLI
All static checks (pins, stacks, sdkconfig, partitions)project_doctoresp32wb doctor . [--target T]
Undersized task stacksstack_checkesp32wb stacks .
GPIO conflicts for the real chippin_auditesp32wb pins .
Risky / debug sdkconfig optionssdkconfig_reviewesp32wb sdkconfig sdkconfig
Partition table sanitypartition_checkesp32wb partitions partitions.csv --sdkconfig sdkconfig
API / peripheral behaviour questionssearch_esp_docsesp32wb docs search "<query>" --target T

Start with esp32wb doctor . and paste its summary into the report; then do the manual checklist below for what static tools cannot see.

Review checklist

Mark each item OK, ISSUE, or N/A, with file:line evidence for every ISSUE.

1. FreeRTOS safety

  • Every task has an explicit stack size. In ESP-IDF the stack argument is in bytes (not words). Guide: ≥2048 simple, ≥4096 with Wi-Fi/BLE/printf-heavy code, ≥8192 for TLS — verify with high-water marks, not guesses.
  • No blocking calls in ISRs; only *FromISR APIs; portYIELD_FROM_ISR used.
  • ISRs that run while flash cache is disabled are IRAM_ATTR and touch only DRAM data.
  • Shared state protected by mutexes (priority inheritance), not by disabling interrupts.
  • Spinlock critical sections (portENTER_CRITICAL) are very short (no logging, no allocation).
  • No busy loops without blocking; taskYIELD() not vTaskDelay(0).
  • Core affinity deliberate and valid for the target's core count (dual-core: classic ESP32, S3, P4; S2 and the C/H series are single-core) — pin only to cores that exist, or use tskNO_AFFINITY.
  • Bounded timeouts on queues/semaphores where a hang would be a bug.
  • Task watchdog: long operations feed it or are restructured.

2. Memory

  • No large stack buffers (> 512 bytes) — heap or static instead.
  • Every allocation checked for NULL; freed on all error paths.
  • DMA buffers from heap_caps_malloc(..., MALLOC_CAP_DMA) (PSRAM is generally not DMA-capable for all peripherals — check the peripheral docs for the target).
  • No allocation in ISRs.
  • Free heap and minimum free heap logged/monitored; fragmentation considered for long-running devices.
  • See the memory review playbook for diagnostics.

3. Error handling

  • Every esp_err_t checked; ESP_ERROR_CHECK() only for fatal init.
  • Runtime errors logged with esp_err_to_name() and handled (retry, degrade, reset state).
  • Network operations retry with exponential backoff.
  • Resources released on failure paths.

4. Peripherals and pins

  • esp32wb pins . has no errors for the configured target.
  • Pin map documented (pin_map.h or header comment) and matches code.
  • I2C/SPI bus recovery and timeouts exist.
  • ADC use respects the chip's ADC2/Wi-Fi behaviour (esp32wb chip <target>).
  • Drivers use the API generation matching the ESP-IDF version (e.g. new I2C master driver vs legacy driver/i2c.h — do not mix both in one bus).

5. Networking

  • Wi-Fi/IP event handlers registered before esp_wifi_start().
  • Reconnect with backoff; disconnect reason logged.
  • TLS server verification enabled (no skip-verify in production).
  • Socket/HTTP timeouts set; DNS failures handled.
  • Wi-Fi + BLE coexistence enabled when both radios are used.

6. Persistent storage

  • NVS namespaces per component; ESP_ERR_NVS_NO_FREE_PAGES / ESP_ERR_NVS_NEW_VERSION_FOUND handled at init.
  • First-boot defaults when keys are missing.
  • Partition table matches flash size and OTA scheme (esp32wb partitions).
  • Filesystem (SPIFFS/LittleFS/FAT) mount errors handled.

7. Logging

  • Correct levels; verbose output at D/V.
  • No secrets in logs.
  • Tags match component names; boot sequence traceable.

8. Build configuration

  • CONFIG_IDF_TARGET matches the hardware.
  • sdkconfig.defaults captures every non-default setting (not only a committed sdkconfig).
  • Component REQUIRES/PRIV_REQUIRES complete and minimal.
  • esp32wb sdkconfig shows no debug-only options in release configs.

Report

markdown
# Architecture Review — <project> (target: <chip>, ESP-IDF <ver>)
## Verdict: PASS | PASS WITH NOTES | FAIL
## Tool output
(esp32wb doctor summary)
## Critical issues (must fix before merge)
- [file:line] issue — why it matters — suggested fix
## Warnings
## Recommendations
## Checklist results
## Not reviewed / unknowns

FAIL if any critical issue exists (ISR misuse, unchecked allocation in a hot path, flash/PSRAM pin use, missing TLS verification, stack overflow evidence).

Rules

  • Evidence for every finding; no generic advice without a location.
  • Do not state chip limits from memory — cite esp32wb chip or Espressif docs.
  • Recommendations that change code require an implementation contract first.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Esp32 Arch Review」では何ができますか?

Reviews ESP32 firmware architecture for FreeRTOS safety, memory and stack sizing, ISR rules, error handling, peripheral and pin safety, networking, storage, logging and build configuration, and returns a PASS / PASS WITH NOTES / FAIL report. Use when the user asks to "review the architecture", "code review this firmware", "is this RTOS-safe", "check for race conditions", "audit task stacks", "memory leak", "heap fragmentation", "stack overflow risk", "/arch-review", or before merging a significant ESP-IDF change or inheriting an existing ESP32 project.

TypingMindでEsp32 Arch Reviewを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Esp32 Arch Reviewはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにEsp32 Arch Reviewをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/agodianel/esp32-claude-workbench/tree/main/skills/esp32-arch-reviewを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Esp32 Arch Reviewを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Esp32 Arch Reviewで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもEsp32 Arch Reviewを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Esp32 Arch Review」は無料ですか?

はい。agodianelがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇