Agent skill

Graph

by atopile in 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.

MITAuto-check passed

Install Graph

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

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

GitHub CLI
$ gh skill install atopile/atopile graph --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/graph .claude/skills/graph && 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
graph
GitHub stars
4k
Token cost
~952 tokens
SKILL.md length
283 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 3 steps: Zig changes: edit… → Rebuild: ato dev compile (imports… → If you add/remove exposed methods:…
  • Working with low-level graph APIs
  • SKILL.md covers Quick Start, Relevant Files, Dependants (Call Sites) and How to Work With / Develop /…
  • Calls python

What it does

Graph is an agent skill from 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. Use when working with low-level graph APIs, memory management, or building systems that traverse the instance graph.

Its SKILL.md is about 950 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 low-level graph APIs
  • Memory management
  • Building systems that traverse the instance graph

Example prompts

  • “/graph”

Requirements

  • Python 3

Workflow steps

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

  1. Zig changes: edit src/faebryk/core/zig/src/graph/*.
  2. Rebuild: ato dev compile (imports faebryk.core.zig, which compiles in editable installs).
  3. If you add/remove exposed methods: update the wrapper in src/faebryk/core/zig/src/python/graph/graph_py.zig and ensure stubs regenerate.

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

    Shell commands in SKILL.md call:

    • 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

Graph loads about 952 tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 283 words of instructions outside code blocks.

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

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). 283 words, ~952 tokens.

Download SKILL.mdSave it as .claude/skills/graph/SKILL.md (or your agent's skills folder).
name
graph
description
How the Zig-backed instance graph works (GraphView/NodeReference/EdgeReference), the real Python API surface, and the invariants around allocation, attributes, and cleanup. Use when working with low-level graph APIs, memory management, or building systems that traverse the instance graph.

Graph Module

The faebryk.core.graph module is a thin Python wrapper around the Zig graph implementation.

Source-of-truth for behavior is:

  • Zig implementation: src/faebryk/core/zig/src/graph/graph.zig
  • Python bindings: src/faebryk/core/zig/src/python/graph/graph_py.zig
  • Public Python API surface (stubs): src/faebryk/core/zig/gen/graph/graph.pyi

Quick Start

python
from faebryk.core.graph import GraphView

g = GraphView.create()
try:
    _ = g.create_and_insert_node()
finally:
    g.destroy()

Relevant Files

  • Python wrapper/re-export: src/faebryk/core/graph.py
  • Zig graph core: src/faebryk/core/zig/src/graph/graph.zig
  • Zig → Python wrappers: src/faebryk/core/zig/src/python/graph/graph_py.zig
  • Generated type stubs: src/faebryk/core/zig/gen/graph/graph.pyi

Dependants (Call Sites)

  • src/faebryk/core/node.py (FabLL: nodes/traits are graph-backed)
  • src/atopile/compiler/gentypegraph.py (compiler constructs typegraphs/instances via graph APIs)
  • src/faebryk/core/graph_render.py (graph visualization)

How to Work With / Develop / Test

Mental Model
  • NodeReference / EdgeReference: value-like handles (UUIDs) into global backing storage in Zig.
  • GraphView: a membership + adjacency view over those references (per-view arena + maps + bitsets).
  • BoundNode / BoundEdge: “reference + owning GraphView pointer” wrappers used for traversal helpers.
Core Invariants (do not violate)
  • No direct constructors: GraphView(), NodeReference(), EdgeReference() are not meant to be called; use the exposed factory methods.
    • GraphView.create()
    • NodeReference.create(**attrs)
    • EdgeReference.create(source=..., target=..., edge_type=..., **attrs)
  • Explicit cleanup: GraphView.create() allocates a Zig-side graph on the C allocator; it is freed only by GraphView.destroy().
    • Do not rely on Python GC to reclaim Zig allocations.
  • Attribute limits: node/edge dynamic attributes are fixed-capacity in Zig (currently 6 entries). Exceeding this is a hard failure.
  • Edge type width: edge types are u8 in Zig; treat them as 0..255 in Python (hashing/modulo happens on the Zig side).
  • Self node exists: GraphView.init inserts a self_node; counts include it.
API Cheatsheet (matches src/faebryk/core/zig/gen/graph/graph.pyi)
python
from faebryk.core.graph import GraphView, Node, Edge

g = GraphView.create()
try:
    n1 = g.create_and_insert_node()           # -> BoundNode
    n2 = Node.create(name="n2")               # -> NodeReference (not inserted yet)
    bn2 = g.insert_node(node=n2)              # -> BoundNode

    e = Edge.create(source=n1.node(), target=bn2.node(), edge_type=7, name="link")
    _be = g.insert_edge(edge=e)               # -> BoundEdge
finally:
    g.destroy()
Debugging
  • GraphView.__repr__() prints GraphView(id=..., |V|=..., |E|=...) from Zig.
  • Graph wrapper has a stress test: python -m faebryk.core.graph (runs test_graph_garbage_collection).
Development Workflow
  1. Zig changes: edit src/faebryk/core/zig/src/graph/*.
  2. Rebuild: ato dev compile (imports faebryk.core.zig, which compiles in editable installs).
  3. If you add/remove exposed methods: update the wrapper in src/faebryk/core/zig/src/python/graph/graph_py.zig and ensure stubs regenerate.
Testing

Key test entrypoints:

  • Python: python -m faebryk.core.graph
  • Zig: zig test src/faebryk/core/zig/src/graph/graph.zig

© 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/graph of atopile/atopile.

Open the folder on GitHubat commit 619eda7

Compare with similar skills

Graph 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.

Graph compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Graph this skillatopile/atopile4k—~952Automated safety check: PassMIT
MCP Server Builderanthropics/skills180k64 repos~2.3kAutomated safety check: PassApache-2.0
PDF Processinganthropics/skills180k48 repos~2kAutomated safety check: PassProprietary
NotebookLM Research AssistantPleasePrompto/notebooklm-skill7.8k14 repos~2.4kAutomated safety check: NotesMIT
Manim Video Productionbrowser-use/video-use28k6 repos~3kAutomated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated 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 64 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 48 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.

    28k GitHub starsUsed in 6 repos~3k tokens
    Media & CreativeAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-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.

    58k GitHub starsUsed in 1 repo~2.5k tokens
    Documents & OfficeAuto-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 3 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 3 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 3 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 3 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 3 mo ago
    Auto-check passed
  • Library

    atopile/atopile

    How the Faebryk component library is structured, how F.py is generated, and the conventions/invariants for adding new library modules.

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

Works with

Questions about Graph

What does Graph do?

How the Zig-backed instance graph works (GraphView/NodeReference/EdgeReference), the real Python API surface, and the invariants around allocation, attributes, and cleanup. Graph is an agent skill from 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.

When should I use Graph?

Graph fits situations like: working with low-level graph APIs; memory management; building systems that traverse the instance graph.

How do I install Graph in Claude Code?

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

How do I install Graph in Codex?

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

Can I use Graph 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 graph -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/graph, .gemini/skills/graph, .github/skills/graph and .opencode/skills/graph in your project.

What does Graph need to run?

Going by SKILL.md and its folder, Graph needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Graph 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 Graph 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 Graph use?

Graph 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 Graph use?

About 952 tokens (SKILL.md is roughly 3.8k 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 Graph?

Skills that share tags, products or a category with Graph: 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, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Graph?

atopile (a GitHub organization) maintains it in atopile/atopile, which has 3,976 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.