iii-core-primitives
Skill này làm gì
Giải thích các khối xây dựng cơ bản của iii: hàm, trigger và worker, và cách đăng ký từng loại. Dành cho lập trình viên viết mã cho hệ thống iii bằng TypeScript, Python hoặc Rust.
Khi nào nên dùng
- ✓Khi bạn cần đăng ký một hàm mới hoặc gắn một trigger vào nó.
- ✓Khi bạn muốn một hàm chạy sau khi một hàm khác được gọi.
- ✓Khi bạn muốn xem những worker và hàm nào đang kết nối.
Liên kết skill
https://github.com/iii-hq/iii/blob/main/skills/iii-core-primitives/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
“Đăng ký một hàm tên orders::validate bằng TypeScript và làm cho nó chạy mỗi khi có đơn hàng mới.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill chỉ cách đăng ký một hàm với một handler và gắn nó vào một nguồn sự kiện, như lịch trình hoặc hàng đợi. Nó cũng nói về observer, chúng chạy một hàm đích sau khi hàm khác được gọi, và cách gọi hàm trực tiếp hoặc chạy nền.
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.
Core Primitives
iii has three top-level primitives:
- Function: a named unit of work such as
orders::validate - Trigger: an event source bound to a function
- Worker: a process that connects to the engine and executes functions
Since 0.25 every function is also observable: iii.observe(source, target) invokes target
on each invocation of source that passes its filters. Observers replace trigger bindings over
time; the built-in providers (http, cron, queue, state, stream, pub/sub, database) still
use trigger types in 0.25, so keep registerTrigger for them. See iii-observe.
Use :: in function IDs, leading slashes in HTTP api_path, and expression for cron config.
Function Registration
Register local handlers when you control the implementation. Register HTTP-invoked functions when iii should call an existing external endpoint.
| Shape | Use for |
|---|---|
registerFunction(id, handler, options?) |
Local worker code |
registerFunction(id, HttpInvocationConfig, options?) |
Existing HTTP services |
registerTrigger({ type, function_id, config, metadata? }) |
Binding a built-in event source (deprecated in 0.25, still required for providers that have not migrated) |
observe({ function_id, args?, filters? }, target, options?) |
Running target after another function's invocations, or on an engine event (iii-observe) |
trigger({ function_id, payload, action?, timeout? }) |
Calling any function by ID |
Functions and triggers can carry metadata for ownership, discovery, and generated skills. Do not put secrets in metadata.
Workers and Registry
A worker is any process that connects to the engine and registers functions or trigger types. There are two common paths:
| Task | Use |
|---|---|
| Create your own worker | Write SDK code that calls registerWorker, registerFunction, and registerTrigger or observe |
| Add an existing capability | Browse https://workers.iii.dev/, then call compose::add worker=<name> |
| Pin a worker version | compose::add worker=<name>@<version> |
| Declare a local worker | Add worker: path://./workers/my-worker under containers: |
| Reproduce a project | Commit the exact versions in worker-compose.yaml |
The public worker registry at workers.iii.dev is for installable workers such as HTTP, state,
queue, pub/sub, cron, database, shell, console, rbac-proxy, and other capability workers.
(iii-sandbox and iii-observability are engine-owned and are not added through the registry.) Those workers may ship their own function-level skills; do not duplicate every capability
as a top-level iii skill.
Worker Manifest
Use iii.worker.yaml when iii should start a local worker project:
name: math-worker
runtime:
kind: python
package_manager: pip
entry: math_worker.py
scripts:
install: "pip install -r requirements.txt"
start: "python math_worker.py"
The manifest describes how to start the process. Once running, the WebSocket connection and function registrations are what make the worker part of iii.
Live Engine Registry
The engine keeps a live registry of connected workers, registered functions, triggers, and trigger types. Read it through the built-in discovery functions:
| Function | Returns |
|---|---|
engine::workers::list |
Connected workers and metrics |
engine::functions::list |
Registered functions |
engine::triggers::list |
Registered triggers |
engine::trigger-types::list |
Advertised trigger types and schemas |
engine::observers::list |
Observers you may see (function_id, namespace, worker filters) |
For topology changes, observe the engine-hosted sources engine::on-workers-changed or
engine::on-functions-changed with deliver: 'input' (see iii-observe). The older
engine::workers-available and engine::functions-available trigger types still fire.
Built-In Trigger Shapes
The workers behind these types have not moved to source functions in 0.25, so bind them with
registerTrigger. Each call logs a one-time deprecation warning per process; it is informational
and the binding works as before. For log, the engine also hosts the observability::on-log
source (iii-observe).
| Trigger type | Registration config | Handler payload |
|---|---|---|
http |
{ api_path: "/orders/:id", http_method: "POST" } |
{ query_params, path_params, headers, path, method, body } |
cron |
`{ expression: "0 0 9 * * * |
Câu hỏi thường gặp
Observer là gì?
Observer chạy một hàm đích sau mỗi lệnh gọi tới hàm khác, mà không thay đổi hàm đó.
Mã định danh hàm dùng định dạng gì?
Chúng dùng dấu hai chấm kép, ví dụ orders::validate.
Nó có cài worker từ registry không?
Có. Skill bao gồm cách cài worker từ registry công khai.
Chi tiết
Mô tả gốc của tác giả
Use when registering iii functions, binding triggers, observing functions, selecting sync/void/enqueue invocation, creating workers, inspecting the live worker registry, installing registry workers, authoring event sources, moving channel data, or adapting external HTTP functions across TypeScript, Python, and Rust.
repo: iii-hq/iii
Độ phổ biến
- Sao GitHub
- 19k
- Vị trí xếp hạng
- #10492
- 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
19kDạy agent của bạn cách các worker iii hoạt động, để nó có thể thêm một khả năng bằng cách kiểm tra trước những gì đã có, rồi xây một worker.
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ì.
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á.