Agent skill · software engineering · aradotso

ghostling-libghostty-terminal

Build minimal terminal emulators using the libghostty-vt C API with Raylib for windowing and rendering

Why this skill is useful

Provides specific C API patterns and integration techniques for building terminal emulators with libghostty-vt that the AI wouldn't reliably generate on its own.

What it needs

Requires clang, cmake, gcc, ninja, zig installed locally. About 5k tokens when loaded. Last updated 2026-07-09. 70 stars on the source repository.

What this skill does

Ghostling — libghostty Terminal Emulator Skill by ara.so — Daily 2026 Skills collection. Ghostling is a minimal viable terminal emulator built on libghostty-vt, the embeddable C library extracted from Ghostty. It uses Raylib for windowing/rendering and lives in a single C file. The project demonstrates how to wire libghostty-vt's VT parsing, terminal state, and render-state API to any 2D or GPU renderer. What libghostty-vt Provides VT sequence parsing (SIMD-optimized) Terminal state: cursor, styles, text reflow, scrollback Render state management (what cells changed and how to draw them) Unicode / multi-codepoint grapheme handling Kitty keyboard protocol, mouse tracking, focus reporting Zero dependencies (not even libc) — WASM-compatible libghostty-vt does NOT provide: windowing, rendering, PTY management, tabs, splits, or configuration. Requirements Tool Version ------ --------- CMake 3.19+ Ninja any C compiler clang/gcc Zig 0.15.x (on PATH) macOS Xcode CLT or Xcode Build & Run After first configure, only the build step is needed: Warning: Debug builds are very slow due to Ghostty's safety/correctness assertions. Always benchmark with Release builds. Project Structure Core libghostty-vt API Patterns All implementation lives in main.c. Below are the key patterns extracted from it. 1. Initialize the Terminal 2. Write Data from PTY into the Terminal 3. Send Keyboard Input 4. Send Mouse Events 5. Resize the Terminal 6. Render: Walk the Render State The render state API tells you exactly which cells changed and how to draw them — no need to redraw everything every frame. 7. Scrollback 8. Cursor Position 9. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aradotso/ghostling-libghostty-terminal

View the source on GitHub

Browse the @skills marketplace