Agent skill

Sexp

by atopile in atopile/atopile

How the Zig S-expression engine and typed KiCad models work, how they are exposed to Python (pyzigsexp), and the invariants around parsing, formatting, and freeing.

MITAuto-check passed

Install Sexp

skills CLI
$ npx skills add atopile/atopile --skill sexp -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install atopile/atopile sexp --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/atopile/atopile.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/sexp .claude/skills/sexp && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sexp
GitHub stars
4k
Token cost
~1k tokens
SKILL.md length
329 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

How the Zig S-expression engine and typed KiCad models work, how they are exposed to Python (pyzigsexp), and the invariants around parsing, formatting, and freeing.

  • Works in 3 steps: Modify Zig → Rebuild → If you changed the API
  • Working with KiCad file parsing
  • SKILL.md covers Quick Start, Relevant Files, Dependants (Call Sites) and How to Work With / Develop /…, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Sexp is an agent skill from atopile/atopile. How the Zig S-expression engine and typed KiCad models work, how they are exposed to Python (pyzigsexp), and the invariants around parsing, formatting, and freeing. Use when working with KiCad file parsing, S-expression generation, or layout sync.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Python. The repository describes itself as: Design circuit boards with code! ✨ Get software-like design reuse 🚀, validation, version control and collaboration in hardware; starting with electronics ⚡️. The licence is MIT.

When your agent uses it

  • Working with KiCad file parsing
  • S-expression generation

Example prompts

  • “/sexp”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Modify Zig
  2. Rebuild
  3. If you changed the API

What it can do on your machine

Read from SKILL.md and the folder at commit 619eda7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sexp loads about 1k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 329 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from atopile/atopile at commit 619eda7, republished under its MIT licence (© atopile). 329 words, ~1,017 tokens.

