Nâng caoAdvanced

Cài harness-kit như một Skill Install harness-kit as a Skill

Khi cài như skill, AI agent tự biết cách scaffold và validate harness — không cần giải thích lại mỗi lần. Trang này dành riêng cho luồng đó. When installed as a skill, the AI agent knows how to scaffold and validate harnesses automatically — no re-explaining each time. This page covers that flow.

Luồng cơ bản (one-liner)Basic flow (one-liner)
Cài governance files vào projectInstall governance files into a project
Dùng irm … | iex → tạo AGENTS.md, hk.py và 4 file khác. AI đọc AGENTS.md tự nhiên. Không cần trang này. Run irm … | iex → creates AGENTS.md, hk.py, and 4 more files. AI reads AGENTS.md naturally. You don't need this page.
Luồng nâng cao (trang này)Advanced flow (this page)
Cài như Skill — AI biết cả quy trìnhInstall as Skill — AI knows the full workflow
Copy thư mục skills/ vào IDE. Agent có thể tự scaffold harness mới, chạy validate, và audit mà không cần bạn giải thích lệnh. Copy the skills/ folder into the IDE. The agent can scaffold new harnesses, run validate, and audit without you explaining the commands.
Bước chung bắt buộc — Clone repo trước Required first step — Clone the repo

Để cài như skill, bạn cần thư mục skills/ từ repo harness-kit. Clone về một chỗ bất kỳ trên máy (không phải trong project của bạn): To install as a skill, you need the skills/ folder from the harness-kit repo. Clone it anywhere on your machine (not inside your project):

git clone --depth 1 https://github.com/nguyenanh92/harness-kit.git
cd harness-kit
Sau khi clone xong, cd vào harness-kit rồi chạy các lệnh copy bên dưới từ trong thư mục đó. After cloning, cd into harness-kit and run the copy commands below from inside that directory.
CC
Claude Code
Skill được phát hiện tự động qua SKILL.mdSkill auto-discovered via SKILL.md
1
Copy skill vào thư mục Claude CodeCopy the skill into the Claude Code directory

Cài user-level để dùng được từ mọi project. Hoặc cài project-level nếu chỉ dùng cho project hiện tại. Install user-level to use across every project. Or install project-level to scope to the current project only.

Windows — user-level (PowerShell, chạy từ trong harness-kit/)
Copy-Item -Recurse "skills" "$env:USERPROFILE\.claude\skills\harness-kit"
macOS / Linux — user-level (chạy từ trong harness-kit/)
cp -r skills ~/.claude/skills/harness-kit
Project-level — thay thế user-level (chạy từ trong harness-kit/)
# Windows
Copy-Item -Recurse "skills" ".\.claude\skills\harness-kit"

# macOS / Linux
cp -r skills ./.claude/skills/harness-kit
2
Kích hoạt trong chatActivate from chat

Claude Code tự phát hiện skill trong phiên hiện tại — không cần restart. Nói với agent: Claude Code auto-discovers the skill within the current session — no restart needed. Tell the agent:

"Dùng harness-kit để scaffold harness cho project hiện tại""Use harness-kit to scaffold a harness for the current project"
Claude đọc skills/SKILL.md để biết skill có những lệnh gì và chạy thế nào. Bạn không cần giải thích gì thêm. Claude reads skills/SKILL.md to learn what the skill does and how to invoke it. No further explanation needed.
3
Chạy thủ công (tùy chọn)Run manually (optional)

Nếu muốn chạy scaffold trực tiếp không qua chat, dùng đường dẫn tuyệt đối tới skill đã cài: To run the scaffolder directly without going through chat, use the absolute path to the installed skill:

Windows
py "$env:USERPROFILE\.claude\skills\harness-kit\scripts\scaffold_harness.py" --target .
macOS / Linux
python3 ~/.claude/skills/harness-kit/scripts/scaffold_harness.py --target .
CR
Cursor
Không có khái niệm skill — dùng .cursor/rules/ thay thếNo native skill concept — uses .cursor/rules/ instead
1
Copy SKILL.md thành Cursor RuleCopy SKILL.md as a Cursor Rule

