Chuyển đến nội dung
Skillpedia
Công việc và dự án29k · #9369

herdr-manager-query

Skill này làm gì

Skill này đọc kho dữ liệu của Herdr Manager về các review, pull request và bản checkout, rồi đưa ra bản tóm tắt rõ ràng cùng các đề xuất. Dành cho lập trình viên đang xử lý nhiều pull request.

Khi nào nên dùng

  • ✓Khi bạn muốn danh sách các pull request được yêu cầu review.
  • ✓Khi bạn muốn xem những pull request do bạn tạo cần được chú ý.
  • ✓Khi bạn muốn đề xuất công việc tiếp theo nên nhận.

Liên kết skill

https://github.com/mastra-ai/mastra/blob/main/.mastracode/skills/herdr-manager-query/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/mastra-ai/mastra/blob/main/.mastracode/skills/herdr-manager-query/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Cho tôi xem các pull request đang chờ tôi review, và đề xuất cái nào nên xem trước.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent đọc dữ liệu Herdr Manager chỉ qua plugin, rồi báo cáo những gì tìm được. Nó không thay đổi bản ghi nào.

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.

Herdr Manager Query

Use the enabled herdr-kit plugin as the authoritative repository-independent source for Review Manager and Work Manager data.

Activate this skill for requested reviews, authored PRs, managed checkouts, Herdr workspaces, manager review/CI/activity/freshness/cleanup state, work recommendations, or explicit Review Manager materialization.

Safety and source of truth

  • Querying and recommending are read-only.
  • The manager inventory is authoritative. Never substitute direct GitHub/gh, current-directory Git, TUI scraping, raw manager state files, or another inventory.
  • If discovery, capability negotiation, query execution, JSON parsing, schema validation, or a relevant source reports an error, stop and report the exact problem. Never fall back.
  • Never synchronize, dematerialize, clean up, create a Git worktree directly, or materialize a Work Manager record.
  • The only permitted mutation is explicit, user-confirmed materialization of authoritative remote-only Review Manager records through the plugin's public CLI.
  • Treat protocol and schema versions as compatibility boundaries. Do not guess around unsupported versions.

Discover the installed interface

Resolve the enabled plugin root through Herdr, not from the current repository:

plugin_file=$(mktemp)
if ! herdr plugin list --plugin herdr-kit --json > "$plugin_file"; then
    exit 1
fi
if ! plugin_root=$(python3 - "$plugin_file" <<'PY'
import json, sys
plugins = json.load(open(sys.argv[1]))["result"]["plugins"]
plugin = next((p for p in plugins if p.get("plugin_id") == "herdr-kit"), None)
if not plugin or not plugin.get("enabled") or not plugin.get("plugin_root"):
    raise SystemExit("Enabled herdr-kit plugin root is unavailable")
print(plugin["plugin_root"])
PY
); then
    exit 1
fi
manager_cli="$plugin_root/herdr-kit"

Negotiate capabilities before any query or mutation:

capabilities_file=$(mktemp)
"$manager_cli" capabilities > "$capabilities_file"
python3 - "$capabilities_file" <<'PY'
import json, sys
p = json.load(open(sys.argv[1]))
if p.get("protocol_version") != 1:
    raise SystemExit(f"Unsupported herdr-kit protocol: {p.get('protocol_version')}")
if not p.get("operations", {}).get("manager_query", {}).get("available"):
    raise SystemExit("herdr-kit manager query is unavailable")
PY

Query workflow

Write output to a temporary file so large JSON is never passed through shell command substitution:

data_file=$(mktemp)
"$manager_cli" manager query > "$data_file"
python3 - "$data_file" <<'PY'
import json, sys
p = json.load(open(sys.argv[1]))
if p.get("protocol_version") != 1:
    raise SystemExit(f"Unsupported manager protocol: {p.get('protocol_version')}")
inventory = p.get("inventory", {})
if inventory.get("schema_version") != 1:
    raise SystemExit(f"Unsupported manager inventory schema: {inventory.get('schema_version')}")
errors = inventory.get("summary", {}).get("errors", [])
if errors:
    raise SystemExit("Manager inventory error: " + "; ".join(map(str, errors)))
print(json.dumps(inventory.get("summary", {}), indent=2))
PY

Filter inventory.items locally. Every item identifies its source manager and includes repository/PR identity, state, checkout location, Herdr state, reviews, CI, activity, freshness, changes, and cleanup data. Review records additionally include head_sha, materialization.target_path, and PR diff statistics under diff.

For Review Manager records, use the structured review metadata when reasoning about initial reviews and follow-up work:

  • reviews.your_latest_review_at and reviews.your_latest_review_sha identify the user's latest submitted review and reviewed commit.
  • reviews.events provides submitted review events with actors, states, timestamps, commit SHAs, and compact bodies.
  • reviews.comments and reviews.unresolved_threads provide available comment and unresolved-discussion timing. Compare each item's timestamp with reviews.your_latest_review_at: only later items are follow-up feedback, and the result remains unknown when either timestamp is unavailable.
  • reviews.commits_since_your_review identifies commits submitted after the user's latest review.
  • Compare event timestamps rather than assuming PR-wide activity_at occurred after the user's review. A missing timestamp or event remains unknown.

Treat missing values as unknown, never as favorable defaults.

Recommendation workflow

When asked what to review or work on next, rank on

Câu hỏi thường gặp

Skill này có thể thay đổi pull request của tôi không?

Không. Truy vấn và đề xuất chỉ đọc, và thay đổi duy nhất được phép là một bước rõ ràng, đã xác nhận, thêm các bản ghi review chỉ có trên remote.

Nếu plugin chưa được cài thì sao?

Agent dừng lại và báo vấn đề thay vì đoán từ GitHub hay nguồn khác.

Nó có đọc trực tiếp tài khoản GitHub của tôi không?

Không. Skill yêu cầu kho dữ liệu Herdr Manager là nguồn sự thật duy nhất.

Chi tiết

Mô tả gốc của tác giả

Query the authoritative global Herdr Review and Work Manager inventory, recommend actionable PR work, and explicitly materialize confirmed remote-only Review Manager records through the plugin's stable public CLI.

repo: mastra-ai/mastra

Độ phổ biến

Sao GitHub
29k
Vị trí xếp hạng
#9369
Giấy phép
—
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự