Skip to main content

sdkconfig-audit

Audit sdkconfig.defaults by inferring needed settings from source code analysis

跳到安装

来源信息

仓库
laurigates/mcu-tinkering-lab
最近来源活动
2026年4月18日 12:21
检测到的 SKILL.md 语言
英语
星标
7
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
sdkconfig-audit
description
Audit sdkconfig.defaults by inferring needed settings from source code analysis
argument-hint
<project-path>
user-invocable
true
allowed-tools
Read, Grep, Glob
## Task Audit `sdkconfig.defaults` for the project at `$1` (relative path under `packages/<domain>/`). ## Process 1. **Read source files** (`main/*.c`, `main/*.h`) to detect feature usage 2. **Map features to required sdkconfig entries** using the table below 3. **Read existing `sdkconfig.defaults`** (if it exists) 4. **Compare and report** missing, unnecessary, or default-reliant settings ## Feature Detection → Config Mapping | Source Pattern | Required Config | Notes | |---------------|----------------|-------| | `#include "esp_wifi.h"` or `esp_wifi_*` calls | `CONFIG_ESP_WIFI_*` basics | WiFi subsystem | | `#include "esp_bt.h"` or BLE/BT usage | `CONFIG_BT_ENABLED=y` | Bluetooth | | `CONFIG_BT_NIMBLE_ENABLED` vs `CONFIG_BT_BLUEDROID_ENABLED` | Depends on stack used | Check for NimBLE vs Bluedroid imports | | `#include "mdns.h"` or `mdns_init()` | `CONFIG_MDNS_ENABLED=y` | mDNS discovery | | `#include "esp_camera.h"` | `CONFIG_CAMERA_*`, PSRAM settings | Camera module | | `#include "esp_tls.h"` or HTTPS client | `CONFIG_ESP_TLS_*` | TLS/HTTPS | | `#include "esp_https_ota.h"` | OTA partition table required | OTA updates | | `xTaskCreate` with large stacks or many tasks | `CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192` | Stack sizing | | WiFi + BLE + USB init in `app_main` | `CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192`+ | Multiple subsystem init | | `#include "tinyusb.h"` or USB device | `CONFIG_TINYUSB_*` | USB device stack | | `esp_deep_sleep_start()` | Deep sleep related configs | Power management | | `led_strip_*` or WS2812 | RMT channel config | LED strip driver | ## Also Check - **Target chip**: `CONFIG_IDF_TARGET` should match justfile `target` variable - **Flash size**: `CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y` (or appropriate size) - **Log level**: `CONFIG_LOG_DEFAULT_LEVEL_INFO=y` (recommended for production) - **Watchdog**: `CONFIG_ESP_TASK_WDT_TIMEOUT_S` if project has long-running operations - **Partition table**: Custom `CONFIG_PARTITION_TABLE_CUSTOM=y` if `partitions.csv` exists ## Output Format ``` ## sdkconfig.defaults Audit: <project-name> ### Missing (should add) | Setting | Reason | Suggested Value | |---------|--------|-----------------| | CONFIG_MDNS_ENABLED | Source uses mdns_init() | y | ### Present (looks good) | Setting | Value | Notes | |---------|-------|-------| | CONFIG_IDF_TARGET | "esp32s3" | Matches justfile target | ### Possibly unnecessary | Setting | Reason | |---------|--------| | CONFIG_BT_ENABLED | No Bluetooth usage found in source | ### Recommendations - <actionable suggestions> ``` ## Style Rules - **Only report actionable findings** — don't list every possible sdkconfig option - **Link to source evidence** — show which file/line triggered the detection - **Don't modify files** — this skill is read-only audit; suggest changes for the user to apply
在 GitHub 查看