Skip to content
Skills Library
Programming · Building & coding

ato-language

/ato-language

Use when writing, reading, or reviewing .ato files. Triggers on "what interface for X", "how to connect Y", choosing between interface types, parameter constraints, tolerance syntax, or atopile design patterns.

Licence
MIT
Last repository change
24.06.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 24.06.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when writing, reading, or reviewing .ato files. Triggers on "what interface for X", "how to connect Y", choosing between interface types, parameter constraints, tolerance syntax, or atopile design patterns.

Triggers from the description

what interface for Xhow to connect Y
Original author description

Use when writing, reading, or reviewing .ato files. Triggers on "what interface for X", "how to connect Y", choosing between interface types, parameter constraints, tolerance syntax, or atopile design patterns.

How it works

  1. How to Find Information
  2. Choosing the Right Interface
  3. CLI Workflow
  4. Key Gotchas
  5. Datasheet-Driven Design
  6. Documentation
  7. Design Patterns
Original SKILL.md headings · 65 lines, 826 words
SKILL.md preview
---
name: ato-language
description: Use when writing, reading, or reviewing .ato files. Triggers on "what interface for X", "how to connect Y", choosing between interface types, parameter constraints, tolerance syntax, or atopile design patterns.
---

# Atopile Language

## How to Find Information
- **Hover** (`mcp__atopile-lsp__get_hover`): pass file path + line + character to get full member lists, usage examples, and docs for any symbol. Always hover on an import or type before writing code that uses it.
- **Definition** (`mcp__atopile-lsp__get_definition`): jump to where a module/interface is defined -- use to read library source.
- **References** (`mcp__atopile-lsp__get_references`): find all usages of a symbol across the project.
- **Diagnostics** (`mcp__atopile-lsp__get_diagnostics`): parse errors and type mismatches for a file.
- **CLI**: run `ato <command> --help` for full flags. Use `ato --help` for the command list.
- **Packages**: use `find_packages` / `inspect_package` MCP tools or the ato registry at packages.atopile.io.

See the `lsp` skill for full LSP-over-MCP usage.

## Choosing the Right Interface
| Need | Use | Not |
|---|---|---|
| Power rail (VCC/GND pair) | `ElectricPower` | `Electrical` |
| Digital logic (GPIO, CS, EN, INT) | `ElectricLogic` | `Electrical` |
| Raw copper (single net) | `Electrical` | -- |
| I2C bus | `I2C` | two `ElectricLogic` |
| SPI bus | `SPI` | individual `ElectricLogic` |
| Analog signal (continuous, not binary) | `ElectricSignal` | `ElectricLogic` |

**Key judgment calls:**
- `ElectricLogic` has a `.reference` (power rail) that MUST be connected -- this sets the logic level. Forgetting it causes silent build failures.
- `Capacitor` has a `.power` member (ElectricPower) for direct power rail connection, AND `.unnamed[0]`/`.unnamed[1]` for pin-level wiring. Use `.power` when decoupling a rail; use `.unnamed[]` when wiring between arbitrary nets (e.g. bootstrap cap between BTST and SW).
- `Resistor` only has `.unnamed[0]`/`.unnamed[1]` -- no named pins.

## CLI Workflow
1. `ato build` -- solver: picks parts, evaluates assertions, generates BOM, updates layout
2. `ato build --open` -- launches KiCad after build
3. `ato create part` -- generate component .ato from JLCPCB
4. `ato dependencies add` / `ato dependencies remove` -- manage package deps

Run `ato <command> --help` for full flags. See the `build-and-test` skill for the full build/debug workflow.

