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

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

Good fit Use it for embedded Go projects, board firmware, hardware drivers, WebAssembly or WASI modules, and reducing program size.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gandarez/agent-skills/tinygo
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 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/github.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/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 tinygo

Your own site · 80×15
<a href="https://agentmods.dev/skills/gandarez/agent-skills/tinygo"><img src="https://agentmods.dev/badge/skills/gandarez/agent-skills/tinygo.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.00056 $0.03956
Opus 5.5 $0.00022 $0.01582
Sonnet 5.5 $0.00011 $0.00791
Haiku 4.5 $0.00006 $0.00396

Measured 2mo ago against content hash b56ea11399e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 7mo ago), licensed MIT. It adds 56 tokens to every session and 3,956 once invoked, about $0.0002 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-31.

Related

tinygo compared with skills from other repositories

tinygo next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tinygogandarez/agent-skillsSkill27mo agoMITA56Claude Code, Codex
wasmTheBeardedBearSAS/claude-craftSkill1073d agoMITA43Claude Code
analyzing-golang-malware-internalsmeltedinhex/analyst-ai-packSkill244mo agoApache-2.0A65Claude Code, Codex
ikuai-cliikuaios/ikuai-cliSkill154mo agoMITC112Claude Code, Codex
viam-go-platformviam-devrel/agent-skillsSkill23mo agononeA216Claude Code
viam-go-motion-visionviam-devrel/agent-skillsSkill23mo agononeA204Claude Code
analyzing-golang-malware-with-ghidraYoungmaidainon/Agent-Level-UpSkill42mo agoMITA95Claude Code, Codex