Skip to content
Automation
Skill

/pr-shepherd-contract

GitHub adapter binding for the shepherd contract: turn a real pull request into observed events, resolve the responsible actor from commit authorship, and persist the waiting contract under the workspace so a later pass (or process) can resume it.

From plugin
sutando
41087 skills20 hooks

Claude Code

$ npx -y skills add sonichi/sutando --skill pr-shepherd-contract --agent claude-code

SKILL.md

pr-shepherd-contract.SKILL.md
name: pr-shepherd-contract
description: "GitHub adapter binding for the shepherd contract: turn a real pull request into observed events, resolve the responsible actor from commit authorship, and persist the waiting contract under the workspace so a later pass (or process) can resume it."

PR Shepherd Contract (GitHub adapter)

The GitHub binding for the provider-neutral shepherd contract (`src/shepherd_contract.py`). The contract defines WHAT a shepherd task is responsible for and WHICH observed events count; this skill supplies the GitHub-specific half:

  • **Observation** — `observe(repo, number)` reads live PR state via the

GitHub CLI (`gh api`) and emits one `ObservedEvent` (merged / closed unmerged / updated).

  • **Actor resolution** — `resolve_actor(repo, number)` uses the last

non-merge commit's author email (`git.commit_author_email`), not the account login, because several actors can push under one login.

  • **Persistence** — `save(task_id, scope, state)` / `load(task_id)` /

`resume(task_id)` keep the durable contract record under `<workspace>/state/shepherd/`, create-or-advance only (never rebind), so a different process can pick the objective up later.

Usage

Import from the skill's scripts directory (the module bootstraps `src/` onto `sys.path` itself):

import sys, pathlib
sys.path.insert(0, str(repo_root / "skills" / "pr-shepherd-contract" / "scripts"))
import shepherd_github as g

scope = g.scope_for("owner/repo", 123, g.resolve_actor("owner/repo", 123))
g.save("task-abc", scope, "waiting", "shepherding PR 123")
# ... later, any process:
state, why = g.resume("task-abc")

Tests: `tests/shepherd-github-durability.test.py`, `tests/shepherd-github-integrity.test.py` (contract policy itself: `tests/shepherd-contract-admission.test.py`).

Read more
@sonichi
Ships withsutando

My AI Stand — Realtime by Day, Rewriting Itself by Night. Summon my AI superpower. Voice, vision, screen, meetings, calls when I'm engaged. Learns my patterns, ships its own code when I'm not. Runs across my Macs, interacts with people & their Stands.

Stars on GitHub

Momentum

stars in total
410
Star history of sonichi/sutando on GitHub, a chart by star-history.com

Other skills on sutando.

ag2-space-mcp

ag2-space-mcp

Connect this Sutando install to AG2 Space's hosted MCP as its own agent, without the desktop app, and know which room and Commons…

@sonichi@sonichiInstall Skill
ag2space-voice

ag2space-voice

s.space voice surface — binds the room the s.space client announces to the voice session's origin, so work delegated by voice in…

@sonichi@sonichiInstall Skill
agent-activity

agent-activity

Streams what the agent is doing into the room, as rows the desktop client renders in an **events drawer** above the composer…

@sonichi@sonichiInstall Skill
agent-registry

agent-registry

Local Agent Registry — a standalone, dependency-free service that tracks running Claude Code (and other) agent instances. Agents…

@sonichi@sonichiInstall Skill
agent-room-ops

agent-room-ops

For an all-room analysis sweep, use the tested window collector and coverage contract in…

@sonichi@sonichiInstall Skill
answer-format

answer-format

Deterministic final-answer normalizer — a last-step pass for any task that ends in a *precise* answer (a number, a short string,…

@sonichi@sonichiInstall Skill

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n2w209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about pr-shepherd-contract.

Which coding agents can use pr-shepherd-contract?
pr-shepherd-contract installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.