Token导航 LogoToken导航TokenDH.com
开发执行命令github未标认证来源可访问许可证需确认审计通过

relay-dispatch中继调度

Agent Skill

relay-dispatch 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

282

周安装

12

GitHub Stars

公开资料未说明

下载量

99
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:relay-dispatch(中继调度)
来源仓库:https://github.com/sungjunlee/dev-relay
仓库路径:skills/relay-dispatch
安装命令:
npx skills add https://github.com/sungjunlee/dev-relay --skill relay-dispatch
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/sungjunlee/dev-relay --skill relay-dispatch

简介

relay-dispatch 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前需确认权限范围、维护状态,注意是否触发联网、命令执行或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Relay Dispatch

Create a worktree and dispatch a task to an executor.

Usage

# Foreground (blocking — simple tasks, default executor: codex)
${CLAUDE_SKILL_DIR}/scripts/dispatch.js . -b feature-auth -p "..." --rubric-file rubric.yaml

# Same-run resume after a changes-requested review
${CLAUDE_SKILL_DIR}/scripts/dispatch.js . --run-id issue-42-20260403120000000 --prompt-file review-round-2-redispatch.md

# With explicit executor
${CLAUDE_SKILL_DIR}/scripts/dispatch.js . -e codex -b feature-auth -p "..." --rubric-file rubric.yaml

# Claude Code as executor (no Codex required)
${CLAUDE_SKILL_DIR}/scripts/dispatch.js . -e claude -b feature-auth -p "..." --rubric-file rubric.yaml

For background and parallel dispatch, see "Background & Parallel" section below.

Options

All CLI flags are registered with an explicit parsed or verbatim read mode. See references/cli-schema.md before adding or changing flags.

FlagDescription
--branch, -bBranch name (required)
--run-idResume an existing retained relay run
--manifestResume an existing retained relay run by manifest path
--prompt, -pTask prompt (include Context + Done Criteria + self-review)
--prompt-fileRead prompt from file (for large prompts)
--executor, -eExecutor: codex (default), claude
--model, -mModel override
--model-hintsPersist per-phase model hints as phase=model[,phase=model...]
--sandboxworkspace-write (default) or read-only
--copy <files>Additional files to copy
--timeoutTimeout in seconds (default: 1800)
--rubric-fileREQUIRED: persist the rubric generated by relay-plan into the run dir
--rubric-grandfatheredRetired alias; dispatch rejects it and operators must remove anchor.rubric_grandfathered manually
--request-idLink the run back to a relay-intake request artifact
--leaf-idLink the run back to a relay-intake relay-ready leaf
--done-criteria-filePersist a frozen Done Criteria anchor path into the run manifest
--registerRegister session in executor's app (keeps worktree)
--no-cleanupCompatibility alias; worktree is retained by default
--dry-runShow plan without executing
--jsonStructured JSON output (for background dispatch)

Creates worktree → writes a relay run manifest → runs executor → collects result. Exits with non-zero code on failure.

Each dispatch writes a manifest to ~/.relay/runs/<repo-slug>/<run-id>.md and appends lifecycle evidence to ~/.relay/runs/<repo-slug>/<run-id>/events.jsonl. run_id is the canonical identity for re-dispatch, review, merge, close, and reporting.

model_hints is an optional top-level manifest field. Dispatch consumes model_hints.dispatch only when --model/-m is not passed:

  • precedence: --model -> manifest.model_hints.dispatch -> executor default
  • same-run resume with --model-hints replaces the stored object and records model_hints_updated
  • --dry-run resolves effective_dispatch_model for plan output but emits no events

When dispatch resumes from relay-intake, it can also store source.request_id, source.leaf_id, and anchor.done_criteria_path so review stays pinned to the frozen snapshot.

Timeout guidance

Task typeTimeoutRationale
Simple implementation1800 (default)No self-review needed
With self-review loop3600Executor iterates 2-3 times
Complex / multi-file5400Deep implementation + thorough self-review

Verify Success

After dispatch completes, confirm before proceeding to review:

# JSON output: status, runId, manifestPath, runState, cleanupPolicy
# "completed" + "review_pending" → proceed to relay-review
# "completed-with-warning" + "review_pending" → inspect uncommitted work, then review
# "failed" + "escalated" → inspect error, fix or re-dispatch
gh pr list --head <branch> --json number,url,title

Successful dispatches retain the worktree by default. Use the returned runId, manifest, and worktree to continue review. Resume only from changes_requested; dispatch reuses the same run and worktree.

On re-dispatch, previous Score Log + reviewer feedback are auto-prepended to the prompt. Record attempt data via captureAttempt() before transitioning to changes_requested. Storage: ~/.relay/runs/<slug>/<run-id>/previous-attempts.json.

Handling Failures

FailureAction
Timeout (with commits)completed-with-warning — check worktree for uncommitted changes, proceed to review
Timeout (no commits)Increase --timeout or split task into smaller pieces
Executor error / no commitsRead result file; revise prompt and re-dispatch
Branch publication / PR creation failedInspect the dispatch error and outer-shell GitHub auth. relay-dispatch handles publication from the orchestrator shell.
Branch conflictsResolve in worktree or create fresh worktree from updated main
Network/transient errorWait 30s, retry once. If it fails again, escalate to user

Background & Parallel

Background dispatch

Run dispatch asynchronously so the orchestrator can continue other work (planning, reviewing, user interaction) while the executor runs.

