/shared:githubfrom shared
Executes GitHub repository workflows: PRs, branches, Actions, reviews, merge/deploy state, issue comments, and safe cleanup. Includes scripts for API transport, PR management, issue/comment helpers, and CI diagnostics.
Ships in shared. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use this skill for repository execution: branches, pull requests, Actions,
reviews, merge and deploy state, issue comments, and safe cleanup. Pull
requests are the implementation record. For repositories with DIRECTION.md,
follow the shared executing loop through PR
landing and runtime reconciliation. Apply
task scope and authorization; it defines
how existing approval and task boundaries apply.
scripts/github-repo-snapshot.sh. It checks for Director
Launchplane configuration before reading enrollment from the active policy;
configured-but-unavailable reads mean unknown. Resolve landing under
Merging. Use github-plan when
planning state matters. Repo workflow holds
orientation, PR, check, review, merge-readiness, and cleanup detail; read
the section for the step you are on.scripts/dev-worktree with the documented per-host setting.
A host with a guarded helper keeps that command until its hostHelper
setting is provisioned; never use the portable default to bypass host policy.babysit-pr.github-plan
to sweep stale, duplicate, and related planning issues, and clean up.github-plan owns durable planning: plan issues, parent and sub-issue graphs,
blockers, milestones, Projects, roadmap and focus state, stale or duplicate
plan cleanup, and the raw commands behind them
(gh issue list, gh search issues, gh project, and planning GraphQL
relationship and Project operations). This skill owns transactional execution:
PR create, edit, comment, and merge; issue create, edit, and close bodies; CI
diagnosis; and repository cleanup. It may comment on, link, or close issues
during implementation, but it does not flatten broad planning into one issue.
Do not copy roadmap, blocker, or checklist state into repo docs; change docs
only when they must describe current behavior, configuration, or policy.
The policy.command_policies block in this file's frontmatter maps raw gh
write and check commands to helpers. A host that hides frontmatter enforces it
when a command runs, and the refusal names the replacement; read the top of
this file for the full mapping and the commands entries. Use raw gh only
for a surface no helper covers, route it through scripts/gh-with-env-token,
and say why.
scripts/gh-pr.py view|checks|create|edit|comment|ready|update-branch|merge|supersede.
--repo is global and comes first:
uv run scripts/gh-pr.py --repo OWNER/REPO merge 123 --method merge. To
create a PR in another repository, run from it or pass --repo with an
explicit --head BRANCH.scripts/git-commit-as-bot
and scripts/git-push-as-bot, with --worktree /absolute/task/path first.
Supply the worker’s intended task path literally, independently of the current
directory; do not derive it from pwd or Git discovery. Both helpers refuse
missing paths, primary checkouts, other workers’ checkouts, and checked-out main/master or known default branches before identity selection or writes. Subdirectories are allowed.
Never refresh your own PR branch merely because it is behind; require a real
conflict or an explicit check requirement. The merge train owns freshness on
train-routed PRs. Before a base update, apply the ownership and authorization
checks in Merge Readiness, then use
gh-pr.py update-branch. The helpers enforce this rule: when an update is
required for another reason, name it with --required-by or
--refresh-required. For local integration,
use git-commit-as-bot --worktree /absolute/task/path --git-command merge|pull|rebase|cherry-pick|revert|am
from that task worktree, followed by that command's arguments, including
--continue after resolving
conflicts. Existing commits retain their authors; newly created commits use
the bot environment and recreated commits use the bot committer. This does
not authorize changing protected branches or taking over train-owned work.
Plain merge --ff-only <ref> (with --ff-only first after merge and
without a conflicting fast-forward option),
--abort, and --quit remain available because they create no commits.scripts/gh-issue; from the catalog
root (skills/), github/scripts/gh-issue create "Title" --repo OWNER/REPO < body.md.scripts/gh-pr.py comment --body-file FILE --reviewed-head FULL_SHA after weighing the completed review. It posts the
free-text disposition and explicit completion metadata in one comment; see
ready handoffs. Ordinary progress
comments and raw Supervisor reports do not attest completion.scripts/gh-pr.py comment --body-file or
scripts/gh-comment for timeline comments;
scripts/gh-with-env-token pr review --body-file for review feedback.
For images/videos, repeat --attach FILE[#alt] with per-command GH_WITH_ENV_TOKEN_OWN_USER=1: Chris-owned repos only; the helper posts text as the bot first, then only attachments and a linked “Posted by an agent.” line as Chris. PDFs stay manual.github-ci-diagnose.py prioritizes test, helper and validator
causes. Raw gh run view or gh api log reads are fallback diagnostics.gh-issue, gh-comment, and gh-with-env-token are shell executables without
a .sh suffix; run them directly. Run PEP 723 .py helpers with uv run; see
Helper Invocation. Pass
Markdown bodies through a file or stdin; an unquoted heredoc runs command
substitution inside backticks.
Writing to another person's repository requires your Director's approval; replies follow the Client-reply rule, with exact-text approval for outside people unless another authorized flow covers them. The same-issue Supervisor reply flow is one such flow; other existing flows and approvals remain. Apply this before selecting a posting identity.
GitHub writes belong to the configured automation account. The helpers select its credentials and fail closed, without changing actor, when bot auth is unavailable, rejected, or rate-limited. The helpers choose the identity for each target repository:
GH_WITH_ENV_TOKEN_OWN_USER=1 on each authorized
command that writes there. Without
it the helpers refuse and name the opt-in; a value in local.env does not
count. Configure the person's personal login as described under
Primary App and contributor identity.
With the opt-in, publishing checks that the active account matches that
declaration, and the helpers print acting as your own GitHub user.
With the opt-in, reads of a private repository there that the App cannot
see also use that login, scoped to the repository. In any repository, the
opt-in also runs gh api reads that only an account can answer (user/...,
notifications, repos/OWNER/REPO/subscription, and the declared login's
billing under users/LOGIN/settings/billing/...) and gh repo fork without
--org as that login; other reads keep the App.
Commits keep your git identity, and gh-pr.py create adds the
AI-assistance sentence to the body unless it already says so.
For a fork contribution, the commit's identity follows the fork's origin
unless git-commit-as-bot --worktree /absolute/task/path --repo UPSTREAM-OWNER/REPO names the pull
request's target; see
Primary App and contributor identity.
GH_WITH_ENV_TOKEN_REQUIRE_AUTOMATION_AUTH=1 refuses even with the opt-in.Client fleets may configure a second narrow App by repository owner; read Client fleet configuration when setting up or diagnosing that route. The installation rules above apply to the selected App. Without a Client installation, ordinary reads may use the declared personal account under the existing per-command own-user opt-in only after an unauthenticated GitHub repository read confirms public visibility. Private or unverified repositories still fail clearly; writes are unchanged.
Otherwise never fall back to the active human gh account unless the user
explicitly approves that one-off; then set
GH_WITH_ENV_TOKEN_ALLOW_ACTIVE_AUTH_FALLBACK=1 for that command only. This
covers unavailable, rejected or rate-limited automation authentication, never
an API permission refusal. For separately authorized administration on a
personally owned repository, such as an approved archive, read verified repository-owner administration
and use gh-owner-admin.py, which reuses the existing ruleset repository-owner transport.
A denial stops that action; this route is selected before a call, never used
to replay a denied call as another identity. For
credential sources, automation-only mode, or identity configuration, read
Authentication And Identity.
Helpers own retries and write reconciliation through scripts/github_api.py
and references/operation-matrix.toml; do not add retry loops or rebuild
helper behavior. When a result is not a confirmed success, for example an
unknown outcome_certainty or write_outcome, or a
recommended_next_action, read that operation's entry in the
CLI reference and its
Shared Retry Policy before
acting. Read the object back before any retry. Never replay an unknown write,
and never under another identity. For another operation's arguments or response
contract, read its CLI reference section; skip unrelated recipes.
For files linked from private issue bodies or comments, use scripts/gh-attachment.py
under the recorded Q467 standing approval, without a per-file question. App installation
tokens may read the comment while failing to read its attachment. This narrow
route supports only repositories owned by the declared personal login, verifies
the source, link and current approval through automation, and saves untrusted
bytes only to private task evidence outside Git checkouts.
Read comment attachments
before using it. Never obtain or paste a token into an agent command.
Use PRs for all non-trivial changes.
test.local and
test.ci, run
focused local tests plus required lint and type checks, selecting
qualityGate.test.local rather than the full qualityGate.test.ci gate under the
test command contract.
Preserve legacy test.default requirements until the repository adopts the
split. For safety, authorization, approval-rule, destructive-helper and
shared-infrastructure changes, also run locally the full test modules for the
safety areas touched, as described in
Gate Selection. Under the split,
the complete suite runs only in CI; Ready and merge evidence follow the
test command contract.
Pushing opens that CI feedback loop and does not require it to have run locally.
For code changes, run
jetbrains-inspection on the changed files before pushing or updating a PR.
If .github/github.json defines qualityGate.inspection, PR creation and
updates, ready-to-merge claims, and merges carry that evidence or an explicit
not-run reason. If that config
is blank, missing, contradictory, or surprising, use a one-off
changed_files check only when the helper can infer the route, and ask before
changing durable config or trusting a suspicious value. If inspection is
unavailable, record the not-run reason before pushing.preview-ready, the optional awaiting-qa handoff, own-project for
own-project work in a mixed repository, and the merge-train enqueue label
from active policy, which still needs a fresh readiness check and merge
authorization.babysit-pr. Use its --once snapshot
for a merged or closed PR's closeout evidence.Refs instead
of closing keywords, comment with the winner, and close them with
scripts/gh-pr.py supersede. Remove their branches and worktrees only under
repository cleanup, after confirming no
issue, PR, session, or runtime depends on them.uv run <github-skill-dir>/scripts/gh-pr.py --repo OWNER/REPO ready <pr>;
use --waiting-for-client until a required Client acceptance covers the
current head. Read ready handoffs
for the check and comment contract. After a Client review request, mark every
later commit under Client-impact trailers.
Local handoff files are scratch unless
intentionally committed.For a single PR or a stack, read the Director's overall OWNER/direction,
repository and applicable global instructions, and task context first. Any
train requirement there takes precedence over local configuration absence;
missing host configuration then leaves routing unknown, never a direct merge.
An explicitly declared Launchplane setup or custom admin config path also
means configured, even if the local detector finds nothing. Use that supplied
configuration for the policy read; an unreadable setup still leaves routing
unknown. Local absence never overrides a known Director setup.
Resolve the landing route from the snapshot's
launchplane.mergeTrain before any direct merge or branch integration:
not_configured means no Launchplane configuration was found on this host.
With no train requirement in the sources above, the Director without
Launchplane uses the repository's own protected-branch PR merge, with the
authority and fresh checks below. Skip Launchplane skill, policy, context
and train steps; no Launchplane setup or repair is needed.enrolled uses the train; not_enrolled is a confirmed active-policy read
and allows the repository's protected-branch route unless instructions assign
it to the train.unknown keeps the PR for authoritative routing. Report the read's reason;
a failed, refused or malformed read never becomes not_configured or permits
a direct merge.Repository metadata is only a positive configuration/routing hint, never enrollment authority. The snapshot's local configuration check also considers Launchplane environment settings and private config presence without reading credentials. Missing metadata or a missing URL alone does not prove absence.
When Launchplane's active policy, repository instructions,
or task context assigns landing to its merge train, load
launchplane and use that
workflow. Follow the task's assigned direction or Supervisor handoff; otherwise
use the train workflow within the task's existing landing authorization.
For a configured Director whose route is unresolved, use the Launchplane
skill's enrollment read; an unavailable read still leaves enrollment unknown.
Merging implementation work means merging its PR through GitHub. Never merge a task branch locally into a protected branch as a shortcut; local integration is only for explicit synchronization or stack maintenance, and the result still lands through a PR. If that happens by accident, preserve the work, restore the local protected branch to the remote tip, push the task branch, and continue through the PR. Never push the accidental merge.
Before any merge or authorized train entry, apply these checks regardless of the landing route:
uv run ../github-work-rollup/scripts/github_unanswered_comments.py --thread OWNER/REPO#NUMBER.
An attention result or degraded coverage needs a response or explicit
handoff first; targeted public replies clear comments under the
radar rule.
gh-plan.py close and gh-issue close refuse over an unanswered outside
comment on the issue or a thread it links; see
Planning: Management.For an authorized direct GitHub merge, when the user does not name a method,
say you are using a normal merge commit and run scripts/gh-pr.py merge <pr> --method merge. Use --method squash
or --method rebase only when the user asks, repo policy requires it, or you ask and get
confirmation.
Outside a train-owned landing, consider a rollup branch for stacked PRs when merging each layer would rerun expensive checks or churn conflicts.
Remote merge success and local reconciliation are separate outcomes; report both. A blocked or failed local step never turns a confirmed merge into a failure and never causes a merge retry.
merge.sha from a successful direct merge,
mergeCommitOid from a fresh merged-PR view, or the final landing commit from
a terminal train controller result. Never substitute a PR head, candidate, or
other intermediate SHA.scripts/reconcile-runtime-checkout.py
with the source worktree and full landing SHA; see
Runtime Checkout Reconciliation.
It fast-forwards only a clean checkout already on the default branch that
shares Git identity with the merged worktree. Treat runtime-dependent evidence
as stale until it succeeds or the source revision is verified.uv run scripts/gh-plan.py --repo OWNER/REPO reconcile-landing --pr N --apply
for closing-reference metadata; the management reference
owns its readback and review-required outcomes. The helper also discovers
non-closing source references and reconciles native parent/dependent status
from existing waits and blockers. Review any open source finish line in full;
close through github-plan only when complete, then rerun reconciliation.
A related landing or metadata receipt never proves a parent's own exit criteria.references/cli-reference.md (opens in a new tab)references/config-schema.md (opens in a new tab)references/execution-environment.md (opens in a new tab)references/github-permissions.md (opens in a new tab)references/github-projects.md (opens in a new tab)references/issue-templates.md (opens in a new tab)references/operation-matrix.toml (opens in a new tab)references/post-merge-checkouts.md (opens in a new tab)references/repo-workflow.md (opens in a new tab)references/work-evidence.md (opens in a new tab)references/worktrees.md (opens in a new tab)scripts/check_client_placeholders.py (opens in a new tab)scripts/dev-worktree (opens in a new tab)scripts/dev_worktree.py (opens in a new tab)scripts/director_mentions.py (opens in a new tab)scripts/director_question_gate.py (opens in a new tab)scripts/fixtures/archived-repositories.json (opens in a new tab)scripts/fixtures/context-panel-828-released-status.json (opens in a new tab)scripts/fixtures/direction-43-d2-handoff.json (opens in a new tab)scripts/fixtures/direction-43-d4-handoff.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
Generated from the plugin's indexed repository (cbusillo/codex-skills) — no native marketplace selected
npx claudepluginhub p/cbusillo-shared27 skills in this plugin
/babysit-prBabysit a GitHub pull request by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep watching open PRs so fresh review feedback is surfaced promptly. Use when the user asks to monitor a PR, watch CI, handle review comments, keep an eye on failures/feedback, or when PR diagnosis, update/rebase/rerun work, safe-to-exit checks, or merge confirmation turns into ongoing CI/review/merge follow-through./directionUse when the Director starts a direction session, asks for a north star, dead reckoning, a daily or weekly direction check, a direction audit, or milestone proposals; when a repository's DIRECTION.md must be created or changed; or when an executing agent holds a reviewer finding that would change an agreed outcome, in either direction, and must escalate it instead of acting. The Director decides, the direction agent drafts and argues with evidence. Not for planning work inside a milestone (github-plan) or for running a reviewer (model-review)./docs-lookupUse when the answer depends on external docs, environment-specific operational context, or facts about the user's own setup, including devices, radios, networks, accounts, or what is installed where. Look up setup facts in the user's docs or reachable systems before asking the user. Includes discovering source-of-truth docs and access paths for private operations such as DNS or Cloudflare records, and finding where a credential, API token, or secret is stored, but not performing infrastructure actions or mutations./frontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults./github-planUse when the user asks for a plan, what's next / what is next in a plan or workstream, how work fits the plan, plan direction/alignment, durable work tracking, roadmap, workstream planning, GitHub issue-backed planning, issue graphs, parent issues, sub-issues, blockers, milestones, Projects. Use declared repo docs before private operational lookup; use docs-lookup only for missing operational context. Think in chat first, then keep long-running work aligned over time by updating Current Status, blockers, relationships, and issue graph state as reality changes./github-work-rollupProduce read-only GitHub work rollups and external-comment attention reports. Use for activity summaries, work digests, or finding issue/PR comments the Director may not have seen or answered.