azldev-comp-toml
Skill này làm gì
Skill này giải thích định dạng các file thành phần azldev, dùng để đặt nguồn đặc tả của một gói và cách nó được tùy chỉnh. Nó dành cho lập trình viên duy trì các định nghĩa gói trong một bản phân phối azldev.
Khi nào nên dùng
- ✓Khi bạn cần tạo hoặc chỉnh sửa một file định nghĩa thành phần.
- ✓Khi xem xét một file thành phần để tìm lỗi hoặc cài đặt không cần thiết.
- ✓Khi bạn muốn thay đổi cài đặt build hoặc cách tính toán phát hành của một gói.
Liên kết skill
https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-comp-toml/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
“Bạn có thể xem xét file thành phần jq của tôi và cho biết những cài đặt nào tôi có thể xóa vì trùng với mặc định không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đọc cấu trúc file thành phần và schema, rồi kiểm tra nguồn đặc tả, cài đặt build và overlay. Nó gợi ý thay đổi phù hợp với định dạng của công 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.
Component definition files (*.comp.toml)
A component definition tells azldev where a package's spec comes from and how to
customize it for your distro. Every component lives under [components.<name>].
Get the authoritative, always-current field list from the schema:
azldev config generate-schema
Structure
A bare entry inherits everything from your distro's defaults — most upstream packages need nothing more:
[components.curl]
Add sub-tables only for what you change. The fields you will reach for most:
| Field | Purpose |
|---|---|
spec |
where the spec comes from (see below) |
overlays / overlay-files |
targeted spec/source edits (see the azldev-overlays skill) |
build.defines / build.with / build.without |
RPM macro and bcond build tweaks |
release.calculation |
how the Release tag is managed |
render.skip-file-filter |
rendering edge-case escape hatch |
Spec source
The spec field selects where the spec is fetched from. When omitted, the component
inherits the distro default (normally an upstream import).
# Upstream import (the usual case) — inherits the distro's upstream version
[components.curl]
# Upstream, but pinned to a specific upstream distro/version
[components.curl]
spec = { type = "upstream", upstream-distro = { name = "fedora", version = "rawhide" } }
# Upstream package whose name differs from the component name
[components.mydistro-rpm-config]
spec = { type = "upstream", upstream-name = "redhat-rpm-config" }
# Local spec that lives in your repo (not imported from an upstream distro)
[components.mydistro-release]
spec = { type = "local", path = "mydistro-release.spec" }
Build configuration
[components.mypackage.build]
defines = { rhel = "11" } # override RPM macros
with = ["feature_x"] # enable %bcond_with conditionals
without = ["plugin_rhsm"] # disable %bcond_with conditionals
Release calculation
release.calculation controls the Release: tag. There are four modes:
auto(default) — leave%autoreleaseunchanged; otherwise bump a static integer Release once for each fingerprint-derived synthetic change.autorelease— force%autoreleasehandling (use when auto-detection misreads a spec that wraps%autoreleasein a conditional).static— require a non-%autoreleasestatic release. The default legacy calculation supports only an integer,integer%{?dist}, orinteger%{dist}; other forms requiremanualor an overlay.manual— you own theRelease:value. Use this only when render fails with a "non-standard Release tag" error. Amanualcomponent is not bumped by the render/commit/amend cycle, so increment its release yourself in the same change (see theazldev-update-componentskill).
[components.mypackage.release]
calculation = "manual"
The temporary --rpmdev-bumpspec flag on comp build, comp render, and
comp prepare-sources opts into transactional host handling while Azure Linux
migrates. Only that path requires rpmdev-bumpspec, rpmdev-packager, rpm,
rpmspec, and Python with its RPM module. It preserves the fixed team
identity/comment/datestamp and strict source-EVR transaction checks; locks and
synthetic history still determine the number and order of bumps. Without the
flag, no bumpspec runtime discovery occurs and the legacy static calculation is
used. %autorelease behavior is unchanged on either path.
Render configuration
render.skip-file-filter = true keeps all source and patch files during render.
azldev normally prunes files not referenced by the rendered spec; set this only for
the rare spec whose Source/Patch filenames use macros the filter cannot expand.
File organization
- Inline — put simple, customization-free components directly in a shared config
file (e.g.
[components.jq]). - Dedicated — give a component its own
<name>/<name>.comp.tomlonce it needs overlays, build config, or a local spec. Rule of thumb: anything more than[components.<name>]earns a dedicated file. - A parent config picks up dedicated files through an
includesglob, for exampleincludes = ["**/*.comp.toml"].
Review checklist
Start with azldev comp list -p <name> -q -O json, then use
azldev comp query -p <name> -q -O json when the review needs parsed spec details.
For a change review, focus on the diff while checking enough surrounding context to
ensure
Câu hỏi thường gặp
Một file thành phần có thể rất ngắn không?
Có. Skill ghi rằng một mục trần kế thừa mặc định, nên hầu hết gói upstream gần như không cần thêm gì.
Danh sách trường chính xác ở đâu?
Skill yêu cầu tạo schema bằng lệnh config của công cụ thay vì dựa vào trí nhớ.
Overlay là gì?
Đó là một bản vá được áp dụng cho đặc tả của gói khi build, thay vì phải fork đặc tả.
Chi tiết
Mô tả gốc của tác giả
Read this before authoring, editing, or reviewing a *.comp.toml file; do not work from memory. Explains the azldev component definition format and review workflow, covering component structure, spec sources, build config, release calculation, render options, file organization, overlay hygiene, stale files, disabled tests, and testing verification. Triggers include comp.toml, component config, review component, component hygiene, spec source, upstream-distro, build defines, release calculation, includes.
repo: microsoft/azurelinux
Độ phổ biến
- Sao GitHub
- 5.4k
- Vị trí xếp hạng
- #14962
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
azldev-add-component
5.4kGiúp agent của bạn thêm một thành phần phần mềm mới vào bản build phân phối Linux azldev, từ việc kiểm tra đặc tả upstream đến xác thực kết quả.
azldev-build-component
5.4kGiúp agent của bạn build và gỡ lỗi một gói azldev, bao gồm vòng lặp render, build và kiểm thử cùng cách sửa các kiểm tra build bị lỗi.
azldev-image
5.4kGiúp agent của bạn build, khởi động và kiểm thử một image Linux, chẳng hạn image container hoặc máy ảo, bằng các lệnh image của azldev.
azldev-mock
5.4kGiúp agent của bạn kiểm thử và kiểm tra các gói đã build trong một môi trường build mock, để chúng không bao giờ chạm vào máy tính của bạn.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.