ai-loop
Skill này làm gì
Công cụ này tổ chức công việc lập trình thành các bước rõ ràng: lập kế hoạch (đặc tả), xây dựng và xem xét. Nó đảm bảo AI làm theo chỉ dẫn của bạn một cách chính xác, kiểm tra công việc ở mỗi giai đoạn và xin ý kiến bạn cho các hành động quan trọng.
Khi nào nên dùng
- ✓Khi bạn muốn AI tạo một thứ mới từ đầu, theo một kế hoạch.
- ✓Khi công việc cần được chia nhỏ thành các phần nhỏ với quy tắc rõ ràng.
- ✓Khi bạn muốn AI tự kiểm tra công việc của mình trước khi giao.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ai-loop/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 muốn tạo một hàm Python tính trung bình cộng của một danh sách số. Hàm nên bỏ qua các giá trị không phải số và trả về 0 nếu danh sách rỗng.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Đầu tiên, AI hiểu bạn muốn gì (đặc tả). Sau đó, nó xây dựng code theo đặc tả đó. Cuối cùng, nó xem xét code để kiểm tra mọi thứ có đúng không, lặp lại quy trình nếu cầ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.
AI-Loop Skill
Overview
The ai-loop skill structures a bounded development cycle for agentic workflows. By dividing the process into distinct planning (Spec), implementation (Build), and validation (Review) phases, it helps an agent build and correct scoped code changes while keeping requirements, risk gates, and stop conditions explicit.
When to Use This Skill
- Use when you need a feature built from scratch or heavily modified, and you want the agent to handle the lifecycle (specification, implementation, and verification) inside one clearly bounded workflow.
- Use when working with isolated components, modules, or features that have well-defined scopes and constraints.
- Use when the user asks for a complete development pass but the work still has clear success criteria, a reasonable verification path, and no unresolved safety or product decisions.
How It Works
This skill executes a controlled development loop composed of three phases: Spec, Build, and Review. When invoked, the agent moves through those phases until the scoped requirements pass verification, a stop condition is reached, or human approval is needed.
Before starting, define:
- The maximum number of build-review iterations.
- The verification commands or manual checks that count as evidence.
- The actions that require explicit approval, such as destructive commands, production changes, external service writes, or broad architectural pivots.
Phase 1: Spec (Planning)
- Reuse the current request, accepted plan and existing artifacts. Ask only for essential missing scope or acceptance criteria; do not repeat answered questions.
- Do not start building yet.
- When you have enough information, use the existing specification or, when needed, save a scoped new one at
specs/<feature-name>.mdwithout overwriting user work. - The spec must include:
- The objective
- The exact requirements
- Edge cases to handle
- A concrete definition of done that someone could check the build against
- The iteration budget, verification commands, and approval gates.
Phase 2: Build (Implementation)
- Read the spec you just created in
specs/<feature-name>.md. - Build exactly what it describes.
- Do not add features, do not refactor unrelated code, and do not invent requirements that aren't in the spec.
- Focus strictly on fulfilling the spec. List which spec requirements you covered so the review step can check them.
Phase 3: Review (Verification)
- Compare your implementation against
specs/<feature-name>.md. - Go requirement by requirement and verify if it was met. List every gap, bug, or missing piece, naming the exact spec item each one fails.
- If anything fails and the iteration budget is not exhausted, write the specific fixes needed and loop back to Phase 2 (Build) to address them.
- Use the agreed iteration/resource limits and scope. Ask for material product or consequential authorization decisions that are not already resolved; routine repairs within the accepted outcome need no new checkpoint. Continue independent work when a dependent check is unavailable.
- Only pass the build and conclude the skill execution when every requirement in the spec is fully met and the declared verification evidence has passed.
Examples
Example 1: Creating a Basic Statistics Helper
User:
I want to add a utility for calculating basic statistics (mean, median, mode) of an array of numbers.
Agent (Phase 1 - Spec):
I can help with that. To get started, what programming language should this statistics calculator be implemented in? Also, how should empty arrays or invalid inputs be handled?
User:
JavaScript. If the array is empty, return null. If there are non-numbers, ignore them.
Agent (Phase 1 - Spec):
Thank you. I have created the specification file at
specs/stats-calculator.mdwith the requirements we discussed. Now, I will start implementing it.
Agent (Phase 2 - Build):
(Creates
stats_calculator.jsand implementsmean,median, andmodematching the spec exactly) I have finished implementing the calculator. I will now verify the implementation.
Agent (Phase 3 - Review):
Checking implementation against
specs/stats-calculator.md:
- Requirement: mean calculation -> PASS
- Requirement: median calculation -> PASS
- Requirement: mode calculation -> PASS
- Requirement: empty array returns null -> PASS
…
Câu hỏi thường gặp
“Approval gates” là gì?
Đó là các thời điểm AI dừng lại và hỏi ý kiến bạn trước khi làm điều gì rủi ro, như thay đổi code lõi hoặc xóa dữ liệu.
Điều gì xảy ra nếu AI không thể hoàn thành công việc?
Nó sẽ cho bạn biết còn thiếu gì và vì sao không hoàn thành được, đồng thời tuân theo các giới hạn bạn đặt (như số lần thử).
AI có thể tạo mọi loại code không?
Công cụ phù hợp nhất với các tác vụ được định nghĩa rõ ràng và độc lập. Với những thay đổi rất lớn hoặc ảnh hưởng nhiều phần hệ thống, đây có thể không phải lựa chọn tốt nhất.
Chi tiết
Mô tả gốc của tác giả
Runs a bounded spec-build-review development loop with explicit scope, stop conditions, and human approval gates for risky or ambiguous work.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #3709
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.