Explains how the FabLL module maps hardware components and traits to the TypeGraph.
Install
mkdir -p .claude/skills/fabll && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3009" && unzip -o skill.zip -d .claude/skills/fabll && rm skill.zipInstalls to .claude/skills/fabll
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 FabLL (faebryk.core.node) maps Python node/trait declarations into the TypeGraph + instance graph, including field/trait invariants and instantiation patterns. Use when defining new components or traits, working with the Node API, or understanding type registration.Key capabilities
- →Binds Python nodes to graph structural instances
- →Registers hardware types in the TypeGraph
- →Implements trait-based component behavior
- →Defines node fields and trait invariants
- →Maps class hierarchies to hardware instance graphs
How it works
It uses Python class inheritance and trait binding to register component definitions into the internal graph structures used for solver execution.
Inputs & outputs
When to use fabll
- →Define new hardware components
- →Apply traits to nodes
- →Understand type registration in FabLL
- →Develop hardware component libraries
About this skill
FabLL (Fabric Low Level) Module
fabll (primarily src/faebryk/core/node.py) is the high-level Python API for defining and working with hardware components. It bridges the gap between Python classes and the underlying TypeGraph and instance graph.
Quick Start
import faebryk.core.faebrykpy as fbrk
import faebryk.core.graph as graph
import faebryk.core.node as fabll
g = graph.GraphView.create()
tg = fbrk.TypeGraph.create(g=g)
class _App(fabll.Node):
pass
app = _App.bind_typegraph(tg=tg).create_instance(g=g)
Relevant Files
src/faebryk/core/node.py(Node/Traits/fields, type registration, binding/instantiation helpers)src/faebryk/core/faebrykpy.py(edge types used by FabLL under the hood)src/faebryk/core/graph.py(GraphView wrapper used by instances)
Dependants (Call Sites)
- Library (
src/faebryk/library/): Every component (Resistor, Capacitor, etc.) inherits fromNode. - Compiler: Generates
Nodesubclasses dynamically fromatofiles. - Solvers: Operate on
Nodeinstances to extract parameters and constraints.
How to Work With / Develop / Test
Core Concepts
- Nodes are wrappers over graph instances: a
fabll.Nodeis constructed with agraph.BoundNode. - Declaration via class attributes:
- structural children:
SomeType.MakeChild(...) - trait attachments:
Traits.MakeEdge(SomeTrait.MakeChild().put_on_type())(or similar)
- structural children:
- Binding:
- type binding:
MyType.bind_typegraph(tg) - instance creation:
.create_instance(g)
- type binding:
- Type identifiers:
- library types (
faebryk.library.*) intentionally have short identifiers (class name) for ato imports - non-library types include a module-derived suffix; type IDs must be unique (enforced in
Node._register_type)
- library types (
Development Workflow
- Prefer adding behavior as a Trait rather than deepening class hierarchies.
- If you need a new structural relation/field kind, it lives in
src/faebryk/core/node.py(field system). - Keep an eye on invariants enforced at class creation time (metaclass +
__init_subclass__).
Testing
- Core tests:
ato dev test --llm test/core/test_node.py -qandato dev test --llm test/library/test_traits.py -q
Best Practices
- Prefer Traits: Don't add methods to
Nodesubclasses if they can be a Trait. This allows them to be applied to different component families. - Avoid deep inheritance: FabLL enforces single-level subclassing for node types (
Node.__init_subclass__). - Type-safe traversal: when you must traverse trait edges manually, prefer
EdgeTrait.traverse(trait_type=...).
Internals & Runtime Behavior
Instantiation & Lifecycle
- Don’t call
MyNode()with no args: instances are created from a bound type viabind_typegraph(...).create_instance(...). - TypeGraph context is required:
import faebryk.core.graph as graph import faebryk.core.faebrykpy as fbrk g = graph.GraphView.create() tg = fbrk.TypeGraph.create(g=g) inst = MyNode.bind_typegraph(tg).create_instance(g=g) - Single-level subclassing invariant:
Node.__init_subclass__forbids “deeper than one level” inheritance for node types.
Trait Implementation
- Traits are Nodes: Traits are not just Python mixins; they are
Nodesubclasses that typically contain anImplementsTraitedge. - Trait Definition:
class MyTrait(Node): is_trait = Traits.MakeEdge(ImplementsTrait.MakeChild().put_on_type()) - Resolution: Use
node_instance.get_trait(TraitType)to retrieve a trait instance. This performs a graph traversal.
Performance & Memory
- Type Creation: Creating a type involves significant overhead (executing fields, resolving dependencies). Once created, instantiating instances is faster but still involves allocation in the Zig backend.
- Tree Structure: Nodes are linked via
EdgeComposition.add_childcreates this edge. Large trees (10k+ nodes) should be constructed carefully to avoid Python loop overhead; the underlying graph is efficient, but Python interactions cost time.
When not to use it
- →Defining non-hardware-based class logic
- →Directly manipulating graph nodes without using the FabLL API
Prerequisites
Limitations
- →Type ID uniqueness is strictly enforced
- →Complex hierarchy can lead to difficult-to-debug graph bindings
- →Requires adherence to internal library structure
How it compares
It abstracts the low-level graph traversal logic into a standard Python class-based syntax for hardware definition.
Compared to similar skills
fabll side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| fabll (this skill) | 1 | 6mo | No flags | Advanced |
| mcp-builder | 136 | 3mo | Review | Advanced |
| architecture-patterns | 55 | 2mo | No flags | Advanced |
| deepwiki-rs | 25 | 9mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by atopile
View all by atopile →You might also like
mcp-builder
anthropics
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
architecture-patterns
wshobson
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use when architecting complex backend systems or refactoring existing applications for better maintainability.
deepwiki-rs
sopaco
AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation. Use when Claude needs to analyze source code, understand software architecture, generate technical specs, or create professional documentation from any programming language.
langchain-architecture
wshobson
Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns. Use when building LangChain applications, implementing AI agents, or creating complex LLM workflows.
python-design-patterns
wshobson
Python design patterns including KISS, Separation of Concerns, Single Responsibility, and composition over inheritance. Use when making architecture decisions, refactoring code structure, or evaluating when abstractions are appropriate.
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.