## Key Gotchas
- **Tolerances REQUIRED**: `10kohm` finds zero parts (0% tolerance). Always use `10kohm +/- 5%` or a range like `1kohm to 1.1kohm`.
- **ElectricLogic.reference**: MUST connect to the correct power rail. Open-drain outputs (nCE, nINT, I2C) need pull-ups to `.reference.hv`.
- **Passive pin names**: `Resistor` and `Inductor` use `unnamed[0]`/`unnamed[1]`, not named pins. `Capacitor` also has `.power` as an ElectricPower shortcut.
- **`package = "0402"`**: constrains footprint only, not voltage or power rating. Always add `assert X.max_voltage >= ...` separately.
- **Assertion syntax**: `within` for bilateral ranges, `is` for exact match, `>=`/`<=` for bounds. Use `assert X within 10V +/- 5%` not `assert X is 10V`.
- **Bridge syntax** (`~>`): requires `#pragma experiment("BRIDGE_CONNECT")`. The module must have the `can_bridge` trait (Resistor, Capacitor, Inductor have it).
- **For loops**: require `#pragma experiment("FOR_LOOP")`.
- **Leading underscore = private**: prefix internal submodules and components with `_` (e.g. `_nt_acp`, `_cregn`). External code accessing `_`-prefixed members is a code smell — the module's public interface should be sufficient.
- **Avoid EOL / NRND parts**: when selecting ICs, check the manufacturer's product page for lifecycle status. Do not use parts marked "End of Life", "Not Recommended for New Designs", or "Last Time Buy". These will become unavailable mid-project. Always pick the current recommended part in the family.

## Datasheet-Driven Design
- **Download datasheets FIRST** — before writing any code. Use `curl` to grab the PDF from the manufacturer's website (ti.com, analog.com, st.com, microchip.com — prefer manufacturer over distributors) and save to a local `datasheets/` directory (e.g. `<manufacturer>_<part>_datasheet.pdf`). Also grab the application note if one exists (`_appnote.pdf`).
- **All agents read the local copy** — never search the internet for datasheets during design or review. The local copy is the single source of truth.
- **Encode every datasheet formula as an `assert`** — this makes designs reconfigurable (change one parameter, solver checks everything downstream) and self-documenting (the assertion IS the design rationale).
- **Use the datasheet's own constants** in assertions (e.g. `48kV` for a K-factor) so formulas are recognizable alongside the datasheet.

## Documentation
Every module must have clear documentation written while the design context is fresh:
- **Module-level docstring** — what it does, design-point parameters, how to re-rate. Written as a triple-quoted string at the top of the module.
- **Usage example** — show how to instantiate, connect interfaces, and constrain. This is the first thing a consumer reads — it must be complete and correct.
- **Section comments** — group related circuitry with `# --- Section Name ---` headers.
- **Assertion comments** — every non-obvious `assert` should explain what it checks and where the threshold comes from (datasheet section, calculation, etc.).

Documentation quality is a review gate — if a future agent can't use the module from its docs alone, the docs aren't good enough.

## Design Patterns
See `design-patterns.md` for idiomatic patterns extracted from production driver code — decoupling, for-loops, voltage dividers, pull-ups, Kelvin sense taps, component locking, datasheet formula encoding, submodule decomposition, config pins, reset handling, and I2C addressing.
Files in this package (2)
  • SKILL.md 6 KB
  • design-patterns.md 19 KB

Versions

The database has no other skills named ato-language.

Database snapshot: 13.11.2026 · package version 55d3f8244090 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100lsp
    Use when working with .ato files and you need semantic code intelligence — hover info, diagnostics, go-to-definition, find-references, or symbol inspection. Triggers on questions like "what type is this", "what members does X have", "where is X defined", "what uses Y", checking…
  • 100build-and-test
    Use when building, validating, or debugging atopile projects. Triggers on build errors, "ato build", solver failures, "no parts found", package management, creating parts from JLCPCB, or debugging connectivity issues.
  • 100research
    Use when full-runtime TaxMate Australia ATO refresh or source-backed treatment review is needed.
  • 100ast-grep
    ast-grep rule writing and usage best practices. This skill should be used when writing, reviewing, or debugging ast-grep rules for code search, linting, and transformation. Triggers on tasks involving YAML rules, pattern syntax, meta variables, constraints, or code rewriting.
  • 90neo-csharp
    Use this skill when writing, reviewing, debugging, or modernizing C# code in .NET projects. Trigger for .cs/.csproj files, C# language-version questions, nullable reference types, records, pattern matching, async/cancellation, or version-appropriate syntax from C# 10+.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.