pr-shepherd-contract

pr-shepherd-contract is a skill for Claude Code, Codex from sonichi/sutando. It costs 53 tokens per session (446 once invoked), scanned A, original, MIT.

A GitHub-specific contract for waiting on a pull request event, such as a merge or closure, and resuming the work later. A pull request is a proposed code change submitted for review.

In plain words
What is it for?
Observing a pull request, identifying the author of its latest non-merge commit, and saving or resuming the waiting task under a workspace.
Why use it?
It preserves what the task is waiting for and who is responsible, even if another process continues it later.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sonichi/sutando/pr-shepherd-contract
Any agent
npx skills add sonichi/sutando --skill pr-shepherd-contract
Clone the repo
git clone --depth 1 https://github.com/sonichi/sutando

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pr-shepherd-contract

README.md
[![agentmods](https://agentmods.dev/badge/skills/sonichi/sutando/pr-shepherd-contract.svg)](https://agentmods.dev/skills/sonichi/sutando/pr-shepherd-contract)
Your own site
<a href="https://agentmods.dev/skills/sonichi/sutando/pr-shepherd-contract"><img src="https://agentmods.dev/badge/skills/sonichi/sutando/pr-shepherd-contract.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 446 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.00446
Opus 5 $0.00026 $0.00223
Sonnet 5 $0.00011 $0.00089
Haiku 4.5 $0.00005 $0.00045

Measured 6d ago against content hash cb506c9d4b61, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

pr-shepherd-contract scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/shepherd_github.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pr-shepherd-contract/SKILL.md · 43 lines

What it actually says

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:

  • Observationobserve(repo, number) reads live PR state via the GitHub CLI (gh api) and emits one ObservedEvent (merged / closed unmerged / updated).
  • Actor resolutionresolve_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.
  • Persistencesave(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).

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 43 lines · 53 tokens per session scan A cb506c9d4b61

Subscribe to this mod's changes

pr-shepherd-contract is a skill published in the GitHub repository sonichi/sutando (391 stars, last pushed today), licensed MIT. It adds 53 tokens to every session and 446 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

contacts

Manage contacts, communication channels, access control, and invite links.

vellum-ai/vellum-assistant · 14 tokens

gmail

Manage Gmail email — drafting, sending, organizing, filters, vacation replies, and inbox analysis.

vellum-ai/vellum-assistant · 20 tokens

app-builder

Build and edit small, personal visual tools and artifacts — dashboards, trackers, calculators, data visualizations, charts, simple landing pages, and slide decks the user wants for THEMSELVES. This is the right skill whenever the user asks to "visualize this," "make a chart," or "build an artifact" for their own use…

vellum-ai/vellum-assistant · 162 tokens

assistant-migration

Migrate from ChatGPT, Claude, OpenClaw, Hermes, Manus, and other AI assistants into Vellum by inspecting their data exports, conversation archives, files, prompts, custom instructions, memory, saved memories, tools, GPTs, workflows, integrations, and relationships, then mapping as much as safely possible into Vellum…

vellum-ai/vellum-assistant · 90 tokens

guardian-verify-setup

Set up channel verification for phone, Telegram, Slack, Discord, or email channels via outbound verification flow.

vellum-ai/vellum-assistant · 26 tokens

vellum-memory-v3-migration

One-time migration of an existing memory-v2 concept corpus into the memory-v3 section-grain "wiki" — topical articles with a stand-alone lead and queryable sections — with loss-proof staging, assistant-reviewed authoring, and a retrieval-eval gate before cutover.

vellum-ai/vellum-assistant · 63 tokens