sb-kit
CLI cài đặt bộ agent skills được đóng gói sẵn vào project hiện tại. Skills luôn được cài vào .agents/skills; bạn có thể chọn cài thêm cho Claude Code vào .claude/skills. Chế độ mặc định giữ nguyên skill đã tồn tại; Replace selected chỉ thay những skill được chọn. Core kit gồm $sk-excute cho workflow inline-first có evidence và approval gates, cùng các role contracts hỗ trợ scout, researcher và worker tùy chọn. Agent chính giữ ownership từ spec, plan/todo đến implementation và final review. $sk-create-skill là công cụ nội bộ trong checkout để tạo/cải thiện skill SaboKit, không thuộc npm package hoặc installer.
Prerequisites
- Node.js 20.12.0 trở lên với npm/npx.
- Một project đích có quyền tạo thư mục
.agents (và .claude nếu chọn cài cho Claude Code).
Installation
Chạy lệnh trong thư mục project cần sử dụng skills:
npx sb-kit install
Sau khi chạy lệnh, CLI hiển thị trực tiếp toàn bộ skill có thể cài trong một danh sách checkbox. Chọn một hoặc nhiều skill rồi tiếp tục.
CLI bắt buộc chọn ít nhất một skill. Khi chọn $sk-excute, installer tự thêm đủ ba role skills sk-excute-explorer, sk-excute-researcher, và sk-excute-implementer vào selection. Bản đã có được giữ nguyên trong Install missing only; các role được chọn vẫn được mirror nếu bạn chọn cài cho Claude Code. Required companions còn thiếu được đề nghị riêng; chỉ thêm sau khi bạn xác nhận Yes (mặc định No). Decline giữ selection và cảnh báo chức năng thiếu; cancel dừng trước copy. Sau selection, chọn cách xử lý skill đã tồn tại:
- Install missing only — mặc định; giữ folder skill hiện có và báo
Skipped.
- Replace selected — chỉ thay đúng các skill đã checkbox, báo
Replaced; skill không chọn không bị ảnh hưởng.
Cancel ở picker hoặc conflict mode sẽ dừng trước khi tạo/copy skill folder. Cuối cùng dùng phím mũi tên và Enter để chọn có mirror cùng selection và conflict mode sang Claude Code không. No là lựa chọn mặc định.
Claude Code plugin
sb-kit cũng là một Claude Code plugin và tự làm marketplace của chính nó. Trong Claude Code (2.1.275 trở lên) cài bằng một lệnh:
/plugin install sb-kit --marketplace congthien2003/sb-kit
Hoặc theo hai bước trên các bản Claude Code cũ hơn:
/plugin marketplace add congthien2003/sb-kit
/plugin install sb-kit@sb-kit
Plugin cung cấp toàn bộ skill trong .agents/skills/, kể cả các skill CLI không hiển thị trong picker (như sk-release, sk-create-skill, skill-creator, herdr và các skill bên thứ ba). Skill được gọi theo namespace của plugin, ví dụ sb-kit:sk-excute. CLI npx sb-kit vẫn hoạt động như cũ và không phụ thuộc vào plugin.
Manifest nằm ở .claude-plugin/plugin.json (version luôn khớp package.json) và .claude-plugin/marketplace.json.
Pi config profiles (optional)
Repository này cũng có Pi package độc lập để lưu/export/import persisted Pi settings và inventory extensions an toàn:
pi install ./pi-config-profiles
Xem pi-config-profiles/README.md để biết lệnh /pi-profile, merge/backup và phạm vi secret-safe. Package này không thay đổi luồng sb-kit install.
Create Next + Hono workspace
Khởi tạo một pnpm workspace mới gồm Next.js App Router client, Node.js Hono server, root scripts, Prettier và bộ sb-kit core skills:
npx sb-kit create next-hono my-app
Thêm --claude để mirror cùng bộ core skills vào .claude/skills:
npx sb-kit create next-hono my-app --claude
CLI chỉ tạo base project có thể mở bằng coding agent. PostgreSQL, Drizzle, auth, same-origin proxy, module conventions và R2 tùy chọn được $sk-start-next-hono cấu hình ở bước sau, sau khi agent inspect source và bạn approve plan. CLI vẫn bootstrap Hono trên Node.js; skill giữ Node.js mặc định hoặc chuyển server hiện có sang Cloudflare Workers khi bạn chọn và duyệt kế hoạch. Chọn Workers cho backend không bắt buộc đổi nơi deploy Next.js. Bootstrap cũng cài trọn bộ role contracts của $sk-excute; agent chính triển khai inline mặc định và chỉ dùng native sub-agents khi có nhu cầu cụ thể.
Để chọn backend Workers, thêm yêu cầu này khi gọi skill:
Use $sk-start-next-hono to set up this existing workspace with a Cloudflare Workers Hono backend. Keep the current Next.js deployment. Present the in-place conversion plan and wait for approval before editing. Do not run verification or deploy commands.
Nhánh Workers dùng Wrangler, typed bindings/secrets và PostgreSQL/Drizzle với Hyperdrive cùng driver tương thích theo tài liệu chính thức; không tự đổi PostgreSQL thành D1. R2 chỉ thêm khi được yêu cầu, ưu tiên native binding trên Workers. Agent cần xác nhận resource IDs, môi trường và quyền thực thi; deploy hoặc tạo tài nguyên cloud không được tự động thực hiện.
Khi chọn auth/proxy, skill hướng dẫn kiểm tra Origin trước khi đọc cookie, chuyển cookie thành bearer token qua transport đầy đủ, xác thực response envelope cùng HTTP status và mount Hono auth guard. Hướng dẫn cũng bao gồm cleanup kết nối database theo request và lựa chọn dependency theo bằng chứng security advisory. Đây là yêu cầu triển khai/review; không thay thế test runtime, kiểm tra bảo mật hoặc xác nhận deployment.
Sau khi scaffold thành công, CLI in prompt sẵn để gửi cho agent:
Use $sk-start-next-hono to finish setting up this existing pnpm workspace.
Inspect the generated Next.js client, Hono server, root workspace files,
AGENTS.md, and Git state first. Preserve the generated applications and
existing files.
Configure the project following the skill conventions:
- PostgreSQL with Drizzle migrations on the server;
- authentication with admin/user boundaries by default;
- same-origin /api/backend/* proxy for protected client requests;
- shared environment, API error, response, logging, and database utilities;
- client and server module boundaries documented by the skill;
- Cloudflare R2 only if I explicitly request it.
Before modifying files, present a concise file-scoped plan and wait for my
approval. Follow the repository AGENTS.md. Do not commit code. Do not run
build, test, lint, or verification commands unless I explicitly allow them.
The installed sk-excute workflow is inline-first. The main agent owns the
spec, risk-sized plan/todos, implementation, integration, and final review.
Obtain my approval for the spec, then for the plan the main agent has
self-reviewed, before edits.
Only scout, researcher, and worker roles may be dispatched.
Use scout/researcher only for concrete missing evidence within permissions.
The worker is optional and receives authorized approved tasks with exclusive
file ownership. The main agent reviews its changed files after handback.
If an authorized worker is unavailable or fails, disclose status and ask
before takeover.
Usage
Hiển thị hướng dẫn:
npx sb-kit --help
Help giải thích rõ Install missing only cài skill còn thiếu và giữ nguyên bản hiện có; Replace selected chỉ thay các skill hiện có đã chọn, không tác động skill chưa chọn. Nội dung trợ giúp này không thay đổi hành vi installer.
Luồng cài đặt:
- CLI đọc danh sách thư mục skill trong
.agents/skills của package.
- CLI mở trực tiếp danh sách đầy đủ skill; bạn chọn một hoặc nhiều skill.
- Bạn chọn Install missing only hoặc Replace selected; mode này chỉ tác động những skill đã chọn.
- CLI cài selection vào
.agents/skills, rồi bạn chọn No hoặc Yes ở prompt Claude Code. Khi chọn Yes, CLI áp dụng cùng selection và conflict mode từ source .agents/skills sang .claude/skills.
$sk-excute triển khai inline mặc định và chỉ cho phép các role scout, researcher, worker khi host hỗ trợ. Không bundled orchestrator, CLI delegation hay dependency riêng. Scout/researcher chỉ giải quyết câu hỏi còn thiếu; external research phải tuân thủ consent, offline và privacy policy. Không mặc định dispatch reviewer sub-agent: bạn review spec, agent chính tự review plan một lượt và sửa findings trước khi bạn approve. Worker không khả dụng hoặc thất bại phải báo status/partial changes và xin phép trước khi agent chính takeover; không đổi ownership âm thầm. Role được map theo chức năng (scout = explore/search lấy thông tin, worker = triển khai code, researcher = tra cứu bên ngoài), không theo tên agent của host; sub-agent nên chạy model rẻ hơn main như Haiku, Luna-6 hoặc DeepSeek V4.1.
Ví dụ cấu trúc sau khi dùng lựa chọn mặc định No:
your-project/
├── .agents/
│ └── skills/
│ ├── sk-excute/
│ └── sk-visualizer/
Chọn Yes sẽ tạo thêm .claude/skills với cùng các skill đã chọn.
Skill catalog
Catalog chính thức có 15 skills, gồm 12 core và 3 supporting. Các supporting skills chỉ được cài khi bạn chọn, không tự cài trong create next-hono.
Từ v3.0.0, herdr-orchestra không còn được đóng gói hoặc hiển thị trong picker. Installer không xóa bản đã cài trong project; bạn có thể giữ bản hiện có nếu vẫn cần workflow này.
SaboKit core
| Skill |
Mục đích |
sk-excute |
Inline-first từ yêu cầu ban đầu, spec và plan/todo co giãn theo rủi ro low/medium; hai approval gates, tự review plan, triển khai rồi review/sửa findings; advisor và worker tùy chọn; không tự commit. |
sk-excute-explorer |
Contract cho scout read-only, trả evidence về code/tài liệu local còn thiếu; tái sử dụng packet cho spec/plan, không bắt buộc scout lại. |
sk-excute-researcher |
Researcher trả citations cho câu hỏi public external cần thiết, tuân thủ consent/privacy và ưu tiên primary source đúng version. |
sk-excute-implementer |
Contract cho worker tùy chọn: triển khai nhóm task đã duyệt, giữ exclusive file ownership rồi handback để agent chính review/integrate; không commit. |
sk-visualizer |
Biến prompt, spec, đề xuất, báo cáo, plan hoặc tài liệu kỹ thuật thành một trang HTML đọc tuần tự từ trên xuống. Dùng chung một khung, mỗi loại có bộ mục dẫn đường; bám sát tài liệu nguồn, chỉ tra cứu internet có giới hạn khi cần bổ sung hoặc khi tài liệu kỹ thuật chỉ có chủ đề. |
sk-doc |
Sinh một Markdown document từ codebase, gồm README, API docs, changelog hoặc usage guide. |
sk-explain |
Giải thích source code, flow, state transition và các nhánh xử lý dựa trên file references. |
sk-create-slide |
Tạo HTML presentation từ ý tưởng hoặc chuyển đổi PPT/PPTX. |
sk-start-next-hono |
Hoàn thiện workspace Next.js + Hono đã bootstrap: Node.js mặc định hoặc Cloudflare Workers tùy chọn, với PostgreSQL/Drizzle, auth, proxy và convention modular monolith. |
sk-verify-code-ui-only |
Audit UI-only read-only theo chuẩn repo về component reuse, typography và spacing; báo evidence locations, có thể dùng native sub-agents nếu host hỗ trợ và cho phép. |
sk-review-diff |
Review diff được chọn, findings có severity/location/evidence; phân biệt regression với pre-existing issues, không tự patch/verify. |
sk-idea-to-docs |
Biến ý tưởng thành bộ docs nền tảng docs/overview.md, docs/spec.md, docs/implementation-plan.md: hỏi từng câu, phân biệt xác nhận/đề xuất/giả định/điểm mở, lấy phản hồi trước khi lập plan; dừng ở docs, không triển khai hay commit. |
sk-create-skill và skill-creator chỉ được giữ trong checkout của repository để phục vụ tác vụ nội bộ; chúng không thuộc catalog, picker hay npm package của sb-kit. Không dùng sb-kit install để phân phối hoặc cài hai skill này.
$sk-excute nhận yêu cầu ban đầu, không cần spec/plan có sẵn: điều tra code và tài liệu liên quan → viết spec với acceptance IDs → bạn approve spec → đọc bổ sung implementation details còn thiếu hoặc đã thay đổi → lập plan/todo checklist → agent chính tự review một lượt và sửa findings → bạn approve plan → triển khai inline → review changes, sửa findings trong scope và review lại vùng bị ảnh hưởng → bàn giao evidence và phần chưa verify. Low dùng spec/checklist ngắn; medium bổ sung contracts, dependencies và edge cases cần thiết. Đánh giá theo rủi ro, không chỉ số file; cả hai vẫn giữ đủ hai approval gates. Không scan lại repo hoặc gọi scout lần hai mặc định; đổi scope/behavior phải duyệt lại spec.