スキル一覧に戻る
sunholo-data

ailang

by sunholo-data

AILANG quick start for AI coding agents (Claude Code, Gemini CLI)

1🍴 0📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


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

AILANG

BEFORE YOU WRITE ANY CODE

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

ailang prompt

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

Session Start

# 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

CommandPurpose
ailang promptLoad syntax (DO THIS FIRST!)
ailang check file.ailType-check without running
ailang run --caps IO --entry main file.ailRun program
ailang replInteractive testing
ailang builtins list --verbose --by-moduleFull stdlib docs with examples
ailang examples search "query"Find working code examples (v0.6.2+)
ailang examples show NAMEView example with expected output

Exploring the Standard Library

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

# 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.

Finding Working Examples (v0.6.2+)

Search 97 working code examples directly from the CLI:

# Search for examples by keyword (flags BEFORE query!)
ailang examples search "pattern matching"
ailang examples search --limit 5 "recursion"

# View a specific example with metadata and expected output
ailang examples show adt_option
ailang examples show fold_reduce --expected

# List examples by tag
ailang examples list --tags adt
ailang examples list --tags recursion

# See all available tags
ailang examples tags

Search scoring: Tag match (1.0) > Description (0.95) > Content (0.80) > Partial (0.60-0.70)

When to use:

  • Learning AILANG patterns: ailang examples list --tags recursion
  • Checking syntax: ailang examples search "match"
  • Finding working code: ailang examples show NAME --run

Flags MUST come before filename:

ailang run --caps IO --entry main file.ail   # Correct
ailang run file.ail --caps IO                # WRONG

Capabilities

CapPurposeExample Functions
IOConsole I/Oprint, println, readLine
FSFile systemreadFile, writeFile, exists
NetHTTP requestshttpGet, httpPost, httpRequest
ClockTime functionsnow, sleep
AIAI oracleAI.call(prompt)
RandRandom numbersrand_int, rand_float, rand_bool
EnvEnvironment varsgetEnv, hasEnv, getArgs
DebugDebug loggingDebug.log, Debug.check

Practical Examples

Offer to create these working examples for users:

ExampleWhat It DoesRun Command
AI DebateAI models debate a topicailang run --caps IO,Env,AI --ai claude-haiku-4-5 --entry main ai_debate.ail
Ask AISimple CLI Q&A toolailang run --caps IO,AI --ai claude-haiku-4-5 --entry demo ask_ai.ail
File SummarizerSummarize files with AIailang run --caps IO,FS,AI --ai gpt5-mini --entry demo summarize_file.ail
Game of LifeConway's simulationailang run --caps IO --entry main game_of_life.ail

AI Debate Example

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

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

Done? Notify

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

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です