iii
Skill này làm gì
Giải thích cách runtime iii hoạt động và cách viết các worker cung cấp hàm và trigger. Dành cho lập trình viên muốn thêm một khả năng vào hệ thống iii, bắt đầu bằng việc kiểm tra những gì đã tồn tại.
Khi nào nên dùng
- ✓Khi bạn muốn thêm một khả năng mới vào hệ thống iii.
- ✓Khi bạn muốn biết một hàm đã được đăng ký chưa trước khi viết mã.
- ✓Khi bạn cần một worker gọi hoặc cung cấp hàm thông qua engine.
Liên kết skill
https://github.com/iii-hq/iii/blob/main/engine/src/workers/engine_fn/skills/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Thêm một hàm vào hệ thống iii của tôi để cộng hai số, và cho tôi xem cách gọi nó từ một worker khác.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill trước hết kiểm tra xem khả năng đó đã có trong engine chưa, rồi tìm trong registry công khai, và chỉ sau đó mới xây một worker mới. Một worker kết nối tới engine và đăng ký các hàm của nó, mà các worker khác gọi thông qua engine.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
iii
iii is a language-agnostic runtime where services, agents, and tools are composed of the same things: workers, triggers, and functions. One engine process (default port 49134) holds a live registry of every connected worker, every function those workers expose, and every trigger bound to them. Workers are independent OS processes that open a WebSocket to the engine and register Functions (service::name handlers) and Triggers (the events that invoke those Functions). There is no direct worker-to-worker traffic — every call routes through the engine, which makes the language, runtime, and physical location of any worker invisible to its callers.
When to Use
Use this skill to discover live iii capabilities, call functions, author SDK workers, bind trigger types, or operate project workers through Compose.
You extend yourself by writing iii workers. A few lines get you on the bus:
import { registerWorker } from 'iii-sdk'
const iii = registerWorker(process.env.III_ENGINE_URL!, { workerName: 'demo' })
iii.registerFunction('demo::add', async (payload: { a: number; b: number }) => {
return { c: payload.a + payload.b }
})
The instant the handshake completes, demo::add is callable from any worker (and the harness itself) via iii.trigger({ function_id: 'demo::add', payload: { a: 2, b: 3 } }). No restart, no registration with the harness — the engine routes it automatically.
The four primitives
| Primitive | What it is | Owned by |
|---|---|---|
| Engine | One coordinator process. Routes every invocation. | The operator |
| Worker | A process that opens a WebSocket to the engine. | Anyone who writes one |
| Function | A named handler inside a worker, id service::name. Stable across worker restarts. |
The registering worker |
| Trigger | A (type, config, function_id) triple. Causes a function to run when an event fires. |
A worker (the type-publisher) + a caller (the binding) |
Three consequences worth internalising:
- No worker-to-worker traffic. Every call is
worker → engine → worker. Workers never address each other directly. Location and language are invisible. - No restart coordination. Restarting a worker is invisible to callers as long as it re-registers the same function ids. Two workers registering the same function id = automatic load-balance.
- No polling unless you opt in. Triggers are the engine's push channel. The engine fans events out to bound functions when the underlying source fires.
The function id is the only contract between any two workers.
graph TD
Harness["harness (LLM worker)"] <-->|"WS"| Engine["iii engine :49134 (registry + router)"]
Engine <-->|"WS"| WorkerA["your authored worker my::fn"]
Engine <-->|"WS"| WorkerB["installed registry worker"]
Engine <-->|"WS"| Provider["trigger-type provider"]
External["external event (request, timer, queue, ...)"] -->|"native protocol"| Provider
Every edge to the engine is a WebSocket. A trigger-type provider terminates some native protocol — an inbound request, a timer, a queue message — and translates it into engine traffic.
Need a capability? Discover before you build — in this order
The most common harness mistake is reimplementing something that already exists, or hardwiring one worker out of habit. Work the steps in order; stop at the first that satisfies the need.
1. Look at what is already registered in the engine. The capability may be one call away.
// engine::functions::list — every function on this engine, across all workers.
// Filter with { prefix: 'svc::' } or { search: 'resize' }.
// engine::workers::list — every connected worker.
If a registered function fits, just call it: iii.trigger({ function_id, payload }).
2. Search the public registry. If nothing registered fits, look for a worker to install. This goes through the iii-directory worker:
// directory::registry::workers::list { search: 'image resize' }
// → published workers matching the query.
// directory::registry::workers::info { name: '<worker>' }
// → that worker's README, config keys, API reference, and skills.
When one fits, add it through the project's Compose daemon:
iii trigger -n <compose-namespace> compose::add worker=<worker>
iii-directory is itself a registry worker, so confirm it is connected before calling directory::*:
// engine::functions::list { prefix: 'directory::' }
// → empty? ad
Câu hỏi thường gặp
Các worker có gọi trực tiếp nhau không?
Không. Mọi lệnh gọi đều đi qua engine, nên ngôn ngữ và vị trí của một worker được ẩn khỏi bên gọi.
Một hàm mới có cần khởi động lại không?
Không. Một hàm mới có thể được gọi ngay khi worker của nó kết nối.
Engine mặc định dùng cổng nào?
Engine thường lắng nghe ở cổng 49134.
Chi tiết
Mô tả gốc của tác giả
How iii works and the iii-sdk surface for authoring workers, triggers, and functions. Teaches the ordered way to gain a capability before writing code — (1) check functions already registered in the engine, (2) search the public registry via iii-directory, (3) build a worker. Single self-contained skill — meant for system-prompt injection; do not re-fetch.
repo: iii-hq/iii
Độ phổ biến
- Sao GitHub
- 19k
- Vị trí xếp hạng
- #10487
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
iii-sandbox
19kGiúp agent của bạn chạy mã không đáng tin hoặc do AI tạo ra một cách an toàn trong một máy ảo cô lập tạm thời, rồi hủy khi xong việc.
configuration
19kCho phép agent của bạn thiết lập một registry chung gồm các giá trị cấu hình được đặt tên, kiểm tra theo schema, để các worker có thể đọc và phản ứng với thay đổi.
iii-observability
19kGiúp agent của bạn thêm tracing, log có cấu trúc, metric và cảnh báo vào engine iii, dùng OpenTelemetry để bạn thấy hệ thống đang làm gì.
iii-stream
19kGiải thích worker iii-stream cho dữ liệu trực tiếp. Đã lỗi thời và sẽ bị gỡ trong bản phát hành tới, nên hãy lên kế hoạch chuyển đi.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.