grade-iterate – skill Agent & Tự động hóa cho agent AI
Giai đoạn 3 khi xây dựng Claude Managed Agent — vòng lặp chấm điểm→lặp lại có giới hạn. Định nghĩa outcome CMA (rubric markdown bắt buộc do grader độc lập chấm), đọc từng kết quả, quyết định bước tiếp theo (chỉnh sửa / chạy lại / chuyển sang lịch chạy), và khi một phiên bản đạt yêu cầu, chạy song song các case đánh giá giữ lại. Dùng khi người dùng
Cài skill grade-iterate bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/grade-iterate-3b361.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /grade-iterate – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/grade-iterate-3b361.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $grade-iterate – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/grade-iterate-3b361.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /grade-iterate – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/grade-iterate-3b361.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /grade-iterate – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Phase 3 — Grade → Iterate (the bounded loop)
This is the plugin's loop: CMA's outcome primitive self-grades the agent's
work in an isolated context and feeds failing verdicts back for the next attempt.
It is always bounded by max_iterations (1..20) — never "improve forever".
See [../../references/loops-and-workflows.md](../../references/loops-and-workflows.md)
and the outcome section of
[../../references/cma-primitives.md](../../references/cma-primitives.md).
Workflow
1. Define the outcome.
python3 scripts/outcome_builder.py \
--sheet ./my-agent/build-sheet.json --max-iterations 5 \
--out ./my-agent/payloads/outcome.json
The rubric is required; max_iterations is clamped to 1..20. Send the
payload as a user.define_outcome event (append to the running session).
2. Read every verdict first.
python3 scripts/verdict_reader.py --result ./my-agent/last-verdict.json
Tables the rubric outcome and recommends: SHIP (satisfied), SHARPEN
then re-run (needs_revision), ESCALATE (max_iterations_reached /
failed), RESUME (interrupted). With ≤1 iteration left it flips to
"make the single highest-value fix or escalate now".
3. Loop invariant. Each iteration must move ≥1 rubric line fail→pass, or the
run halts at the cap and escalates. Don't burn the budget on cosmetic edits.
4. Once a version passes, run held-back eval.
python3 scripts/eval_scaffold.py \
--sheet ./my-agent/build-sheet.json --out ./my-agent/eval.json --concurrency 5
Held-back cases (never seen during iteration) run in parallel, capped at the
25-thread CMA ceiling, each graded against the same rubric.
5. Decide. SHIP as v0, or promote to a scheduled deployment (Phase 4). Record
the verdict on the goal: goal_state.py set --phase run-without-you.
Hard rules
- Bounded, always. No outcome without a
max_iterationscap. - Read the verdict before acting. The grader's explanation drives the next move.
- Held-back cases are held back. Never grade generalization on cases the agent
already iterated against.
Forcing-question library (recommend + cite)
1. "What are the 3–5 rubric lines?" *Recommend:* grounded, checkable criteria.
*Cite:* cma-primitives.md (rubric required).
2. "How many iterations before you'd rather look yourself?" *Recommend:* 3–5.
*Cite:* loops-and-workflows.md (bounded loop).
3. "On a fail, sharpen the prompt or the tools?" *Recommend:* whichever rubric line
failed points to. *Cite:* verdict_reader next-move table.
4. "Which cases did the agent NOT see?" *Recommend:* hold back ≥3 for generalization.
*Cite:* this SKILL (held-back eval).
Tools
scripts/outcome_builder.py— user.define_outcome payload (rubric required, cap 1..20).scripts/verdict_reader.py— grader result → next move.scripts/eval_scaffold.py— held-back cases + parallel run plan (≤25 threads).
Skill liên quan
- buywhere-product-catalog – Dùng các bề mặt MCP và API của BuyWhere để thêm tìm kiếm sản phẩm, so sánh giá và khám…
- cal-com-automation – Tự động hóa tác vụ Cal.com qua Rube MCP (Composio): quản lý đặt lịch, kiểm tra lịch…
- calendly-automation – Tự động hóa lên lịch Calendly, quản lý sự kiện, theo dõi người được mời, kiểm tra lịch…
- handoff – Cô đọng cuộc trò chuyện hiện tại thành tài liệu bàn giao cho agent khác tiếp nhận, tham…
- llm-prompt-injection – Dùng khi kiểm thử ứng dụng LLM đã được ủy quyền về prompt injection, lộ system prompt…
- canva-automation – Tự động hóa tác vụ Canva qua Rube MCP (Composio): thiết kế, xuất file, thư mục, template…
- m365-entra-attack – Chuỗi tấn công red-team Microsoft 365 / Entra ID, thực trạng năm 2026. Tham chiếu mã…
- hub-init – Tạo phiên cộng tác AgentHub mới với nhiệm vụ, số lượng agent và tiêu chí đánh giá. Dùng…