Xiaoqinli (XQL) for Openclaw

An AST-First transpiler enabling AI agents to write structured JSON AST directly, compiling it into type-safe Go, Rust, TypeScript, Kotlin, Swift, and Python.

freecode100year
v2.1.0
Jun 2, 2026
0
556
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install xiaoqinli

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install xiaoqinli using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Xiaoqinli (XQL)?

Xiaoqinli (XQL) is an AST-First compiler engineered specifically for AI agents, bypassing the conventional source-parsing paradigm. Rather than forcing LLMs to output complex syntax-heavy source files that are prone to compilation and parsing errors, agents write structured .xql.json files (JSON Abstract Syntax Trees) directly. The compiler validates types, effects, and capabilities at compile time, eliminating syntactic mistakes and ensuring high structural integrity prior to generating clean, idiomatic source code in six target languages.

Using this capability within your toolkit of Openclaw Skills ensures that code generated by AI agents is structurally correct, type-safe, and secure. Developers can program AI agents to output robust systems in Go, Rust, TypeScript, Kotlin, Swift, or Python, with the compiler handling the translation and safety checks transparently.

Xiaoqinli (XQL) Use Cases

  • Syntax-Free AI Generation: Enable LLM agents to write logic directly into JSON Abstract Syntax Trees to eliminate syntax mistakes.
  • Multi-Language Software Synthesis: Transpile a single abstract declaration file into equivalent code for Go, Rust, TypeScript, Kotlin, Swift, or Python.
  • Static Guarantee and Safety Enforcement: Verify capability grants and computational side effects of generated code before compiling to native binaries.
  • Automated Code Pipeline Integration: Standardize AI agent compilation workflows using Openclaw Skills in continuous integration and deployment environments.

How Xiaoqinli (XQL) Works

  1. AST Construction: The AI agent produces program structures using a predefined JSON schema with defined nodes (Declarations, Statements, Expressions).
  2. Type Checking: The compilation system evaluates function signatures, return types, variable declarations, and mapping rules to assign compile-time type safety.
  3. Effect Inference: The compiler computes transitive side effects, ensuring functions declaring pure behaviors cannot execute impure operations.
  4. Capability Checking: The transpiler verifies caller permission scopes, ensuring they encapsulate callee requirements (e.g., IO, filesystem, network access).
  5. Target Code Emission: Validated trees are transpiled to clean, idiomatic syntax in Go, Rust, TypeScript, Kotlin, Swift, or Python.

Xiaoqinli (XQL) Setup

Prerequisites

  • Go 1.23+ is required to build from source.

Installation

# Clone and build the transpiler binary
git clone https://github.com/Freecode100Year/xiaoqinli.git
cd xiaoqinli && go build -o xql .

# Move to system PATH (macOS/Linux example)
sudo mv xql /usr/local/bin/

Verifying Installation

Run the following command to check help and availability:

xql --help

Xiaoqinli (XQL) Data Schema & Taxonomy

Type System Mappings

All AST components in XQL resolve to underlying target types across languages:

AST Kind Go Type Rust Type TypeScript Type Kotlin Type Python Type
Int int i64 number Long int
Float float64 f64 number Double float
String string String string String str
Bool bool bool boolean Boolean bool
Void (none) (none) void Unit None
Array []T Vec<T> T[] List<T> list[T]
Option *T Option<T> T | null T? Optional[T]

AST Node Taxonomy

Every .xql.json object contains a "kind" field. Declarations specify Program and FunctionDecl. Statement nodes structure variables and control loops (VarDecl, AssignStmt, IfStmt, WhileStmt). Expressions formulate variables and operations (Literal, Ident, BinaryExpr, CallExpr).

Xiaoqinli (XQL) Advanced Features

  • Capability Sandboxing: Use target capability annotations (grant) to restrict file system, external network, or standard IO access.
  • Static Effect Inference: Programmatically restrict function behaviors to strictly pure paths (effects: ["pure"]) for mathematical models and calculations.
  • Multi-Language Transpilation Target: Emit verified schemas to six major industry languages natively from the exact same JSON configuration.
  • Detailed Compiler Diagnostic Codes: Easily parse compile-time failures using distinct error codes for schema errors (XQL_E1xx), type conflicts (XQL_E2xx), capability denials (XQL_E3xx), and output generation glitches (XQL_E4xx).

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*