AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Layout Relinking

skill-mawildoer-atopile-agent-skill-layout-relinking · by mawildoer

Use when renaming or refactoring components in .ato files that have existing PCB layout placements. Triggers on "layout broken", "components at origin", "lost placement after rename", "relink layout", or any .ato refactor that changes component names or module structure.

No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add skill-mawildoer-atopile-agent-skill-layout-relinking

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-mawildoer-atopile-agent-skill-layout-relinking)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Layout Relinking? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Layout Relinking

When you rename a component in .ato code, its atopile_address in the .kicad_pcb becomes stale. On the next build, atopile can no longer match the placed footprint to the renamed component, so the component loses its placement (moved to origin, unrouted).

> Critical: relink BEFORE building. If you build with stale addresses, atopile orphans the old placements and creates new unplaced footprints. Relinking after that means recovering from backups.

The Underlying Concept

Each footprint in the .kicad_pcb carries an atopile_address property — the dot-path of instance names from the build entry point down to that component. If Board has charger = new BQ25756Charger and BQ25756Charger has _richg = new Resistor, the address is charger._richg. Renaming any instance in that chain changes the address; relinking rewrites the stored address to match the new path so the placement is preserved.

Helper Scripts

This workflow relies on two small scripts that operate on the .kicad_pcb. Many projects vendor them under tools/; if yours doesn't, they're trivial to write (parse the s-expression / KiCad file, read or rewrite the atopile_address property on each footprint):

  • list-addresses — print every atopile_address in a .kicad_pcb (optionally with the footprint each maps to).
  • rename-address — rewrite one address prefix to another. Should be prefix-aware: renaming a parent catches all children automatically.

The commands below assume tools/layout-list-addresses.py and tools/layout-rename-address.py. Substitute your project's equivalents.

Workflow

  1. Make your .ato changes (renames, submodule extraction, etc.) — do NOT build yet.
  1. Examine what changed:

``bash git diff -- "*.ato" ``

  1. List current PCB addresses:

``bash python tools/layout-list-addresses.py ``

  1. Figure out the mapping. Construct new paths from the module hierarchy in the .ato source. The address path is the chain of instance names from the build entry point down.

Note: the LSP tools (get_hover, get_definition, get_references) do NOT provide atopile_address paths. Use git diff and the .ato source to determine mappings.

  1. Relink each renamed component:

``bash python tools/layout-rename-address.py "old.path" "new.path" `` A prefix-aware tool renames all children of a renamed parent in one call.

  1. Now run ato build — addresses match, placements preserved.
  1. Verify:

``bash python tools/layout-list-addresses.py ``

Examples

Extracting a submodule — moving charger.richg into charger._sense._shunt:

python tools/layout-rename-address.py  "charger.richg" "charger._sense._shunt"

Renaming a parent module (catches all children):

python tools/layout-rename-address.py  "charger.acov_div" "charger._acov_divider"
# Renames charger.acov_div.chain.resistors[0], [1], etc. automatically

Tips

  • Back up the .kicad_pcb (or rely on a tool that writes a .bak on first modification) before bulk renames — restore with cp file.bak file.
  • A "no matches" result means the old path is wrong — check for typos against the address listing.
  • List addresses with the mapped footprint to confirm which physical part each address points to.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.