faebryk
This explains TypeGraph traversal and Faebryk type mappings to assist users in querying nodes and edges within the Faebryk core.
Install
mkdir -p .claude/skills/faebryk && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6268" && unzip -o skill.zip -d .claude/skills/faebryk && rm skill.zipInstalls to .claude/skills/faebryk
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
How Faebryk's TypeGraph works (GraphView + Zig edges), how to traverse/resolve references, and how FabLL types/traits map onto edge types. Use when working with TypeGraph traversal, edge types, or building type-aware queries.Key capabilities
- →Traverse TypeGraph structures
- →Resolve references in FabLL
- →Map Python classes to graph nodes
- →Execute type-aware queries
- →Implement trait-based edge traversal
How it works
The TypeGraph uses Zig-implemented edges exposed to Python to manage structural relationships between type definitions and concrete design instances.
Inputs & outputs
When to use faebryk
- →Traverse Faebryk TypeGraph
- →Resolve references in FabLL
- →Build type-aware queries for PCB design
- →Map Python classes into TypeGraph
About this skill
Faebryk Core Module
The Faebryk core here is the TypeGraph + edge types implemented in Zig and exposed to Python via faebryk.core.faebrykpy.
Source-of-truth for API + behavior:
src/faebryk/core/faebrykpy.py(Python-facing wrapper + type-safeEdgeTrait.traverse)src/faebryk/core/zig/gen/faebryk/typegraph.pyi(public stubbed API surface)src/faebryk/core/zig/src/faebryk/*(Zig implementation)
Quick Start
import faebryk.core.faebrykpy as fbrk
import faebryk.core.graph as graph
g = graph.GraphView.create()
tg = fbrk.TypeGraph.create(g=g)
Relevant Files
src/faebryk/core/faebrykpy.py(re-exports +EdgeTraversal+ type-safeEdgeTrait.traverse)src/faebryk/core/zig/gen/faebryk/typegraph.pyi(TypeGraph stub)- Key edge types (imported by
faebrykpy.py):EdgeComposition(parent/child structure)EdgeTrait/Trait(trait attachment)EdgePointer(references)EdgeInterfaceConnection(interface connections)EdgeOperand(solver operand wiring)EdgeType/EdgeNext(type graph plumbing)
- Linker:
Linker(used by compiler/linking stages)
Dependants (Call Sites)
- FabLL:
src/faebryk/core/node.py(binds Python classes into the TypeGraph; uses composition/trait edges) - Compiler:
src/atopile/compiler/*(creates and links TypeGraphs) - Solver:
src/faebryk/core/solver/*(operand edges and instance traversal) - Build/export pipeline:
src/atopile/build_steps.py(visits type/instance edges for PCB/layout features)
How to Work With / Develop / Test
Core Concepts
- GraphView + TypeGraph: a
TypeGraphis created against aGraphView:import faebryk.core.graph as graph import faebryk.core.faebrykpy as fbrk g = graph.GraphView.create() tg = fbrk.TypeGraph.create(g=g) - Type nodes vs instance nodes:
- TypeGraph stores type definitions (“what exists structurally on a type”)
- GraphView also holds instances created from those types (“a concrete design graph”)
- EdgeTraversal:
TypeGraph.ensure_child_reference(..., path=[...])usesEdgeTraversalitems to walk references through the type graph.
Development Workflow
- Zig-side changes: edit
src/faebryk/core/zig/src/faebryk/*(edges, typegraph internals). - Rebuild bindings:
ato dev compile(importsfaebryk.core.zig). - Python ergonomics: add wrappers/helpers in
src/faebryk/core/faebrykpy.py(example: type-safeEdgeTrait.traverse).
Testing
- TypeGraph-heavy tests live in compiler/runtime suites:
ato dev test --llm test/compiler/test_typegraph.py -qato dev test --llm test/compiler/test_runtime.py -q
- Zig-backed traversal tests:
ato dev test --llm test/core/zig/test_interface_pathfinder.py -q
Best Practices
- Import edges/TypeGraph via
faebryk.core.faebrykpy(so callers get Python helpers, not just raw generated types). - Prefer type-safe trait traversal:
EdgeTrait.traverse(trait_type=SomeTrait)over stringly-typedtrait_type_name=....
- When building reference paths, be explicit about edge semantics (composition vs pointer vs trait) rather than relying on implicit string behavior.
When not to use it
- →Directly manipulating raw graph data without using the provided API
- →Ignoring type-safe trait traversal methods
Prerequisites
Limitations
- →Requires rebuilding bindings after Zig-side changes
How it compares
This approach uses type-safe trait traversal and explicit edge semantics rather than relying on implicit string-based lookups.
Compared to similar skills
faebryk side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| faebryk (this skill) | 1 | 6mo | No flags | Advanced |
| python-project-structure | 8 | 6mo | No flags | Beginner |
| graph | 6 | 6mo | No flags | Advanced |
| library | 1 | 5mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by atopile
View all by atopile →You might also like
python-project-structure
wshobson
Python project organization, module architecture, and public API design. Use when setting up new projects, organizing modules, defining public interfaces with __all__, or planning directory layouts.
graph
atopile
How the Zig-backed instance graph works (GraphView/NodeReference/EdgeReference), the real Python API surface, and the invariants around allocation, attributes, and cleanup.
library
atopile
How the Faebryk component library is structured, how `_F.py` is generated, and the conventions/invariants for adding new library modules.
generate-subsystem-skills
llama-farm
Generate specialized skills for each subsystem in the monorepo. Creates shared language skills and subsystem-specific checklists for high-quality AI code generation.
tool-renderer
daaain
Implement specialized rendering for Claude Code tools. Use when adding a new tool type (WebSearch, WebFetch, etc.) to the transcript viewer, or when asked to implement tool rendering.
lsp
atopile
How the atopile Language Server works (pygls), how it builds per-document graphs for completion/hover/defs, and the invariants for keeping it fast and crash-proof.