micropython-stubs copilot-instructions.md

micropython-stubs copilot-instructions.md is an instructions file for GitHub Copilot from Josverl/micropython-stubs. It costs 2,704 tokens per session, scanned A, original, MIT.

A repository guide for MicroPython type-stub files, which describe available code for editors and type checkers without being the code that runs on a device. It explains the repository layout, supported MicroPython versions, hardware ports, boards, and quality tests.

In plain words
What is it for?
Use it when developing or maintaining MicroPython stubs, checking their quality, understanding supported boards, or finding the tools and package outputs.
Why use it?
It helps contributors understand where stub files, generated packages, tools, documentation, and tests belong in an unfamiliar repository.

Instructions file for GitHub Copilot

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 instructions/josverl/micropython-stubs/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/Josverl/micropython-stubs

Made for: GitHub Copilot.

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 micropython-stubs copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/josverl/micropython-stubs/copilot-instructions.svg)](https://agentmods.dev/instructions/josverl/micropython-stubs/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/josverl/micropython-stubs/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/josverl/micropython-stubs/copilot-instructions.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,704 This file is loaded in full into every session.
When invoked 2,704 The same file — it is already loaded in full.
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.02704 $0.02704
Opus 5 $0.01352 $0.01352
Sonnet 5 $0.00541 $0.00541
Haiku 4.5 $0.00270 $0.00270

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

Security

Grade A, and why

micropython-stubs copilot-instructions.md 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 today.

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.

.github/copilot-instructions.md · 270 lines

How it starts

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

MicroPython-Stubs Repository Guide

Project Overview

This repository mostly contains type stubs, not executable code. It hosts 3,000+ stub files (.pyi) for MicroPython across multiple versions (v1.17-v1.27), ports (esp32, rp2, stm32, etc.), and boards. These stubs enable IDE autocomplete, type checking, and documentation for MicroPython development.

Sister Repository: micropython-stubber - CLI tool (stubber) that generates these stubs.

Repository Structure

stubs/                  # Generated stub files (MCU, frozen, doc, merged)
publish/                # Ready-to-install PyPI packages
  micropython-v1_XX_X-{port}-{board}-stubs/
  micropython-stdlib-stubs/
tools/                  # Tooling (board_compare)
scripts/                # Analysis scripts and notebooks
docs/                   # Sphinx documentation source
data/                   # JSON database files (stub-packages.json)
tests/quality_tests/    # Pytest-based stub quality tests

Key Concepts

Stub Types (Half-Products)

  1. MCU stubs: Generated on-device, precise but minimal type info (stubs/micropython-{version}-{port}[-{board}])
  2. Frozen stubs: From manifest files, includes frozen modules (stubs/micropython-{version}-Frozen/{port}/{board})
  3. Doc stubs: Parsed from MicroPython .rst docs, rich typing (stubs/micropython-{version}-docstubs)
  4. Merged stubs: MCU + Doc, precise + rich (stubs/micropython-{version}-{port}-merged)
  5. Core stubs: Manual overrides for problematic modules (stubs/micropython-core)

Naming Convention

micropython-{flat_version}-{port}-{board}-stubs where flat_version uses underscores (e.g., v1_24_1).

Development Workflows

Platform Notes

  • Primary: Windows
  • Secondary: Linux
  • CI/CD :GitHub Actions workflows use Ubuntu

Database

data/all_packages.db

The project uses a SQLite database (package_data.db) to store metadata about packages and project hashes to detect if a package has changed since it was last published.

Read the full file on GitHub · 270 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. today First seen · 270 lines · 2,704 tokens per session scan A a10c6ab37143

Subscribe to this mod's changes

micropython-stubs copilot-instructions.md is an instructions file published in the GitHub repository Josverl/micropython-stubs (317 stars, last pushed today), licensed MIT. It adds 2,704 tokens to every session, about $0.0135 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-09-04.