how_to_build_packages

how_to_build_packages is a cursor rule for Cursor from atopile/packages. It costs 3,908 tokens per session, scanned A, original, MIT.

A package is a special atopile project that is intended to be shared and reused in other designs. A package is denoted by a package section in the ato.yaml file. A package aims to design a basic implementation of a given integrated circuit component. The requirement is for this package to include all the necessary…

Cursor rule for Cursor

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 rules/atopile/packages/how_to_build_packages
Clone the repo
git clone --depth 1 https://github.com/atopile/packages

Made for: Cursor.

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 how_to_build_packages

README.md
[![agentmods](https://agentmods.dev/badge/rules/atopile/packages/how_to_build_packages.svg)](https://agentmods.dev/rules/atopile/packages/how_to_build_packages)
Your own site
<a href="https://agentmods.dev/rules/atopile/packages/how_to_build_packages"><img src="https://agentmods.dev/badge/rules/atopile/packages/how_to_build_packages.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,908 This file is loaded in full into every session.
When invoked 3,908 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.03908 $0.03908
Opus 5 $0.01954 $0.01954
Sonnet 5 $0.00782 $0.00782
Haiku 4.5 $0.00391 $0.00391

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

Security

Grade A, and why

how_to_build_packages 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 2d 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.

.cursor/rules/how_to_build_packages.mdc · 342 lines

How it starts

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

0 Context

A package is a special atopile project that is intended to be shared and reused in other designs. A package is denoted by a package section in the ato.yaml file. A package aims to design a basic implementation of a given integrated circuit component. The requirement is for this package to include all the necessary components to get the core device working, such as decoupling capacitors, pullup/pulldown resistors, and more. Most importantly, since this package will be reused in a different design, it is critical to correctly create, expose, and connect all the external interfaces properly. External interfaces should be created using the proper object type (ElectricPower/ElectricLogic/etc.) and clearly defined with docstrings. Some examples of critical interfaces to expose for users include but are not limited to:

  • ElectricPower for the power rails - add electricpower.required = true for required power rails
  • SPI/I2C/I2S/etc. - communication interfaces should be defined and connected to the pins of the physical package
  • EnablePins - enable_pin.line.required = true so users don't ignore or forget to connect the enable line somewhere

The purpose of the usage build is to show users how to use the package. This means this example should show the preferred method of use, and is most helpful if it shows the user how to use many of the interfaces.

1 Building a new package

1.1 File Structure

packages/
  packages/
    <package_name>/
        layouts/
        parts/
        ato.yaml
        <package_name>.ato
        README.md
        usage.ato

1.2 Steps to create a new package

  1. Create a new directory <package_name> as stated in the file structure.
  2. Create ato.yaml, <package_name>.ato, README.md, usage.ato
  3. Look through other packages for inspiration
  4. Create part using tool call 'search_and_install_jlcpcb_part' 4.1 Inspect the part ato file in the parts/ directory
  5. Import the part into the main ato file
  6. Read the datasheet for the device
  7. Populate the files with the correct information (see below) 7.1 Create interfaces and connect them 7.2 Add decoupling caps where needed 7.3 Add i2c addressor if device has configurable address If format is: use addressor module:

Read the full file on GitHub · 342 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. 2d ago First seen · 342 lines · 3,908 tokens per session scan A e9f97b817eba

Subscribe to this mod's changes

how_to_build_packages is a cursor rule published in the GitHub repository atopile/packages (18 stars, last pushed 4mo ago), licensed MIT. It adds 3,908 tokens to every session, about $0.0195 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-01.