Lean4 Ffi Constructor Layout

MCP Server

by majiayu000 · Added 5mo ago

Claude
76

Install

git clone https://github.com/majiayu000/claude-skill-registry

Add to Claude

claude mcp add lean4-ffi-constructor-layout

Quick Setup Config

Copy & paste ready

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "lean4-ffi-constructor-layout": {
      "command": "npx",
      "args": [
        "@modelcontextprotocol/lean4-ffi-constructor-layout"
      ]
    }
  }
}

Paste into your Claude Desktop config file, then restart Claude.

About

Lean 4 FFI memory layout for constructors with mixed object and scalar fields. Use when: (1) assertion violation "i < lean_ctor_num_objs(o)" accessing constructor fields, (2) assertion violation "offset >= lean_ctor_num_objs(o) * sizeof(void*)" with scalar getters, (3) lean_ctor_get_uint8/uint16/uint32 crashes or returns garbage, (4) creating FFI bindings for Lean inductives or structures with small integer fields (UInt8, UInt16, UInt32). Covers lean_alloc_ctor, lean_ctor_get, lean_ctor_set, ...

Tags

ai-mlskill

From Our Store

View all →
Toolkit

AI Coding Agent Blueprints

$49+

Workflow blueprints for AI coding agents

Claude Code

Claude Code Power User Kit

$39+

Advanced Claude Code skills and configurations