harness-engineering
Skill này làm gì
Skill này giải thích cách đặt ranh giới cho một agent AI chạy tự động, chẳng hạn nó được phép thay đổi gì, cách nó ghi nhật ký tiến trình và khi nào người phải phê duyệt. Nó dành cho các nhóm chạy vòng lặp agent tự động.
Khi nào nên dùng
- ✓Khi bạn muốn một agent AI chạy nghiên cứu hoặc thí nghiệm lâu dài mà không cần nhắc liên tục.
- ✓Khi bạn cần ngăn agent thay đổi quy tắc chấm điểm hoặc benchmark của chính nó.
- ✓Khi bạn thiết lập một agent chuẩn bị pull request và cần các bước phê duyệt.
Liên kết skill
https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/main/skills/harness-engineering/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 kế một thiết lập an toàn cho agent chạy thí nghiệm qua đêm, với một cách chấm điểm cố định và một bước người phê duyệt trước khi bất cứ thứ gì được merge.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill mô tả các phần bị khóa và có thể chỉnh sửa, nhật ký bền vững, kiểm tra tính mới, khôi phục và các điểm phê duyệt, để vòng lặp chạy mà không đi lệch hướng.
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.
Harness Engineering
Harness engineering designs the control system around an agent: what it may edit, how it receives feedback, where it writes state, how failures recover, and who can approve irreversible actions. The harness is the difference between a helpful agent session and an autonomous loop that can run for days without corrupting its objective.
When to Activate
Activate this skill when:
- Building autonomous research or experimentation loops
- Designing an agent environment with locked metrics and editable code or content
- Creating PR-producing or background agents
- Evaluating whether an agent can safely run without frequent human prompts
- Adding novelty, ablation, pruning, rollback, or durable logging to an agent workflow
- Preventing agents from gaming benchmarks, weakening rubrics, or losing state across compaction
Do not activate this skill for adjacent work owned by other skills:
- General quality gates, regression suites, or outcome metrics without autonomous control surfaces:
evaluation. - Tool schemas, response formats, and recovery errors for harness tools:
tool-design. - Project-level task-model fit, pipeline shape, and cost planning:
project-development. - Remote sandbox, warm-pool, and hosted session infrastructure:
hosted-agents.
Core Concepts
Harness Boundary
Separate the agent from the environment it operates inside. The agent proposes actions; the harness defines allowed surfaces, feedback, persistence, and promotion rules.
Use four surface classes:
| Surface | Examples | Rule |
|---|---|---|
| Locked | Eval metric, rubric, validation script, merge policy | Agent may read and propose changes, but cannot score itself with modified rules |
| Editable | Skill draft, experiment file, prompt, config under test | Agent may mutate during the loop |
| Append-only | Results log, research thread, rejected ideas | Agent may append, not rewrite |
| Human-controlled | Merge, production deploy, credentials, destructive operations | Requires explicit human approval |
Tight Feedback Loops
Autonomy works when feedback is fast, unambiguous, and hard to game. Karpathy's autoresearch is the minimal pattern: one editable file, one locked evaluation file, fixed wall-clock budget, one scalar metric, git rollback, and a durable results log. The lesson is not that every harness needs one metric; it is that ambiguous feedback creates ambiguous autonomy.
For open-ended research-to-skill work, replace the scalar metric with locked rubrics, deterministic structure checks, source traceability, and human review thresholds.
Durable State
Long-running agents must externalize state. Store plans, source queues, results, failures, and handoffs in files so future agents can resume without relying on chat history. Prime Intellect's autonomous nanoGPT work showed the value of durable scratchpads and THREAD.md-style logs for recovery, monitoring, and audit.
Use append-only logs for:
- What was tried
- What improved or failed
- Why a candidate was kept, discarded, or routed to review
- Which upstream sources were checked
- What the next agent should do
Search Discipline
Agents tend to exploit the nearest surface, stack complexity, and under-run pruning. Add explicit search rules:
- Refresh upstream sources on a schedule.
- Require novelty checks before spending large budgets.
- Preserve rejected attempts to avoid rediscovery.
- Run leave-one-out pruning when a stack has multiple additions.
- Reward simplification when quality is equal.
- Use separate verification before promotion.
Mechanism Registry
For research-to-skill systems, track accepted mechanisms separately from prose. A mechanism record should include a stable mechanism_id, owning_skill, status, activation scenario, behavior change, evidence, and failure modes. Novelty gates should compare against this registry before using broader corpus overlap, because keyword overlap catches stale phrasing while mechanism comparison catches real duplication.
Governance
Autonomous agents may prepare PRs, but governance must be explicit. They can draft changes, run checks, and write PR summaries. They should not merge, deploy, or push without human approval unless the user has explicitly granted that permission for the specific action.
Detailed Topics
Autoresearch-Style Loop
Use this pattern when optimizing an artifact against a stable evaluator:
read locked context -> choose hypot
Câu hỏi thường gặp
Phần bị khóa là gì?
Đó là một phần của thiết lập, chẳng hạn phương pháp chấm điểm, mà agent không được phép thay đổi.
Vì sao cần nhật ký?
Nhật ký bền vững cho cả agent và con người thấy những gì đã thử, giúp phục hồi sau lỗi.
Khi nào người can thiệp?
Skill xác định các điểm phê duyệt của con người trước những hành động không thể đảo ngược, như merge thay đổi.
Chi tiết
Mô tả gốc của tác giả
This skill should be used when designing autonomous agent harnesses: research loops, evaluation scaffolds, locked and editable surfaces, durable logs, novelty gates, pruning, rollback, PR preparation, and human approval boundaries.
Độ phổ biến
- Sao GitHub
- 18k
- Vị trí xếp hạng
- #10643
- Giấy phép
- MIT
- Cập nhật
- 11/10/2026
Bình luận
- …
Thêm skill từ kho mã này
context-engineering-collection
18kGiúp agent của bạn quản lý những gì đưa vào cửa sổ ngữ cảnh của model AI, từ bộ nhớ và công cụ đến thiết lập nhiều agent và đánh giá.
advanced-evaluation
18kDạy agent của bạn cách đánh giá câu trả lời AI bằng một AI khác, với chấm điểm, so sánh cạnh nhau và kiểm tra thiên lệch.
bdi-mental-states
18kDạy agent của bạn mô hình hóa niềm tin, mục tiêu và kế hoạch bằng cách tiếp cận BDI, để các quyết định của nó có thể được truy vết và giải thích.
context-compression
18kGiúp agent của bạn rút gọn các phiên AI dài thành bản tóm tắt giữ lại quyết định, file, rủi ro và bước tiếp theo.
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.