跳到正文
cccskills
免费在 GitHub 公开

herdr-manager-query

Query Herdr's Review Manager and Work Manager across repositories to recommend actionable pull requests. Compare review status, automated checks, size, and local state, and create local review checkouts for explicitly confirmed remote-only records.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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.

实测评分 未实测

查看安装方法

适用场景

  • Choose the next pull request to review
  • Find author follow-up work and failing automated checks
  • Check local changes and stale manager records
  • Create local checkouts for confirmed remote-only reviews

包含的文件(1)

  • SKILL.md8.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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 only records returned by the authoritative query.

Prioritize:

  1. Open Review Manager PRs where the user is requested or has participated and still has actionable review work.
  2. Within similarly actionable reviews, smaller quick wins by fewer diff.changed_files and lower diff.total_changes; then recent activity and passing CI.
  3. Open Work Manager items with actionable author follow-up, review, CI, or local development work.
  4. Fresh, unblocked records with a clear next action and safe checkout state.

Deprioritize cleanup-only, merged/closed/completed, stale/unavailable, blocked, or locally hazardous records. Do not treat missing diff metadata as a small PR.

For each recommendation include repository/PR, title, source manager, rationale and size, review/CI state, remote-only versus materialized state, Herdr state, warnings, and a concrete next action.

remote only does not prove whether a record was never materialized or later dematerialized unless inventory evidence distinguishes it.

Explicit Review Manager materialization

Materialize only after the authoritative query identifies manager: "review", location: "remote only" records and the user explicitly confirms the exact repository/PR targets. A current user message that unambiguously requests those exact targets counts as confirmation; otherwise ask first.

Before asking, show for each target:

  • repository and PR number/title;
  • immutable manager key;
  • current head_sha;
  • materialization.target_path;
  • relevant freshness, eligibility, checkout, or collision warnings.

Freeze the confirmed key and head SHA in a request file. Never refresh or silently replace a confirmed head:

request_file=$(mktemp)
cat > "$request_file" <<'JSON'
{"schema_version":1,"items":[{"key":"OWNER/REPO#NUMBER","head_sha":"CONFIRMED_HEAD_SHA"}]}
JSON
result_file=$(mktemp)
"$manager_cli" review materialize --request "$request_file" > "$result_file"
python3 - "$result_file" <<'PY'
import json, sys
p = json.load(open(sys.argv[1]))
if p.get("protocol_version") != 1 or p.get("schema_version") != 1:
    raise SystemExit("Unsupported materialization result schema")
print(json.dumps(p, indent=2))
PY

For several confirmed reviews, include all items in the same request. The public CLI validates every item against authoritative current inventory before mutation, rejects stale heads, delegates fresh eligibility/head/repository/path safety to Review Manager, continues after individual failures, and returns structured per-item outcomes.

Success is reported only after the CLI re-queries authoritative manager state and verifies the record is materialized with a checkout path. The backend creates the canonical review worktree and opens/focuses its Herdr workspace. No Sync All is required.

Report every result exactly. Never retry a stale/failed item with a changed head without showing the new inventory state and obtaining fresh user confirmation. Never fall back to manual Git worktree creation.

Response guidance

  • Answer the specific question; do not dump the inventory unless requested.
  • Clearly distinguish Review Manager from Work Manager records.
  • Include repository and PR number for PR-backed items.
  • Call out remote-only, closed Herdr workspace, dirty/unpushed changes, stale metadata, blocking CI/reviews, and cleanup warnings.
  • Explain uncertainty and ranking tradeoffs instead of inventing context.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Design and audit an agent's system prompt, the instructions that guide its work. Define a concrete outcome, starting input, available tools, completion checks, fallback behavior, and final report so the prompt describes a complete run.

中文简介正在准备中。当前显示英语简介。

  • Designing the core instructions for a new agent
  • Auditing a prompt before saving it
  • Defining behavior when tools or permissions are missing
mastra-ai/mastra2.9万2026年10月23日 更新

Create a dedicated test project linked to the current worktree and check Agent Builder through APIs and browser interactions. It covers agent and skill management, permissions, defaults, and related features, with selectable test sections.

中文简介正在准备中。当前显示英语简介。

  • Validate an Agent Builder feature branch before review
  • Check role-based permissions and authentication
  • Test agent and skill management through APIs and the UI
mastra-ai/mastra2.9万2026年10月23日 更新

Reviews pull requests for bugs, error handling, code quality, and style consistency. Organizes feedback into an overview, must-fix issues with file locations, improvement suggestions, and positive notes so reviewers can distinguish urgent problems from refinements.

中文简介正在准备中。当前显示英语简介。

  • Finding bugs that must be fixed before merging
  • Reviewing TypeScript types and asynchronous code
  • Checking naming, imports, and leftover debug statements
mastra-ai/mastra2.9万2026年10月23日 更新

Design instructions for agents that write, fix, review, or refactor code. Define behavior based on file access, select suitable tools, and set clear verification and completion rules for repository changes or copyable code output.

中文简介正在准备中。当前显示英语简介。

  • Designing an agent for repository bug fixes
  • Defining a pull request review agent
  • Creating a code generator without workspace access
mastra-ai/mastra2.9万2026年10月23日 更新

Configure Factory board behavior and GitHub or Linear event handlers in deployment code. Adjust stage transitions, phase meanings, and tool-result handling, then check the changes with focused tests and versioned audit records.

中文简介正在准备中。当前显示英语简介。

  • Add approval requirements to board transitions
  • Change GitHub or Linear event handling
  • Define custom board phases and tool-result rules
mastra-ai/mastra2.9万2026年10月23日 更新

Design agents that draft blog posts, social posts, newsletters, and marketing copy. Define the audience, brand voice, length, and required output so each agent delivers a complete draft with a headline and supporting notes.

中文简介正在准备中。当前显示英语简介。

  • Build a blog writing agent with a consistent brand voice
  • Design an agent for LinkedIn product posts
  • Define delivery rules for newsletter drafts
mastra-ai/mastra2.9万2026年10月23日 更新

查看 mastra-ai 的全部技能

报告此技能的问题