AILANG

Write AILANG code. ALWAYS run 'ailang prompt' first - it contains the current syntax rules and templates.

16 stars

Best use case

AILANG is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Write AILANG code. ALWAYS run 'ailang prompt' first - it contains the current syntax rules and templates.

Teams using AILANG should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ailang/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/ailang/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ailang/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How AILANG Compares

Feature / AgentAILANGStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Write AILANG code. ALWAYS run 'ailang prompt' first - it contains the current syntax rules and templates.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# AILANG

## BEFORE YOU WRITE ANY CODE

**Run this command first** - it outputs the current syntax rules and templates:

```bash
ailang prompt
```

This is the source of truth for AILANG syntax. Do not guess at syntax.

## Session Start

```bash
# 1. Check for messages from other agents
ailang messages list --unread

# 2. Load current syntax (CRITICAL!)
ailang prompt

# 3. Verify AILANG is installed
ailang --version
```

## Development Workflow

```
┌──────────────────────────────────────┐
│ 1. Run: ailang prompt                │
│    Read the template and examples    │
└──────────────────────────────────────┘
                 ↓
┌──────────────────────────────────────┐
│ 2. Write code following template     │
│    module myproject/mymodule         │
│    export func main() -> () ! {IO}   │
└──────────────────────────────────────┘
                 ↓
┌──────────────────────────────────────┐
│ 3. Type-check (fast feedback)        │
│    ailang check file.ail             │
└──────────────────────────────────────┘
                 ↓
┌──────────────────────────────────────┐
│ 4. Run with capabilities             │
│    ailang run --caps IO --entry main │
└──────────────────────────────────────┘
                 ↓
        Fix errors, repeat
```

## CLI Quick Reference

| Command | Purpose |
|---------|---------|
| `ailang prompt` | **Load syntax (DO THIS FIRST!)** |
| `ailang check file.ail` | Type-check without running |
| `ailang run --caps IO --entry main file.ail` | Run program |
| `ailang repl` | Interactive testing |
| `ailang builtins list --verbose --by-module` | **Full stdlib docs with examples** |

## Exploring the Standard Library

**The CLI is the source of truth.** Always use `ailang builtins list --verbose` for current, accurate documentation:

```bash
# SOURCE OF TRUTH: Full docs with examples and signatures
ailang builtins list --verbose --by-module

# Search for specific module (e.g., array functions)
ailang builtins list --verbose --by-module | grep -A 30 "std/array"

# Search for specific function
ailang builtins list --verbose | grep -A 10 "httpGet"
```

The CLI output shows the authoritative documentation:
- **Usage:** Exact import statement (`import std/fs (readFile)`)
- **Parameters:** What each argument expects
- **Returns:** What the function returns
- **Examples:** Working code snippets

**Note:** This skill provides guidance, but `ailang prompt` and `ailang builtins list --verbose` are always more up-to-date.

**Flags MUST come before filename:**
```bash
ailang run --caps IO --entry main file.ail   # Correct
ailang run file.ail --caps IO                # WRONG
```

## Capabilities

| Cap | Purpose | Example Functions |
|-----|---------|-------------------|
| `IO` | Console I/O | `print`, `println`, `readLine` |
| `FS` | File system | `readFile`, `writeFile`, `exists` |
| `Net` | HTTP requests | `httpGet`, `httpPost`, `httpRequest` |
| `Clock` | Time functions | `now`, `sleep` |
| `AI` | AI oracle | `AI.call(prompt)` |
| `Rand` | Random numbers | `rand_int`, `rand_float`, `rand_bool` |
| `Env` | Environment vars | `getEnv`, `hasEnv`, `getArgs` |
| `Debug` | Debug logging | `Debug.log`, `Debug.check` |

## Practical Examples

Offer to create these working examples for users:

| Example | What It Does | Run Command |
|---------|--------------|-------------|
| **AI Debate** | AI models debate a topic | `ailang run --caps IO,Env,AI --ai claude-haiku-4-5 --entry main ai_debate.ail` |
| **Ask AI** | Simple CLI Q&A tool | `ailang run --caps IO,AI --ai claude-haiku-4-5 --entry demo ask_ai.ail` |
| **File Summarizer** | Summarize files with AI | `ailang run --caps IO,FS,AI --ai gpt5-mini --entry demo summarize_file.ail` |
| **Game of Life** | Conway's simulation | `ailang run --caps IO --entry main game_of_life.ail` |

