sub-agent
Skill này làm gì
Skill này giao một công việc lập trình cho một trợ lý lập trình riêng chạy nền mà không cần tương tác. Skill dành cho lập trình viên muốn một tính năng, bản rà soát hoặc tái cấu trúc được hoàn thành trong khi họ vẫn làm việc khác.
Khi nào nên dùng
- ✓Khi bạn muốn một tính năng tự chứa được xây bởi trợ lý lập trình khác ở chế độ nền.
- ✓Khi một đánh giá mã hoặc tái cấu trúc cần khám phá rất nhiều file.
- ✓Khi bạn muốn chạy trợ lý lập trình ở chế độ không tương tác để nó hoàn thành mà không cần hỏi thêm.
Liên kết skill
https://github.com/TokenRhythm/opensquilla/blob/main/src/opensquilla/skills/bundled/sub-agent/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
“Bạn có thể giao việc tái cấu trúc module thanh toán cho một trợ lý lập trình chạy nền và kiểm tra lại sau không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent khởi động trợ lý lập trình đã chọn bằng một lệnh không tương tác cùng một nhiệm vụ rõ ràng, rồi theo dõi tiến trình nền cho đến khi xong. Nó dùng các công cụ tiến trình để kiểm tra tiến độ và thu thập kết quả.
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.
Sub-Agent (opensquilla process tools)
Generic "spawn a sub-Agent" entry point for delegating self-contained tasks to Codex / Claude Code / OpenCode / Pi via background process. Use this playbook for self-contained coding and file-editing tasks.
Use OpenSquilla's exec_command and process tools for coding agent work. exec_command starts both short and long commands; use yield_time_ms=0 for a long run and keep the returned execution handle. OpenSquilla does not expose a bash tool; do not use the legacy bash tool-call DSL.
Non-Interactive CLI Mode
OpenSquilla's process tools do not expose a pty parameter. Prefer non-interactive command modes that run and exit cleanly:
# ✅ Correct for Codex/Pi/OpenCode
exec_command(command="codex exec 'Your prompt'")
For Claude Code (claude CLI), use --print --permission-mode bypassPermissions instead.
--dangerously-skip-permissions with PTY can exit after the confirmation dialog.
--print mode keeps full tool access and avoids interactive confirmation:
# ✅ Correct for Claude Code (no PTY needed)
cd /path/to/project && claude --permission-mode bypassPermissions --print 'Your task'
# For background execution: use exec_command(yield_time_ms=0, ...)
# ❌ Wrong for Claude Code
exec_command(command="claude --dangerously-skip-permissions 'task'")
OpenSquilla Tool Parameters
| Tool | Key parameters | Description |
|---|---|---|
exec_command |
command, workdir, timeout, yield_time_ms |
Start a shell command; use yield_time_ms=0 for a long run and keep the returned execution handle. |
process |
action, session_id, data, offset, limit |
Poll, log, write to, or stop a background process. |
Process Tool Actions (for background sessions)
| Action | Description |
|---|---|
list |
List all running/recent sessions |
poll |
Check if session is still running |
log |
Get session output (with optional offset/limit) |
write |
Send raw data to stdin |
submit |
Send data + newline (like typing and pressing Enter) |
eof |
Close stdin |
remove |
Remove a finished session from the process list |
kill |
Terminate the session |
Quick Start: One-Shot Tasks
For quick prompts/chats, create a temp git repo and run:
# Quick chat (Codex needs a git repo!)
SCRATCH=$(mktemp -d) && cd $SCRATCH && git init && codex exec "Your prompt here"
# Or in a real project
exec_command(workdir="~/Projects/myproject", command="codex exec 'Add error handling to the API calls'")
Why git init? Codex refuses to run outside a trusted git directory. Creating a temp repo solves this for scratch work.
The Pattern: workdir + exec_command + process
For longer tasks, use exec_command(yield_time_ms=0, ...):
# Start agent in target directory.
exec_command(yield_time_ms=0, workdir="~/project", command="codex exec --full-auto 'Build a snake game'")
# Returns an execution handle (the current compatibility field is `session_id`)
# Wait for it to finish — blocks until the process exits (or the timeout
# elapses, in which case just call wait again). Prefer this over polling in a
# loop: a looped process(action="poll") burns a full turn + tokens each time.
process(action="wait", session_id="XXX")
# Peek at output without blocking (optional, for progress)
process(action="log", session_id="XXX")
# Send input (if agent asks a question)
process(action="write", session_id="XXX", data="y")
# Submit with Enter (like typing "yes" and pressing Enter)
process(action="submit", session_id="XXX", data="yes")
# Kill if needed
process(action="kill", session_id="XXX")
Why workdir matters: Agent wakes up in a focused directory, doesn't wander off reading unrelated files (like your soul.md 😅).
Codex CLI
Model: gpt-5.2-codex is the default (set in ~/.codex/config.toml)
Flags
| Flag | Effect |
|---|---|
exec "prompt" |
One-shot execution, exits when done |
--full-auto |
Sandboxed but auto-approves in workspa |
Câu hỏi thường gặp
Skill làm việc với những trợ lý nào?
Skill nhắc đến Codex, Claude Code, OpenCode và Pi.
Có cần terminal tương tác không?
Không. Skill dùng các chế độ không tương tác, chạy xong rồi thoát sạch sẽ.
Có thể chạy một tác vụ dài không?
Có. Skill có thể khởi động một lệnh chạy lâu và giữ tham chiếu để kiểm tra sau.
Chi tiết
Mô tả gốc của tác giả
Delegate a self-contained task to a coding assistant through a non-interactive background process. Use for feature development, code review, refactoring, and tasks requiring substantial file exploration.
repo: TokenRhythm/opensquilla
Độ phổ biến
- Sao GitHub
- 7.1k
- Vị trí xếp hạng
- #13593
- 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
browser-use
7.1kCho phép agent của bạn mở, đọc và thao tác với các trang web trong trình duyệt thanh bên của OpenSquilla Desktop, gồm biểu mẫu và kiểm tra trực quan.
deep-research
7.1kDạy agent của bạn nghiên cứu nhiều vòng với kế hoạch đã lưu, nguồn được theo dõi và một báo cáo dài có trích dẫn.
docx
7.1kGiúp agent của bạn đọc, chỉnh sửa hoặc tạo file Word .docx, đồng thời giữ nguyên định dạng, thay đổi đang theo dõi và cấu trúc.
html-coder
7.1kGiúp agent của bạn viết trang HTML sạch, có cấu trúc ngữ nghĩa, biểu mẫu dễ tiếp cận, phương tiện và tính năng HTML5, rồi mở xem trước trên web.
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.