Provides low-level firmware guidance for AVR MCUs, focusing on memory constraints, interrupts, and peripheral setup.

Install

mkdir -p .claude/skills/avr && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19342" && unzip -o skill.zip -d .claude/skills/avr && rm skill.zip

Installs to .claude/skills/avr

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

AVR firmware — MCU identification, ISR safety, peripheral configuration, memory constraints, and debugging.
107 charsno explicit “when” trigger
Advanced

Key capabilities

  • Identify MCU model and toolchain requirements
  • Configure timer prescalers and peripheral registers
  • Implement ISR safety using atomic blocks
  • Manage memory usage with PROGMEM
  • Plan debugging using serial logs or simulators

How it works

It provides a reference for low-level constraints and a workflow for configuring Atmel AVR hardware, including memory management and interrupt safety.

Inputs & outputs

You give it
MCU model and peripheral requirements
You get back
Firmware architecture and ISR safety checklist

When to use avr

  • Configure MCU timers and interrupts
  • Optimize firmware for memory constraints
  • Debug UART/SPI peripheral settings
  • Manage ISR atomic blocks

About this skill

AVR (Atmel) Firmware (Elite)

When to use

  • You write/debug AVR firmware (Arduino-class MCUs).

  • You need low-level constraints: timers, interrupts, IO, memory.

Memory Constraints Reference

ResourceConstraint
FlashRead-only at runtime; constants in PROGMEM
SRAMStack + heap share; fragmentation risk
EEPROMLimited writes (~100k cycles); use eeprom_update_*
Registers32 general-purpose (r0–r31); r26–r31 as X/Y/Z pointers

Workflow

1. Identify target

  • MCU model (ATmega328P, ATtiny85, etc.), clock frequency, toolchain (avr-gcc/avrdude).

  • Fuse bits and programmer type.

2. Interrupt strategy

  • Keep ISRs minimal: set flag/update variable, return.

  • Protect shared data with ATOMIC_BLOCK(ATOMIC_RESTORESTATE).

  • Never block or call malloc/free inside ISRs.

3. Timing and peripherals

  • Calculate timer prescaler for target frequency: $f_{timer} = \frac{f_{cpu}}{prescaler}$.

  • Configure UART/SPI/I2C via register settings; validate baud rate error < 2%.

4. Memory discipline

  • Use PROGMEM and pgm_read_* for large read-only data.

  • Track stack depth; add stack canary in debug builds.

  • Avoid dynamic allocation (malloc/free) in constrained firmware.

5. Debug and verify

  • Serial logs (UART printf), AVR simulator (simavr), JTAG if available.

  • Minimal test harness with known inputs and observable outputs.

Self-check

  • ISRs are minimal (set flag only, no blocking calls).

  • Shared data between ISR and main loop protected with ATOMIC_BLOCK.

  • Stack depth estimated and verified (no overflow risk).

  • Large constants moved to PROGMEM.

  • Timer/baud calculations validated against actual clock frequency.

Outputs

  • Firmware architecture checklist.

  • ISR safety checklist.

  • Debugging and verification plan.

Prerequisites

avr-gcc

Limitations

  • ISRs must be minimal
  • Avoid malloc and free in ISRs

How it compares

It focuses on hardware-specific constraints like register settings and memory limits rather than general software development practices.

Compared to similar skills

avr side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
avr (this skill)02moNo flagsAdvanced
python-error-handling12moNo flagsIntermediate
debugging-streamlit74moReviewIntermediate
effect-patterns-error-handling16moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

python-error-handling

wshobson

Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.

145

debugging-streamlit

streamlit

Debug Streamlit frontend and backend changes using make debug with hot-reload. Use when testing code changes, investigating bugs, checking UI behavior, or needing screenshots of the running app.

733

effect-patterns-error-handling

PaulJPhilp

Effect-TS patterns for Error Handling. Use when working with error handling in Effect-TS applications.

12

effect-patterns-scheduling

PaulJPhilp

Effect-TS patterns for Scheduling. Use when working with scheduling in Effect-TS applications.

12

guidewire-local-dev-loop

jeremylongshore

Configure local Guidewire development workflow with Guidewire Studio, Gosu debugging, and hot reload capabilities. Use when setting up development environment, configuring IDE, or optimizing dev workflow. Trigger with phrases like "guidewire local dev", "guidewire studio setup", "gosu development", "guidewire debugging", "configure guidewire ide".

02

nextjs-server-side-error-debugging

blader

Debug getServerSideProps and getStaticProps errors in Next.js. Use when: (1) Page shows generic error but browser console is empty, (2) API routes return 500 with no details, (3) Server-side code fails silently, (4) Error only occurs on refresh not client navigation. Check terminal/server logs instead of browser for actual error messages.

11

Search skills

Search the agent skills registry