hive.colony-progress-tracker
Skill này làm gì
Skill này cung cấp cho một worker AI phương pháp nhận tác vụ và ghi nhật ký tiến độ trong cơ sở dữ liệu dùng chung. Skill dành cho người chạy nhiều worker AI trên cùng một hàng đợi công việc.
Khi nào nên dùng
- ✓Khi worker AI của bạn được giao một mã tác vụ hoặc đường dẫn cơ sở dữ liệu để dùng.
- ✓Khi nhiều worker cần chia sẻ một hàng đợi mà không nhận cùng một tác vụ.
- ✓Khi một worker AI phải ghi lại mỗi bước và kiểm tra trước khi đi tiếp.
Liên kết skill
https://github.com/aden-hive/hive/blob/main/core/framework/skills/_default_skills/colony-progress-tracker/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
“Tôi muốn bạn làm tác vụ tiếp theo đang chờ trong hàng đợi dùng chung của chúng tôi, và ghi lại từng bước khi bạn hoàn thành.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Worker nhận một dòng tác vụ trong một cơ sở dữ liệu nhỏ, làm qua các bước và ghi lại điều đã làm. Các kiểm tra bắt buộc cũng được ghi lại, để một worker khác có thể thấy tình trạng hiện tại.
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.
Operational Protocol: Colony Progress Tracker
Applies when your spawn message has db_path: and colony_id: fields. The DB is your durable working memory — tells you what's done, what to skip, which SOP gates you owe.
Access via terminal_exec running sqlite3 "<db_path>" "...". Tables: tasks (queue), steps (per-task decomposition), sop_checklist (hard gates).
Claim: assigned task (check this FIRST)
If your spawn message includes a task_id: field, the queen pre-assigned a specific row to you. Claim that row by id — do not use the generic next-pending pattern below:
sqlite3 "<db_path>" <<'SQL'
UPDATE tasks SET status='claimed', worker_id='<worker-id>',
claim_token=lower(hex(randomblob(8))),
claimed_at=datetime('now'), updated_at=datetime('now')
WHERE id='<task_id>' AND status='pending'
RETURNING id, goal, payload;
SQL
Empty output → another worker raced you or the row is already done. Stop and report. Non-empty → that row is yours, proceed to "Load the plan".
Claim: next pending (fallback when no task_id is assigned)
If your spawn message did NOT include task_id: — you are a generic fan-out worker racing on a shared queue. Use the generic next-pending claim:
sqlite3 "<db_path>" <<'SQL'
UPDATE tasks SET status='claimed', worker_id='<worker-id>',
claim_token=lower(hex(randomblob(8))),
claimed_at=datetime('now'), updated_at=datetime('now')
WHERE id=(SELECT id FROM tasks WHERE status='pending'
ORDER BY priority DESC, seq, created_at LIMIT 1)
RETURNING id, goal, payload;
SQL
Empty output → queue drained, exit. Otherwise the returned id is yours. Never SELECT-then-UPDATE — races.
Load the plan
sqlite3 "<db_path>" "SELECT seq, id, title, status FROM steps WHERE task_id='<task-id>' ORDER BY seq;"
sqlite3 "<db_path>" "SELECT key, description, required, done_at FROM sop_checklist WHERE task_id='<task-id>';"
Skip any step where status='done'. That's the point — don't redo completed work.
Execute a step
Before tool calls:
sqlite3 "<db_path>" "UPDATE steps SET status='in_progress', worker_id='<worker-id>', started_at=datetime('now') WHERE id='<step-id>';"
After success (one-line evidence: path, URL, key result):
sqlite3 "<db_path>" "UPDATE steps SET status='done', evidence='<what you did>', completed_at=datetime('now') WHERE id='<step-id>';"
MANDATORY: SOP gate check before marking task done
sqlite3 "<db_path>" "SELECT key, description FROM sop_checklist WHERE task_id='<task-id>' AND required=1 AND done_at IS NULL;"
- Empty → proceed to "Mark task done".
- Non-empty → each row is work you still owe. Do it, then check it off:
sqlite3 "<db_path>" "UPDATE sop_checklist SET done_at=datetime('now'), done_by='<worker-id>', note='<why>' WHERE task_id='<task-id>' AND key='<key>';"
Never mark a task done while this SELECT returns rows. This gate exists specifically to stop you from declaring success while skipping required steps.
Mark task done / failed
# Success:
sqlite3 "<db_path>" "UPDATE tasks SET status='done', completed_at=datetime('now'), updated_at=datetime('now') WHERE id='<task-id>' AND worker_id='<worker-id>';"
# Unrecoverable failure:
sqlite3 "<db_path>" "UPDATE tasks SET status='failed', last_error='<one sentence>', completed_at=datetime('now'), updated_at=datetime('now') WHERE id='<task-id>' AND worker_id='<worker-id>';"
The AND worker_id=? guard means a reclaimed row won't accept your write — treat zero rows affected as "your claim was revoked, stop."
Loop
After done/failed → claim the next task. Exit only when claim returns empty.
Errors + debug
- "database is locked": retry with 100ms → 1s backoff, max 5 attempts.
busy_timeout=5000handles most contention silently. - Queue health:
SELECT status, count(*) FROM tasks GROUP BY status; - Your in-flight work:
SELECT id, goal, status FROM tasks WHERE worker_id='<worker-id>';
Anti-patterns (will break the queue)
- Don't DDL (CREATE/ALTER/DROP).
- Don't DELETE — failed tasks stay as
failedfor audit. - Don't skip Protocol 4 (SOP gate) before marking done.
- Don't hold a task >15min without updates — the stale-claim reclaimer revokes your claim.
- Don't invent task IDs. Workers update existing rows; only the queen enqueues new ones.
Câu hỏi thường gặp
Cơ sở dữ liệu dùng để làm gì?
Nó lưu hàng đợi tác vụ, các bước của từng tác vụ và các kiểm tra phải đạt.
Điều gì xảy ra nếu hai worker cùng thử một tác vụ?
Chỉ một worker có thể nhận tác vụ đang chờ, worker còn lại dừng và báo cáo.
Ai nên dùng skill này?
Dành cho người chạy các worker AI kiểu colony trên một danh sách công việc dùng chung.
Chi tiết
Mô tả gốc của tác giả
Claim tasks, record step progress, and verify SOP gates in the colony SQLite queue. Applies when your spawn message includes a db_path field.
repo: aden-hive/hive
Độ phổ biến
- Sao GitHub
- 11k
- Vị trí xếp hạng
- #11799
- 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-edge-cases
11kGiúp agent của bạn sửa tự động hóa trình duyệt bị lỗi trên các trang khó như LinkedIn, X hoặc trang có nhiều script nặng.
hive.browser-automation
11kDạy agent của bạn điều khiển trình Chrome của chính bạn bằng công cụ hive-browser, dùng ảnh chụp màn hình và các thao tác nhấp chuột.
hive.context-preservation
11kGiúp agent của bạn lưu các dữ kiện quan trọng từ kết quả công cụ dài vào ghi chú trước khi những chi tiết cũ bị xóa khỏi bộ nhớ.
hive.error-recovery
11kGiúp agent của bạn xử lý các bước công cụ thất bại theo một kế hoạch rõ ràng: thử lại một lần, sửa đầu vào, bỏ qua mục đó hoặc chuyển cho người xử lý.
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.