configuration
Skill này làm gì
Lưu các giá trị cấu hình được đặt tên với một schema kiểm tra từng giá trị, để các worker trong hệ thống đọc cùng một bộ thiết lập từ một nơi. Dành cho lập trình viên xây hệ thống dựa trên iii cần thiết lập chung đã được kiểm tra.
Khi nào nên dùng
- ✓Khi nhiều worker cần thống nhất cùng một thiết lập mà không cần đường dẫn tệp cứng.
- ✓Khi bạn muốn một giá trị cấu hình được kiểm tra theo schema trước khi dùng.
- ✓Khi bạn muốn một worker phản ứng với thay đổi thiết lập mà không cần polling.
Liên kết skill
https://github.com/iii-hq/iii/blob/main/engine/src/workers/configuration/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
“Thiết lập một mục cấu hình chung cho dịch vụ thanh toán của tôi, với schema kiểm tra các giá trị của nó.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Mỗi worker đăng ký schema cấu hình của nó một lần khi khởi động, rồi công bố các giá trị của mình. Các worker khác đọc những giá trị đó, và một trigger được gắn sẵn sẽ kích hoạt khi giá trị thay đổi. Lưu trữ mặc định giữ một tệp YAML cho mỗi mục.
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.
configuration
The configuration worker is a server-side registry of named entries. Every entry has an id (e.g. iii-stream, billing-service), a human-readable name and description, a JSON Schema describing the value shape, and a JSON value validated against that schema. Workers call configuration::register once at startup to declare their schema and configuration::set to publish values; consumers call configuration::get / configuration::list to read and bind a configuration trigger to react to changes without polling.
The default fs adapter persists one YAML file per id under ./config and watches the directory for external edits, so manual edits surface as configuration:updated events. The bridge adapter delegates to a remote engine. The worker is engine-owned and may be configured at engine.workers.configuration.
A per-id TTL (off by default) cleans up entries whose last subscriber trigger has unregistered, scoped to the lifecycle of ephemeral workers that come and go without an explicit teardown step.
When to Use
- A worker needs a typed, observable configuration surface other workers can read and validate against.
- Two workers need to agree on the same configuration values without one polling the other or hardcoding a path on disk.
- An operator should be able to edit a single YAML file (or the remote control plane) and have the change propagate to every subscriber without a worker restart.
- A worker comes and goes (sandboxes, ephemeral consumers) and its configuration should be cleaned up automatically when no one is left subscribing.
Boundaries
- Not a general-purpose key/value store — every entry must have a registered JSON Schema. Use the standalone
stateworker for free-form values. - No partial-update surface;
setalways replaces the whole value. Build the new value client-side and ship it in one call. - The
bridgeadapter cannot delete entries on the remote engine; cleanup over the bridge happens via TTL or directly on the source engine. - Over the
bridgeadapter,configuration::ensureis decided by the remote engine (the original candidate is forwarded there), so it requires a remote engine that exposesconfiguration::ensure; against an older remote it fails closed withADAPTER_ERRORrather than falling back to an unsaferegister. - Schemas are not version-checked across re-registrations — re-registering with an incompatible schema simply replaces it. Coordinate schema migrations out-of-band.
Migration and runtime overrides
Compose defaults to <namespace>-<container-key> without a hash (for example,
default-harness). Invalid or over-64-character generated names require explicit config_name.
Compose migrates only the exact previous namespace/key hash before starting a stopped worker.
After hashed migration, only the default namespace adopts the exact bare container key,
unless another container explicitly owns it. The bare source wins over an existing destination;
configuration::migrate is the single operation, delegated through bridges to the authority.
It returns { action, entry } with migrated, preserved (existing destination with absent
source, or matching IDs with an existing entry), or missing (both source and destination absent).
Before migration, Compose and every bridge hop query the read-only
configuration::migration-capabilities and require source_priority_archive_revision: 1.
Unknown or unavailable capabilities fail closed before invoking migration; upgrade the authority.
It replaces the destination with the raw source entry, then archives the original source as
<source>.yaml.bak. The previous destination is not backed up. .yaml.bak, .bak.yaml, and
.bkup.yaml files are ignored during loading, watching and legacy directory migration.
An existing identical backup permits cleanup recovery; a conflicting backup is never overwritten.
Missing source is a no-write no-op. Unsupported adapters fail closed.
Stop source consumers before migrating; do not share an fs directory between engine processes.
config_override is delivered through the existing service API. Compose reads the
current configuration with configuration::get (raw: true), merges defaults and
overrides, then calls configuration::set with flush: false before starting the
worker. No snapshot file is delivered. III_CONFIG_NAME identifies the entry.
Memory-only updates never write persistent config/<id>.yaml, and no delayed flush
is sched
Câu hỏi thường gặp
Các giá trị được lưu ở đâu?
Mặc định mỗi mục được lưu thành một tệp YAML trong thư mục cấu hình, và bạn cũng có thể chỉnh sửa trực tiếp.
Có thể nhận thay đổi mà không cần khởi động lại không?
Có. Một trigger kích hoạt khi một mục được cập nhật, nên các worker có thể phản ứng mà không cần polling.
Nó có dọn các mục cũ không?
Chỉ khi bạn bật cài đặt thời gian sống tùy chọn, cài đặt này xóa các mục không còn người đăng ký.
Chi tiết
Mô tả gốc của tác giả
Schema-validated, reactive registry for named configuration entries — the runtime configuration surface used by engine and Compose workers.
repo: iii-hq/iii
Độ phổ biến
- Sao GitHub
- 19k
- Vị trí xếp hạng
- #10486
- 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.
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ì.
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ự
api-connector-builder
280kGiúp agent của bạn xây dựng kết nối API mới theo đúng mẫu đã có, dùng khi bạn cần thêm một tích hợp mà không tạo cách làm mới.
api-design
280kGiúp agent của bạn thiết kế REST API theo các thực hành tốt nhất, hữu ích để định nghĩa cách API giao tiếp, hiển thị lỗi và tổ chức dữ liệu.
backend-patterns
280kGiúp agent của bạn với các mẫu kiến trúc phía máy chủ và tối ưu cơ sở dữ liệu, hữu ích khi xây dựng hoặc rà soát code chạy trên máy chủ.