Cursor inject hướng dẫn vào agent qua file .cursor/rules/*.mdc. Copy SKILL.md của harness-kit làm rule: Cursor injects guidance into the agent via .cursor/rules/*.mdc. Copy harness-kit's SKILL.md as a rule:

Windows (chạy trong thư mục project của bạn, từ harness-kit/)
New-Item -ItemType Directory -Force .cursor\rules | Out-Null
Copy-Item "skills\SKILL.md" ".cursor\rules\harness-kit.mdc"
macOS / Linux
mkdir -p /path/to/your-project/.cursor/rules
cp skills/SKILL.md /path/to/your-project/.cursor/rules/harness-kit.mdc
2
Thêm frontmatter vào file ruleAdd frontmatter to the rule file

Mở .cursor/rules/harness-kit.mdc và thêm frontmatter vào đầu file. Dùng alwaysApply: true để rule luôn active: Open .cursor/rules/harness-kit.mdc and prepend the Cursor frontmatter. Use alwaysApply: true for the rule to always be active:

---
description: Standard-library-only Python agent harness conventions
alwaysApply: true
---
... (nội dung SKILL.md tiếp theo)
Muốn scope theo file thay vì luôn bật? Đặt alwaysApply: false và thêm globs: **/*.py, AGENTS.md. Want to scope by file instead of always-on? Set alwaysApply: false and add globs: **/*.py, AGENTS.md.
3
Cài governance files vào projectInstall governance files into the project

Chạy one-liner install từ thư mục gốc project để có sẵn AGENTS.md và các file harness: Run the install one-liner from your project root to create AGENTS.md and the other harness files:

Windows
irm https://raw.githubusercontent.com/nguyenanh92/harness-kit/main/install.ps1 | iex
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/nguyenanh92/harness-kit/main/install.sh | sh
AG
Antigravity
Hỗ trợ native skill qua .agents/skills/Native skill support via .agents/skills/
1
Cài governance files (one-liner)Install governance files (one-liner)

Antigravity đọc AGENTS.md ở gốc project (chuẩn cross-tool 2026). Chạy install từ thư mục gốc project: Antigravity reads AGENTS.md at the project root (cross-tool standard 2026). Run the install from your project root:

Windows
irm https://raw.githubusercontent.com/nguyenanh92/harness-kit/main/install.ps1 | iex
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/nguyenanh92/harness-kit/main/install.sh | sh
2
Cài native skill vào .agents/skills/ (tùy chọn)Install as native skill into .agents/skills/ (optional)

Nếu muốn Antigravity biết đầy đủ workflow harness-kit, copy thư mục skill vào .agents/skills/ trong project (chạy lệnh này từ trong harness-kit/): To give Antigravity full harness-kit workflow knowledge, copy the skill folder into .agents/skills/ in your project (run this from inside harness-kit/):

Windows
New-Item -ItemType Directory -Force /path/to/your-project/.agents/skills | Out-Null
Copy-Item -Recurse "skills" "/path/to/your-project/.agents/skills/harness-kit"
macOS / Linux
mkdir -p /path/to/your-project/.agents/skills
cp -r skills /path/to/your-project/.agents/skills/harness-kit
3
Xác nhận hoạt độngVerify it works

Mở project trong Antigravity và prompt agent: Open the project in Antigravity and prompt the agent:

"Đọc AGENTS.md và thực thi feature đang in_progress trong feature_list.json""Read AGENTS.md and execute the in_progress feature from feature_list.json"
Agent sẽ tự chạy init.ps1/init.sh để verify trước khi đánh dấu done. Không cần giải thích thêm. The agent will run init.ps1/init.sh for verification before flipping status to done. No further explanation needed.