azldev-add-component
Skill này làm gì
Skill này hướng dẫn cách thêm một gói vào bản build phân phối dựa trên azldev. Nó dành cho lập trình viên đóng gói phần mềm cho một bản phân phối được build bằng azldev.
Khi nào nên dùng
- ✓Khi bạn muốn thêm một gói mới vào bản build phân phối azldev.
- ✓Khi bạn cần nhập một gói upstream và quyết định các thay đổi nằm inline hay trong một file riêng.
- ✓Khi bạn đang xác thực một thành phần mới bằng các bước render, diff và build.
Liên kết skill
https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-add-component/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
“Tôi cần thêm gói jq vào bản phân phối azldev của chúng tôi. Bạn có thể hướng dẫn tôi kiểm tra đặc tả upstream và xác thực bản build không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent xác nhận thành phần chưa tồn tại, ghim nguồn của nó, đọc đặc tả upstream, rồi thiết lập cấu hình và kiểm tra render và build. Nó làm theo các bước trong quy trình làm việc của chính 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.
Add a component
Before you start
Confirm the component does not already exist:
azldev comp list -p <name> -q -O json
Inspect the upstream spec first
The reliable way to see what you are importing (direct web fetches of upstream dist-git often fail bot detection):
Add a bare entry so azldev can resolve the component: run
azldev comp add <name>(it appends[components.<name>]to the root config file), or hand-add[components.<name>]to an included config file if you want it to live elsewhere. A bare root entry is perfect for initial testing, but real distros will usually segment the configuration into included files. Once the initial pass is done, ensure the component is in the right place and remove the root entry.Create the initial lock so source resolution is pinned before inspection:
azldev comp update -p <name>Pull the sources without overlays into a scratch dir under the work dir:
azldev comp prep-sources -p <name> --skip-overlays --force -o base/build/work/scratch/<name> -qRead the spec and plan any overlays.
Inline vs dedicated file
Inline — a bare upstream import with no changes stays in a shared config file:
[components.jq]Dedicated — anything that needs overlays, build config, or a local spec gets its own
<name>/<name>.comp.toml. Rule of thumb: more than[components.<name>]earns a dedicated file. Anincludes = ["**/*.comp.toml"]glob picks it up automatically.
azldev comp add <name> [<name>...] adds bare [components.<name>] entries that inherit
the distro defaults; it writes to the root config file and does not scaffold spec or
source files. If your distro keeps components in included or dedicated files, move the
entry there afterward.
Customize
For spec source types and overlays, read the azldev-comp-toml and azldev-overlays skills. Key
points when adding a component:
- Prefer overlays over forking the spec — overlays get upstream updates for free. Forking a spec is a last resort and a long-term maintenance commitment. Get explicit user sign-off first, document every change, and keep the delta minimal.
- Every overlay needs a
descriptionexplaining why it is needed. - Keep
%checkenabled. Disable it only as a last resort viabuild.check.skip = truewith a requiredbuild.check.skip_reason(see theazldev-build-componentskill).
Validate
The initial lock pins the upstream revision you inspected. Refresh it after the component inputs settle, then validate:
azldev comp update -p <name> # resolve the upstream commit and write the lock
azldev comp render -p <name> # apply overlays and write the rendered spec
azldev comp diff-sources -p <name> # see exactly what the overlays change
azldev comp build -p <name> # build the RPMs
Inspect the rendered spec under specs/. A new component always needs a
smoke test — see the azldev-build-component and azldev-mock skills.
After all component inputs are final, run azldev comp update -p <name> again and
re-render. Stage the component definition and sources, locks/<name>.lock, and
the rendered output before committing. Then re-render, stage
specs/<first-char>/<name>/, and amend the commit so %changelog and
Release: reflect it. See the azldev-update-component skill for the complete
finalization workflow.
Generated by azldev docs agent; do not hand-edit.
Câu hỏi thường gặp
Tôi có nên đoán chi tiết upstream không?
Không. Skill yêu cầu kiểm tra đặc tả upstream trước thay vì đoán từ trí nhớ.
Khi nào cần file riêng?
Skill ghi rằng một thành phần cần overlay, cài đặt build hoặc đặc tả cục bộ sẽ có thư mục cấu hình riêng.
Có cài các gói đã build lên máy tính của tôi không?
Không. Skill ghi rằng gói đã build nên được kiểm thử trong môi trường build mock, không cài lên máy chủ.
Chi tiết
Mô tả gốc của tác giả
Read this before adding or importing a component; follow the workflow instead of guessing. Explains how to add a new component to an azldev distro, covering inspecting the upstream spec, the inline-versus-dedicated-file decision, and validating with render, diff-sources, and build. Triggers include add component, new package, import package, create comp.toml, new component.
repo: microsoft/azurelinux
Độ phổ biến
- Sao GitHub
- 5.4k
- Vị trí xếp hạng
- #14960
- 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-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-comp-toml
5.4kGiúp agent của bạn viết, chỉnh sửa và xem xét các file định nghĩa thành phần mà azldev dùng để mô tả cách mỗi gói được build.
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.