### AI Debate Example
```ailang
module my_debate
import std/ai (call)
import std/env (hasEnv)
import std/io (println)

export func main() -> () ! {IO, Env, AI} {
  println("=== AI Debate ===");
  let optimist = call("Argue FOR AI benefits in 2 sentences");
  println("Optimist: " ++ optimist);
  let skeptic = call("Argue AGAINST AI risks in 2 sentences");
  println("Skeptic: " ++ skeptic)
}
```

### File Summarizer Example
```ailang
module summarizer
import std/ai (call)
import std/fs (readFile)
import std/io (println)

export func main(path: string) -> () ! {IO, FS, AI} {
  let content = readFile(path);
  let summary = call("Summarize in 3 bullets: " ++ content);
  println(summary)
}
```

## When Stuck

- Run `ailang repl` for interactive testing
- See [common_patterns.md](resources/common_patterns.md) for patterns
- See [cli_reference.md](resources/cli_reference.md) for full CLI docs
- See [editor_support.md](resources/editor_support.md) for VS Code, Vim, Neovim setup
- Check the [ailang-debug](../ailang-debug/SKILL.md) skill for error fixes

## Done? Notify

```bash
ailang messages send user "Task completed" --from "my-agent" --title "Status"
```

Related Skills

AILANG Sprint Planner

16
from diegosouzapw/awesome-omni-skill

Analyze design docs, calculate velocity from recent work, and create realistic sprint plans with day-by-day breakdowns. Use when user asks to "plan sprint", "create sprint plan", or wants to estimate development timeline.

AILANG Debug

16
from diegosouzapw/awesome-omni-skill

Debug AILANG code errors. Use when you encounter type errors, parse errors, or runtime failures in AILANG programs.

AILANG Sprint Executor

16
from diegosouzapw/awesome-omni-skill

Execute approved sprint plans with test-driven development, continuous linting, progress tracking, and pause points. Use when user says "execute sprint", "start sprint", or wants to implement an approved sprint plan.

AILANG Inbox

16
from diegosouzapw/awesome-omni-skill

Cross-agent communication system for AI workflows. Check messages at session start, send notifications to other agents, and track multi-agent handoffs with correlation IDs.

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

google-docs-manager

16
from diegosouzapw/awesome-omni-skill

Expert in Google Docs management. Use when creating, reading, updating, formatting, or managing Google Docs with markdown support, advanced formatting, tables with full manipulation, images with styling, lists, headers/footers, and table of contents.

genesis-tools:living-docs

16
from diegosouzapw/awesome-omni-skill

Self-maintaining documentation system. Bootstraps, validates, refines, and optimizes codebase documentation. Creates minimal, token-efficient doc chunks. Use when creating, updating, or auditing project documentation.

generate-docstrings

16
from diegosouzapw/awesome-omni-skill

Create docstrings for functions and classes. Use when documenting code APIs.

generate-agent-docs

16
from diegosouzapw/awesome-omni-skill

Generates documentation and usage guides for agents, skills, prompts, and instructions. Works with GitHub Copilot, Claude Code, Codex, OpenCode, and other providers. Use when onboarding team members, creating README files for your customizations, or generating usage examples for existing agents.

flow-documenter

16
from diegosouzapw/awesome-omni-skill

Document findings and maintain task notes using Flow framework. Use when user says "document", "document this", "document finding", "add notes", "add this to notes", "write this down", "summarize", "summarize this", "generate changelog", "create changelog", or wants to capture discoveries. Helps update task Notes sections, create summaries with /flow-summarize, and keep documentation synchronized with work. Focuses on concise, actionable documentation.

fix-markdown

16
from diegosouzapw/awesome-omni-skill

Fix lint, formatting, and prose issues in markdown files using Prettier and Vale. Use when the user or agent needs to fix lint, formatting, and prose issues in markdown files.

file-placement

16
from diegosouzapw/awesome-omni-skill

Activate when creating any summary, report, or output file. Ensures files go to correct directories (summaries/, memory/, stories/, bugs/). Mirrors what summary-file-enforcement hook enforces.