gleam-erlang-interop

Generate type-safe Gleam externals and wrappers for Erlang BEAM interop.

3|1|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/renatillas/gleam --skill gleam-erlang-interop-renatillas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gleam-erlang-interop
Source: https://github.com/renatillas/gleam/tree/main/skills/gleam-erlang-interop
Command: npx skills add https://github.com/renatillas/gleam --skill gleam-erlang-interop-renatillas

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides Claude Code through integrating Gleam with Erlang and Elixir code, enabling safe interop via FFI and externals while preserving Gleam's safety guarantees.

Core Features & Use Cases

  • Erlang/Elixir Interop: Call Erlang functions and BEAM libraries from Gleam using externals, with type-safe wrappers.
  • Targeted Builds & OTP Integration: Build for Erlang targets and integrate with OTP patterns and existing BEAM modules.
  • Safe Guidance & Best Practices: Follow best practices for cross-language data types, error handling, and testing.

Quick Start

Start by declaring a simple external and a safe wrapper to call an Erlang function, then iterate to more complex interop.

Frequently Asked Questions about gleam-erlang-interop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call Erlang functions from Gleam?

You call Erlang functions from Gleam by declaring externals and building type-safe wrappers, ensuring BEAM interop preserves Gleam's safety guarantees during cross-language integration.

Can I use Elixir libraries in a Gleam project targeting the BEAM?

Yes, you can use Elixir libraries when building for the Erlang target by defining externals and safe wrappers to bridge Gleam with existing BEAM systems and modules.

What are the typing rules for Erlang and Gleam data type mappings?

Erlang Gleam interop specifies data type mappings and typing rules for externals, ensuring BEAM values translate safely into Gleam types via wrappers to maintain cross-language type guarantees.

Does Gleam FFI support OTP integration patterns?

Yes, Gleam FFI supports OTP integration by providing externals to call BEAM modules, enabling OTP patterns when building for the Erlang target alongside testing requirements for cross-language interop.

What is the best way to handle errors when calling Erlang code from Gleam?

The best way to handle errors during Erlang interop is to wrap external FFI calls in safe Gleam functions, applying best practices for cross-language data types, wrappers, and error handling.