Download SKILL.mdSave it as .claude/skills/sexp/SKILL.md (or your agent's skills folder).
name
sexp
description
How the Zig S-expression engine and typed KiCad models work, how they are exposed to Python (pyzig_sexp), and the invariants around parsing, formatting, and freeing. Use when working with KiCad file parsing, S-expression generation, or layout sync.

Sexp Module

The sexp subsystem provides:

  • a fast S-expression tokenizer/parser/pretty-printer in Zig, and
  • typed Zig models for KiCad formats (PCB, footprint, netlist, symbol, schematic, fp_lib_table), exposed to Python via the pyzig_sexp extension module.

Source-of-truth docs and code:

  • src/faebryk/core/zig/README.md (high-level overview)
  • src/faebryk/core/zig/src/sexp/* (tokenizer/AST/structure)
  • src/faebryk/core/zig/src/python/sexp/sexp_py.zig (Python API + critical memory rules)

Quick Start

python
from pathlib import Path
from faebryk.libs.kicad.fileformats import kicad

pcb = kicad.loads(kicad.pcb.PcbFile, Path("board.kicad_pcb"))
_text = kicad.dumps(pcb)

Relevant Files

  • Zig core:
    • src/faebryk/core/zig/src/sexp/tokenizer.zig (tokenization + line/column tracking)
    • src/faebryk/core/zig/src/sexp/ast.zig (SExp tree + KiCad pretty formatting)
    • src/faebryk/core/zig/src/sexp/structure.zig (decode/encode + error context)
    • src/faebryk/core/zig/src/sexp/kicad/* (typed KiCad models)
  • Python extension entrypoint:
    • src/faebryk/core/zig/src/python/sexp/init.zig (exports PyInit_pyzig_sexp)
    • src/faebryk/core/zig/src/python/sexp/sexp_py.zig (module + type binding generation)
  • Generated Python stubs (what users “see”):
    • src/faebryk/core/zig/gen/sexp/*.pyi
  • Convenience wrapper used throughout the codebase:
    • src/faebryk/libs/kicad/fileformats.py (namespaces modules + caching + loads/dumps)

Dependants (Call Sites)

  • src/faebryk/libs/kicad/fileformats.py (primary integration layer)
  • KiCad exporters and layout sync:
    • src/faebryk/exporters/pcb/kicad/*
    • src/faebryk/exporters/pcb/layout/layout_sync.py
  • KiCad plugin workflow: src/atopile/kicad_plugin/*

How to Work With / Develop / Test

Core Concepts
  • Two-level model:
    • raw SExp parsing/formatting (tokenizer.zig, ast.zig)
    • typed KiCad decoding/encoding (structure.zig + sexp/kicad/*.zig)
  • Python API shape: the extension exposes per-format modules (e.g. pcb, netlist) with:
    • module-level loads(data: str) -> File
    • module-level dumps(file: File) -> str
    • File.free(...) for releasing Zig-owned allocations
  • Convenience wrapper: faebryk.libs.kicad.fileformats.kicad wraps these modules and provides kicad.loads(...)/kicad.dumps(...).
Development Workflow
  1. Modify Zig:
    • parsing/formatting: src/faebryk/core/zig/src/sexp/*
    • Python exposure: src/faebryk/core/zig/src/python/sexp/sexp_py.zig
  2. Rebuild:
    • ato dev compile (imports faebryk.core.zig)
  3. If you changed the API:
    • verify stubs under src/faebryk/core/zig/gen/sexp/*.pyi update accordingly
    • adjust src/faebryk/libs/kicad/fileformats.py if needed
Testing
  • Best practical test is round-trip:
    • load a known .kicad_pcb / .kicad_sch, dump it, and ensure KiCad accepts it (formatting-sensitive).
  • Zig unit tests (where present):
    • zig test src/faebryk/core/zig/src/sexp/ast.zig
    • zig test src/faebryk/core/zig/src/sexp/structure.zig

Best Practices

  • Prefer faebryk.libs.kicad.fileformats.kicad unless you explicitly need the raw module API.
  • Be mindful of shared-object caching in kicad.loads(...): path-based loads are cached and returned by reference (mutations are shared).

Memory & Lifetime Invariants (critical)

The Python bindings duplicate the input S-expression string into a persistent allocator because parsed structs contain pointers into the input buffer.

Implications:

  • Repeated loads(...) of large files can grow memory if you never call free(...) on the returned *File.
  • The convenience wrapper currently caches loaded objects by path; do not free(...) cached objects unless you also invalidate the cache.

© atopile, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/sexp of atopile/atopile.

Open the folder on GitHubat commit 619eda7

Compare with similar skills

Sexp next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sexp compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sexp this skillatopile/atopile4k—~1kAutomated safety check: PassMIT
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
PDF Processinganthropics/skills180k47 repos~2kAutomated safety check: PassProprietary
NotebookLM Research AssistantPleasePrompto/notebooklm-skill7.8k14 repos~2.4kAutomated safety check: NotesMIT
Manim Video Productionbrowser-use/video-use29k6 repos~3kAutomated safety check: PassMIT
PPT Masterhugohe3/ppt-master59k1 repos~2.5kAutomated safety check: PassMIT

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • PDF Processing

    anthropics/skills

    Official

    Handles everyday PDF jobs in Python and on the command line: extract text and tables, merge, split, rotate, watermark, fill forms, encrypt and OCR.

    180k GitHub starsUsed in 47 repos~2k tokens
    Documents & OfficeAuto-check passed
  • NotebookLM Research Assistant

    PleasePrompto/notebooklm-skill

    Lets Claude Code ask questions of your Google NotebookLM notebooks through browser automation and return answers grounded in your uploaded sources.

    7.8k GitHub starsUsed in 14 repos~2.4k tokens
    Knowledge ManagementAuto-check: notes
  • Manim Video Production

    browser-use/video-use

    Produces math and technical explainer videos with Manim Community Edition: concept animations, equation derivations, algorithm walkthroughs and data stories.

    29k GitHub starsUsed in 6 repos~3k tokens
    Media & CreativeAuto-check passed
  • PPT Master

    hugohe3/ppt-master

    Generates editable PowerPoint decks, rebuilds slides from images, fills .pptx templates and polishes existing presentations through routed workflows.

    59k GitHub starsUsed in 1 repo~2.5k tokens
    Documents & OfficeAuto-check passed
  • Scikit Learn

    zLanqing/codex-claude-academic-skills

    Machine learning in Python with scikit-learn. An agent skill from zLanqing/codex-claude-academic-skills.

    4.7k GitHub starsUsed in 16 repos~3.9k tokens
    Data & AnalyticsAuto-check passed

More from atopile/atopile

All 19 skills in this repo
  • Ato Language

    atopile/atopile

    Reference for the .ato declarative DSL: type system, connection semantics, constraint model, and standard library.

    4k GitHub stars~3.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Compiler

    atopile/atopile

    How the atopile compiler builds and links TypeGraphs from .ato (ANTLR front-end → AST → TypeGraph → Linker → DeferredExecutor), plus the key invariants and test entrypoints.

    4k GitHub stars~1k tokensUpdated 4 mo ago
    Auto-check passed
  • Domain Layer

    atopile/atopile

    Instructions for electronics-specific logic and build processes: netlists, PCBs, build steps, and exporters.

    4k GitHub stars~791 tokensUpdated 4 mo ago
    Auto-check passed
  • Fabll

    atopile/atopile

    How FabLL (faebryk.core.node) maps Python node/trait declarations into the TypeGraph + instance graph, including field/trait invariants and instantiation patterns.

    4k GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Faebryk

    atopile/atopile

    How Faebryk's TypeGraph works (GraphView + Zig edges), how to traverse/resolve references, and how FabLL types/traits map onto edge types.

    4k GitHub stars~861 tokensUpdated 4 mo ago
    Auto-check passed
  • Graph

    atopile/atopile

    How the Zig-backed instance graph works (GraphView/NodeReference/EdgeReference), the real Python API surface, and the invariants around allocation, attributes, and cleanup.

    4k GitHub stars~952 tokensUpdated 4 mo ago
    Auto-check passed

Works with

Questions about Sexp

What does Sexp do?

How the Zig S-expression engine and typed KiCad models work, how they are exposed to Python (pyzigsexp), and the invariants around parsing, formatting, and freeing. Sexp is an agent skill from atopile/atopile. How the Zig S-expression engine and typed KiCad models work, how they are exposed to Python (pyzigsexp), and the invariants around parsing, formatting, and freeing.

When should I use Sexp?

Sexp fits situations like: working with KiCad file parsing; S-expression generation.

How do I install Sexp in Claude Code?

Run `npx skills add atopile/atopile --skill sexp -a claude-code`. Or copy the skill folder (.claude/skills/sexp in atopile/atopile) into .claude/skills/sexp in your project. Claude Code loads it when a task matches its description.

How do I install Sexp in Codex?

Run `npx skills add atopile/atopile --skill sexp -a codex`. Or copy the skill folder (.claude/skills/sexp in atopile/atopile) into .agents/skills/sexp in your project. Codex loads it when a task matches its description.

Can I use Sexp in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add atopile/atopile --skill sexp -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sexp, .gemini/skills/sexp, .github/skills/sexp and .opencode/skills/sexp in your project.

What does Sexp need to run?

SKILL.md names no scripts, command-line tools or credentials: Sexp is instructions for the agent only. Our summary lists: Python 3.

Does Sexp access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sexp safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Sexp use?

Sexp is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sexp use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Sexp?

Skills that share tags, products or a category with Sexp: MCP Server Builder (anthropics/skills, 180k stars), PDF Processing (anthropics/skills, 180k stars), NotebookLM Research Assistant (PleasePrompto/notebooklm-skill, 7.8k stars) and Manim Video Production (browser-use/video-use, 29k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sexp?

atopile (a GitHub organization) maintains it in atopile/atopile, which has 3,980 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on June 13, 2026.

Source: atopile/atopile on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.