Platform examples — async dispatch: Claude Code: Bash(run_in_background=true) | Codex: shell & or platform async | Other: any non-blocking execution
${CLAUDE_SKILL_DIR}/scripts/dispatch.js . -b task-42 --prompt-file tasks/42.md --rubric-file rubric.yaml --json --timeout 3600
# Run this command in the background using your platform's async mechanism
# When executor finishes → proceed to relay-review

Parallel dispatch (independent tasks)

Launch multiple independent dispatches concurrently:

# Each dispatch runs independently in the background
${CLAUDE_SKILL_DIR}/scripts/dispatch.js . -b task-42 --prompt-file tasks/42.md --rubric-file rubric-42.yaml --json &
${CLAUDE_SKILL_DIR}/scripts/dispatch.js . -b task-43 --prompt-file tasks/43.md --rubric-file rubric-43.yaml --json &
# Each completes independently → review each PR via relay-review

create-worktree.js — Standalone worktree creation

Create a worktree without dispatching, or register an existing worktree in Codex App:

# Create worktree in ~/.relay/worktrees/
${CLAUDE_SKILL_DIR}/scripts/create-worktree.js <repo> -b <branch>

# Register an existing worktree in Codex App (optional)
${CLAUDE_SKILL_DIR}/scripts/create-worktree.js <repo> --worktree-path <path> -b <branch> -t "Title" --register

Worktree Cleanup

Successful dispatches keep their worktree by default. Cleanup moves later in the lifecycle, typically after review or merge.

--no-cleanup remains accepted as a compatibility alias. --register still matters because it also opens the retained worktree in the executor app.

To prune stale retained worktrees safely from this repo:

${CLAUDE_SKILL_DIR}/scripts/cleanup-worktrees.js --repo .              # clean terminal runs > 24h old
${CLAUDE_SKILL_DIR}/scripts/cleanup-worktrees.js --repo . --all         # ignore age threshold
${CLAUDE_SKILL_DIR}/scripts/cleanup-worktrees.js --repo . --dry-run     # show what would be removed
${CLAUDE_SKILL_DIR}/scripts/close-run.js --repo . --run-id <run-id> --reason "stale_non_terminal_run"
${CLAUDE_SKILL_DIR}/scripts/reliability-report.js --repo . --json

Executor completed but did not commit

recover-commit.js handles the canonical "executor finished implementation but timed out before committing" path. Replaces the ad-hoc git add -A && git commit && git push -u && gh pr create shell sequence with a single command that preflights, commits via template, pushes (no force), creates the PR (idempotent on re-run), stamps git.pr_number via the shared lock helper, and emits a recover_commit event. Manifest STATE stays review_pending — the next step is the normal review.

# Standard recovery — dispatch returned commits="" + uncommitted!=""
${CLAUDE_SKILL_DIR}/scripts/recover-commit.js --run-id <id> \
  --reason "executor timeout at 1800s on 18-file refactor"

# Preview without touching anything
${CLAUDE_SKILL_DIR}/scripts/recover-commit.js --run-id <id> \
  --reason "..." --dry-run

# Override PR title / body (defaults derive from branch + run-id)
${CLAUDE_SKILL_DIR}/scripts/recover-commit.js --run-id <id> \
  --reason "..." --pr-title "..." --pr-body-file /tmp/pr-body.md

If a PR already exists for the branch, the command no-ops the create step and stamps pr_number from the existing PR — safe to re-run after a partial failure. Use --dry-run first when uncertain.

Operator state recovery

recover-state.js advances a relay run's state after an external event (fix commit pushed directly, dispatch stalled, no-op re-dispatch escalated the manifest). Replaces hand-edited manual_state_override entries with structured state_recovery events and validated transitions.

# Fix pushed directly to the PR branch → return to review without re-dispatch
${CLAUDE_SKILL_DIR}/scripts/recover-state.js --repo . --run-id <id> \
  --to review_pending --reason "external commit pushed; see <sha>"

# No-op re-dispatch escalated the run → bring it back for a fresh review
${CLAUDE_SKILL_DIR}/scripts/recover-state.js --repo . --run-id <id> \
  --to review_pending --force --reason "no-op-dispatch-recovery"

# Hung dispatch → unstick manifest so dispatch --run-id can resume
${CLAUDE_SKILL_DIR}/scripts/recover-state.js --repo . --run-id <id> \
  --to changes_requested --force --reason "dispatch hung; operator-killed"

Whitelisted transitions (unlisted pairs are rejected — use the normal dispatch/review/merge flow):

FromToForcePrecondition
changes_requestedreview_pendingnofresh commit on branch (HEAD ≠ review.last_reviewed_sha)
escalatedreview_pendingyes
escalatedchanges_requestedno
dispatchedchanges_requestedyes

The script refuses transitions ALLOWED_TRANSITIONS already supports — always prefer the normal flow when it applies. Terminal states (merged, closed) are not recoverable.

Caveats

  • Timeout: Use --timeout 3600+ when self-review is included
  • App restart (Codex-specific): Codex App needs restart to show new worktree threads
  • Exit codes: dispatch.js exits non-zero on failure — check before proceeding to review
  • Parallel merges: If parallel PRs touch the same files, merge one at a time and rebase the other

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.66%
按下载量换算32

Claude

32.45%
按下载量换算32

Cursor

16.83%
按下载量换算17

Gemini CLI

9.69%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/sungjunlee/dev-relay --skill relay-dispatch 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills