gpio-baremetal

gpio-baremetal is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 66 tokens per session (894 once invoked), scanned A, original, MIT.

A method for configuring microcontroller pins without a hardware library. It covers input and output pins, alternate functions, pull resistors, pin speed, and edge-triggered interrupts.

In plain words
What is it for?
Use it for bare-metal GPIO setup, pin multiplexing for interfaces such as USART or SPI, button interrupts, and moving GPIO code between chip vendors.
Why use it?
It helps you set up LEDs, buttons, and peripheral connections by writing directly to the microcontroller's control registers.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for bare-metal GPIO setup, pin multiplexing for interfaces such as USART or SPI, button interrupts, and moving GPIO code between chip vendors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/gpio-baremetal
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mohitmishra786/low-level-dev-skills --skill gpio-baremetal
Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills

Made for: Claude Code, Codex.

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 gpio-baremetal

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/gpio-baremetal/github.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/gpio-baremetal)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/gpio-baremetal"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/gpio-baremetal/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gpio-baremetal

Your own site · 80×15
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/gpio-baremetal"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/gpio-baremetal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 894 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00066 $0.00894
Opus 5.5 $0.00026 $0.00358
Sonnet 5.5 $0.00013 $0.00179
Haiku 4.5 $0.00007 $0.00089

Measured 13d ago against content hash 638f6c9f0c1e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gpio-baremetal 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 13d 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.

skills/baremetal/gpio-baremetal/SKILL.md · 97 lines

How it starts

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

GPIO (Bare-Metal)

Purpose

Configure and use GPIO without HAL: input/output modes, alternate function mapping, pull-up/down, speed/slew, and pin-change interrupts for LEDs, buttons, and peripheral pin mux.

Triggers

  • Blink LED or read button before bringing up UART/SPI
  • Mux pins to USART/SPI alternate functions
  • EXTI line interrupts on pin edges
  • Porting GPIO code between vendors

Workflow

1. STM32 GPIO pattern

/* Enable GPIOA clock */
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;

/* PA5 output — MODER[11:10] = 01 */
GPIOA->MODER &= ~(3U << (5 * 2));
GPIOA->MODER |=  (1U << (5 * 2));

/* Toggle via BSRR — atomic set/reset */
GPIOA->BSRR = (1U << 5);       /* set */
GPIOA->BSRR = (1U << (5+16));  /* reset */

Alternate function (e.g., USART2 TX on PA2):

GPIOA->MODER &= ~(3U << (2*2));
GPIOA->MODER |=  (2U << (2*2));           /* AF mode */
GPIOA->AFR[0] &= ~(0xFU << (2*4));
GPIOA->AFR[0] |=  (7U << (2*4));          /* AF7 = USART2 */

2. Input with pull-up

/* PC13 input, pull-up */
GPIOC->MODER &= ~(3U << (13*2));          /* input mode 00 */
GPIOC->PUPDR &= ~(3U << (13*2));
GPIOC->PUPDR |=  (1U << (13*2));          /* pull-up */

int pressed = !(GPIOC->IDR & (1U << 13)); /* active low */

3. EXTI interrupt (STM32)

/* SYSCFG: map EXTI13 to PC13 */
SYSCFG->EXTICR[3] = (SYSCFG->EXTICR[3] & ~0xFU) | 0x2;  /* port C */
EXTI->IMR  |= (1U << 13);
EXTI->FTSR |= (1U << 13);  /* falling edge */
NVIC_EnableIRQ(EXTI15_10_IRQn);

ISR: check EXTI->PR, clear with write-1.

4. nRF52 / ESP32 notes

Platform Pattern
nRF52 NRF_P0->PIN_CNF[n] — direction, pull, drive
ESP32 GPIO.out_w1ts, GPIO.enable; IO_MUX for function

Always enable peripheral clock / power domain before pin config.

5. Agent usage

/gpio-baremetal Configure PA2 as USART2 TX alternate function on STM32F4

Common Problems

Symptom Cause Fix
Pin stuck Wrong MODER / not AF Re-read RM pin table
EXTI storm No debounce / floating input Enable pull; debounce in software
AF mismatch Wrong AFR nibble Pin-specific AF table in RM
No toggle visible Wrong port bit / LED active low Check schematic

Read the full file on GitHub · 97 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. 13d ago Changed · +1 lines 638f6c9f0c1e
  2. 3mo ago First seen · 96 lines · 66 tokens per session scan A bde62171e645

Subscribe to this mod's changes

gpio-baremetal is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (310 stars, last pushed 14d ago), licensed MIT. It adds 66 tokens to every session and 894 once invoked, about $0.0003 per session on Opus 5.5. 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-30.

Related

gpio-baremetal compared with skills from other repositories

gpio-baremetal next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gpio-baremetalmohitmishra786/low-level-dev-skillsSkill31014d agoMITA66Claude Code, Codex
telnyx-iot-curlteam-telnyx/aiSkill232yesterdayMITA45Claude Code
telnyx-networking-curlteam-telnyx/aiSkill232yesterdayMITA35Claude Code
altium-designeralivirgo/Major-AI-SkillsSkill6todayMITA30Claude Code
eartrumpetalivirgo/Major-AI-SkillsSkill6todayMITA32Claude Code
fusion-360alivirgo/Major-AI-SkillsSkill6todayMITA27Claude Code
codesysalivirgo/Major-AI-SkillsSkill6todayMITB27Claude Code