harness
Skill này làm gì
Hướng dẫn này giải thích cấu trúc của một skill cho agent, gồm file SKILL.md, tài liệu tham khảo, script và nơi có thể lưu skill. Hướng dẫn dành cho lập trình viên thiết lập skill cho các AI agent.
Khi nào nên dùng
- ✓Khi bạn muốn đóng gói một skill với file SKILL.md cho agent.
- ✓Khi bạn cần biết skill có thể cài đặt từ đâu, chẳng hạn từ kho Git hoặc không gian làm việc dùng chung.
- ✓Khi bạn muốn thiết lập thư mục skill riêng cho từng người dùng của agent.
Liên kết skill
https://github.com/agentscope-ai/agentscope-java/blob/main/docs/v2/en/docs/harness/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
“Hãy giải thích cách đóng gói một skill cho agent AgentScope của tôi, gồm cách bố trí thư mục và nơi lưu trữ.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Hướng dẫn mô tả skill là một thư mục có file SKILL.md để nói cho agent biết cần làm gì, cùng với các file tham khảo và script không bắt buộc. Hướng dẫn cũng giải thích rằng thư mục skill dùng chung và thư mục skill riêng có thể cùng hoạt độ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.
A skill is a packaged capability: a directory with a SKILL.md (purpose + instructions the agent reads), optional reference docs, scripts, samples. Hand it to the agent and it will use it when relevant.
Harness lets you install skills from two places:
- Skill marketplaces — Git repo, Nacos, MySQL, classpath, custom stores
- Workspace —
workspace/skills/is shared by everyone;<userId>/skills/isolates per user
Both sources are active simultaneously — no need to choose one. On top of that you can enable a self-learning loop: the agent drafts skills → review gate → background curator tidies up.
A skill directory looks like:
code-reviewer/
├── SKILL.md # required — YAML frontmatter (name + description) + instructions for the agent
├── references/ # optional — long-form docs the agent reads on demand
│ └── style-guide.md
└── scripts/ # optional — executable scripts the agent can shell out to
└── run-checks.sh
Save SKILL.md as UTF-8. A byte order mark (BOM) before the opening --- is supported.
Close the YAML frontmatter with an unindented line containing only --- and optional spaces or tabs. A --- inside a description or an indented YAML block scalar remains part of the metadata.
Skill names must match ^[a-z0-9][a-z0-9-]*$ and be at most 64 characters (lowercase letters, digits, and hyphens only — no underscores or dots), following the industry naming standard for Agent Skills. Names are used verbatim as directory keys and skill identifiers, so non-conforming names are rejected when the skill is constructed or loaded.
SKILL.md format:
---
name: code-reviewer
description: Use when the user asks for code review, style feedback, or PR audits.
---
# Code Reviewer
Steps:
1. Read `references/style-guide.md` for project conventions.
2. Run `scripts/run-checks.sh <target-path>` and summarize the output.
A quick example
Plug in your team's skill repo and the agent can use it immediately:
HarnessAgent agent = HarnessAgent.builder()
.name("assistant")
.model(model)
.workspace(workspace)
.skillRepository(new GitSkillRepository("https://github.com/your-org/team-skills.git"))
.build();
During reasoning, the agent sees skills from the repo and calls load_skill_through_path for whichever one it needs.
Marketplace stores
skillRepository(...) is the unified entry point — pass any store.
Git
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-extensions-skill-git-repository</artifactId>
<version>${agentscope.version}</version>
</dependency>
.skillRepository(new GitSkillRepository("https://github.com/your-org/team-skills.git"))
By default, each read does a lightweight remote check, pulling only when HEAD changed. If the repo has a skills/ subdirectory, that's the root; otherwise the repo root is. To control sync timing yourself: new GitSkillRepository(url, false), then call repo.sync() manually.
Nacos
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-extensions-nacos-skill</artifactId>
<version>${agentscope.version}</version>
</dependency>
NacosSkillRepository market = new NacosSkillRepository(aiService, "namespace");
HarnessAgent.builder()
.skillRepository(market)
.build();
Best for online distribution + change subscription. market is AutoCloseable; close it on shutdown to release subscriptions.
MySQL
MysqlSkillRepository registry = MysqlSkillRepository.builder(dataSource)
.databaseName("agentscope")
.skillsTableName("skills")
.createIfNotExist(true)
.writeable(true)
.build();
HarnessAgent.builder()
.skillRepository(registry)
.build();
Common for platform-side skill management. writeable(true) lets agents write back; pass false for read-only distribution.
Classpath
Ship skills inside your JAR:
src/main/resources/skills/
└── code-reviewer/
└── SKILL.md
.skillRepository(new ClasspathSkillRepository("skills"))
Works with both standard JARs and Spring Boot fat JARs.
Multiple stores
Call skillRepository(...) multiple times; later ones win:
HarnessAgent.builder()
.skillRepository(communityMarket)
.skillRepository(internalRegistry)
.skillRepository(teamGitRepo)
.build();
Wor
Câu hỏi thường gặp
File bắt buộc trong một skill là gì?
Mỗi skill cần có file SKILL.md, với tên và mô tả ở đầu file.
Skill có thể đến từ đâu?
Hướng dẫn nhắc đến kho Git và các thư mục làm việc dùng chung hoặc riêng cho từng người dùng.
Có quy tắc đặt tên nào không?
Tên skill dùng chữ thường, chữ số và dấu gạch ngang, tối đa 64 ký tự.
Chi tiết
Mô tả gốc của tác giả
Four-layer skill composition, skill marketplaces, the self-learning loop
Độ phổ biến
- Sao GitHub
- 6.2k
- Vị trí xếp hạng
- #14393
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agentscope-java
6.2kGiúp agent của bạn viết mã Java không chặn cho AgentScope, một framework đa agent xây dựng trên Project Reactor.
data-report
6.2kGiúp agent của bạn tóm tắt một bộ dữ liệu thành báo cáo có trung bình, tổng, khoảng giá trị và xu hướng, lưu dưới dạng tệp Markdown.
data-transform
6.2kGiúp agent của bạn chuyển đổi tệp dữ liệu giữa các định dạng như CSV và JSON, để dữ liệu có thể dùng trong công cụ khác.
git-changelog
6.2kGiúp agent của bạn viết changelog hoặc ghi chú phát hành từ lịch sử Git, được nhóm thành tính năng, sửa lỗi và thay đổi khác.
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.