jackin-project/jackin-dev

jackin-checkout-pr

Use only when the user explicitly requests this skill.

Quelltext ansehen

Verwendung

  1. Installationsbefehl kopieren und das Quellpaket vor der Installation in der eigenen Agentenumgebung prüfen.
  2. Benötigte Werkzeuge, Zugangsdaten und Hosts im Original prüfen.
  3. Eingabe und gewünschtes Ergebnis beschreiben und die Ausgabe mit den Quellen abgleichen.
npx skills add https://github.com/jackin-project/jackin-dev --skill jackin-checkout-pr

Vor dem Start

  • Die Installation umfasst weder Modellabo noch API-Kontingent oder Dateizugriffsrechte.
  • Sterne und Installationen zeigen Aktivität, keine unabhängige Qualitäts- oder Sicherheitsprüfung.
Originales Skill-Dokument

Aus dem Quell-Repository gerendert; Überschriften, Beispiele, Code, Tabellen, Links und Bilder bleiben erhalten.

jackin-checkout-pr

Switch the working repo onto a PR's branch via gh pr checkout. Accepts a number, URL, or branch name.

Process

  1. Resolve to a PR number. Number or URL → pass to gh pr checkout directly. Branch name → gh pr list --head <branch> --state all --json number -q '.[0].number'; no match → STOP, do not fall back to raw git checkout.
  1. Guard the working tree. git status --porcelain — if dirty, STOP and ask the operator to commit, stash, or discard first. Never auto-stash. Note git branch --show-current (the way back).
  1. Check the PR is open. gh pr view <N> --json state,headRefName. MERGED or CLOSED → warn (the branch may be stale) and confirm before proceeding.
  1. Switch. gh pr checkout <N>. Verify git branch --show-current matches headRefName.
  1. Report. Switched from <old> to <headRefName> (PR #N). Way back: git switch <old>.

Verwandte Aufgaben

aus demselben Repository

Weitere Skills

Alle Skills