tinygo

tinygo is a skill for Claude Code, Codex from gandarez/agent-skills. It costs 56 tokens per session (3,956 once invoked), scanned A, original, MIT.

Guidance for writing, reviewing, and optimizing TinyGo, a version of Go for microcontrollers, WebAssembly, and other small devices.

In plain words
What is it for?
Use it for embedded Go projects, board firmware, hardware drivers, WebAssembly or WASI modules, and reducing program size.
Why use it?
It helps address the memory, hardware, build, and binary-size limits common on small devices.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/gandarez/agent-skills/tinygo
Any agent
npx skills add gandarez/agent-skills --skill tinygo
Clone the repo
git clone --depth 1 https://github.com/gandarez/agent-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 tinygo

README.md
[![agentmods](https://agentmods.dev/badge/skills/gandarez/agent-skills/tinygo.svg)](https://agentmods.dev/skills/gandarez/agent-skills/tinygo)
Your own site
<a href="https://agentmods.dev/skills/gandarez/agent-skills/tinygo"><img src="https://agentmods.dev/badge/skills/gandarez/agent-skills/tinygo.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,956 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00056 $0.03956
Opus 5 $0.00028 $0.01978
Sonnet 5 $0.00011 $0.00791
Haiku 4.5 $0.00006 $0.00396

Measured 4d ago against content hash b56ea11399e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tinygo 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 4d 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/tinygo/SKILL.md · 580 lines

How it starts

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

TinyGo Development

Expert guidance for developing with TinyGo — the Go compiler for microcontrollers, WebAssembly, and other small targets. Covers project setup, peripheral programming, driver integration, WASM builds, and optimization for constrained environments.

When to Use

  • User is writing Go code for microcontrollers or embedded systems
  • User wants to compile Go to WebAssembly using TinyGo
  • User is working with machine package, GPIO, I2C, SPI, UART, ADC, PWM, or DAC
  • User is integrating tinygo.org/x/drivers for sensors, displays, or other hardware
  • User asks about flashing firmware to a board
  • User needs help reducing binary size for constrained devices
  • User references TinyGo, any supported board (Arduino, Raspberry Pi Pico, ESP32, etc.), or embedded Go

Core Principles

  1. Minimize allocations — Heap is scarce on microcontrollers. Prefer stack variables, fixed-size arrays in structs, and avoid string concatenation in loops.
  2. Avoid fmt on constrained targets — Use the builtin println() instead. fmt.Println pulls in reflection and adds significant binary size.
  3. Design drivers against interfaces, not machine — Never import machine in reusable driver code. Accept drivers.I2C, drivers.SPI, etc.
  4. Always debounce physical inputs — Buttons and switches generate electrical noise. Guard interrupt handlers with a minimum interval (typically 100ms).
  5. Use volatile for shared state — Variables shared between interrupt handlers and main code must use runtime/volatile operations.

Project Scaffolding

Step 1 — Initialize the module

mkdir myproject && cd myproject
go mod init myproject

Step 2 — Create main.go

Use the appropriate template based on target type.

Microcontroller (e.g., Arduino, Pico, ESP32)
package main

import (
    "machine"
    "time"
)

func main() {
    led := machine.LED
    led.Configure(machine.PinConfig{Mode: machine.PinOutput})

    for {
        led.High()
        time.Sleep(500 * time.Millisecond)
        led.Low()
        time.Sleep(500 * time.Millisecond)
    }
}

Read the full file on GitHub · 580 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. 4d ago First seen · 580 lines · 56 tokens per session scan A b56ea11399e9

Subscribe to this mod's changes

tinygo is a skill published in the GitHub repository gandarez/agent-skills (2 stars, last pushed 5mo ago), licensed MIT. It adds 56 tokens to every session and 3,956 once invoked, about $0.0003 per session on Opus 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-31.

Related

Other skills, from other repositories

ble-temperature-sensor

Control BLE Temperature Sensor through the generated BLE device CLI.

mvanhorn/cli-printing-press · 16 tokens

agent-probe-dev

Develop, test and ship the Go agent probe (apps/agent) — build/test commands, protocol versioning, the nekoagent service wrapper, and constraints of router environments (OpenWrt/tmpfs). Use for any change under apps/agent.

foru17/neko-master · 55 tokens

analyzing-golang-malware-internals

Analyzes Go-compiled malware by recovering function names from the pclntab, detecting the Go build/version string, and listing embedded package paths to overcome stripped symbols. Activates for requests to analyze Go malware, recover Go function names, or identify a Golang binary build.

meltedinhex/analyst-ai-pack · 65 tokens

ikuai-cli

通过本地 v4.0 HTTP API 管理 iKuai 路由器的 Go CLI 工具。本版本为中文增强版,内置完整 AI Agent 技能文档。.

ikuaios/ikuai-cli · 112 tokens

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware in Ghidra by parsing Go buildinfo and pclntab structures, recovering stripped/obfuscated function names (e.g. via GoResolver), and extracting embedded module/dependency strings and types from Go binaries. Use when analyzing a Go-language malware sample, deobfuscating a…

Youngmaidainon/Agent-Level-Up · 95 tokens

wasm

WebAssembly (WASM) integration, WASI, component model, Rust/Go to WASM compilation. Use when implementing WASM modules, browser/edge compute, or polyglot runtime.

TheBeardedBearSAS/claude-craft · 43 tokens