agentleFS
agodianelagodianel/esp32-claude-workbench/.claude/skills/esp32_test_plan/SKILL.md

esp32_test_plan

Skill79 starsChanged 8 months agoMITView on GitHub

Generate a structured test plan for ESP32 firmware changes across all testing layers.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After an implementation contract is accepted.

    line 12
  2. Distinctive:

    When adding test coverage to existing code.

    line 14
  3. Distinctive:

    Test data or configuration.

    line 45
  4. Very specific:

    Use the template at missions/templates/test_plan_template.md:

    line 57
  5. Distinctive:

    Every implementation contract must have a test plan: No exceptions.

    line 101
  6. Very specific:

    Mark hardware tests explicitly: Use @pytest.mark.hardware so CI can skip them.

    line 103

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ESP32 Test Plan

Generate a comprehensive test plan covering all applicable testing layers for a firmware change.

When to Use

  • After an implementation contract is accepted.
  • Before starting implementation.
  • When adding test coverage to existing code.

Steps

1. Classify the Change

Determine which testing layers apply:

LayerApplies WhenTools
Repository logicChange involves Python tooling or templatespytest
Host-side logicChange involves pure C logic (parsers, state machines, encoders)pytest + native compilation
ESP-IDF unit testsChange modifies an isolated componentESP-IDF unity framework
Target integrationChange requires real hardware validationpytest-embedded
Static analysisAlwayscppcheck, compiler warnings

2. Identify Test Cases

For each applicable layer, list specific test cases:

Positive cases: Expected behavior with valid inputs. Negative cases: Behavior with invalid inputs, null pointers, edge values. Boundary cases: Limits of buffers, ranges, timeouts. Concurrency cases: Race conditions, shared state under load. Error cases: Failure paths, recovery behavior.

3. Define Test Infrastructure

Specify what is needed:

  • New test files to create.
  • Fixtures or mocks required.
  • Test data or configuration.
  • Hardware requirements (if any).

4. Set Pass/Fail Criteria

For each test case:

  • Expected result.
  • Acceptable tolerance (for timing or analog tests).
  • Required evidence (log output, assertion pass, measurement).

5. Generate Test Plan Document

Use the template at missions/templates/test_plan_template.md:

# Test Plan: [Feature Name]

## Change Reference
- Contract: [link to implementation contract]
- Mission: [link to mission file]

## Test Layers

### Layer 1: Repository Logic
| Test Case | Input | Expected Output | Status |
|-----------|-------|-----------------|--------|

### Layer 2: Host-Side Logic
| Test Case | Input | Expected Output | Status |
|-----------|-------|-----------------|--------|

### Layer 3: ESP-IDF Unit Tests
| Test Case | Component | Expected Behavior | Status |
|-----------|-----------|-------------------|--------|

### Layer 4: Target Integration
| Test Case | Setup Required | Expected Behavior | Status |
|-----------|---------------|-------------------|--------|

## Infrastructure Requirements
- [ ] [Requirement]

## No-Hardware Tests
[List tests that can run without ESP32 hardware]

## Hardware-Required Tests
[List tests that need real hardware, marked with pytest `@pytest.mark.hardware`]

## Coverage Goals
- Statement coverage target: [X%]
- Branch coverage target: [X%]
- Critical paths that MUST be covered: [list]

Rules

  1. Every implementation contract must have a test plan. No exceptions.
  2. Maximize no-hardware tests. Extract and test pure logic separately.
  3. Mark hardware tests explicitly. Use @pytest.mark.hardware so CI can skip them.
  4. Include negative tests. Happy-path-only testing is insufficient for firmware.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.