Ghstack Ci logo

Ghstack Ci

OrganizationPopular
pytorch
ghstack-ci

Manage CI for PyTorch ghstack stacks by running CI where its results are useful now and deferring other PRs with [no-ci]. Use when creating, submitting, updating, restacking, or landing a stack of PRs.

Overview

Publisherpytorch
Repositorypytorch
Skill nameghstack-ci
Stars
103.6K
Forks
31K
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by pytorch on GitHub. Read the source before you install it.

Installation

Install the Ghstack Ci AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/pytorch/pytorch/tree/main/.claude/skills/ghstack-ci
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/pytorch/pytorch.git /tmp/pytorch
mkdir -p .claude/skills
cp -r /tmp/pytorch/.claude/skills/ghstack-ci .claude/skills/ghstack-ci
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ghstack Ci in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ghstack Ci on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ghstack Ci is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

CI for ghstack stacks

Keep CI usage low by running it where the results can guide the current work. Explicitly mark deferred PRs with the [no-ci] title prefix, and remove it when their results become useful. Follow explicit user CI preferences.

Use the exact [no-ci] spelling described in Skip CI while iterating.

Choosing where to run CI

  • Run CI on PRs being prepared for review or landing, or when its results are needed to diagnose a failure or validate a change on a CI-only platform.
  • Run CI on an upper PR when it provides needed integration coverage for several changes together. Stack position alone is not a reason to defer it.
  • Consider deferring speculative or rapidly changing PRs whose results will not affect the next decision, or upper PRs waiting on a known lower-stack fix. Keep CI enabled wherever it is needed to investigate that fix.

For stacks longer than five PRs, the bottom five are a useful starting point when preparing to land from the bottom: consider deferring higher PRs until their results are needed. Five is a hint to limit repeated CI during iteration, not a quota or a cap. Use fewer or more as the work needs. For example, in a stack A through H, CI might be useful on A through E while F through H are still speculative. Enable G too if its integration results are needed now; after A and B land, reassess F through H instead of automatically enabling a fixed number of PRs.

Before GitHub writes or workflow reruns, follow CLAUDE.md and AI_POLICY.md. Show the exact PR numbers, old/new titles, and runs to rerun, and obtain explicit approval for any actions not already approved. Existing approval for those exact changes does not need to be repeated.

Submitting or updating a stack

  1. Identify the full stack in dependency order, from bottom to top, including commits that will become new PRs. Use commit ancestry and Pull-Request trailers, and refresh existing PR titles and states with gh. Exclude landed changes. GitHub can show a ghstack PR as closed after it lands; confirm landing on main rather than relying only on the MERGED state.
  2. Choose PRs whose results are useful now. Prefix the other titles with [no-ci] , for example [no-ci] Add another operator. Preserve the rest of each title and avoid adding the prefix twice. Record the PR numbers and reasons for deferring them in the task notes.
  3. Before creating new PRs with ghstack, put the prefix in the commit subjects for deferred PRs. The initial PR title comes from the subject, so setting it only after creation can let CI start.
  4. For existing PRs, add or remove the prefix in both the live PR title and the corresponding commit subject before submitting updates. Ordinary ghstack submissions preserve GitHub titles; ghstack -u replaces them from commit subjects. Keep their prefix state consistent so a later ghstack -u cannot undo the CI decision. When rewording a commit, read and preserve its current Pull-Request: and ghstack-source-id: trailers, and follow the repository's submission rules.

Adding [no-ci] does not cancel CI that is already running.

Enabling CI and advancing the stack

After updates, restacks, reorders, or lower PRs landing, refresh the stack and reassess where CI is useful. To enable a PR, remove the leading prefix and its separating space from both its live title and commit subject. Preserve explicit user requests to defer CI. If a prefix's origin or purpose is unknown in the current context, ask before removing it unless the user has already explicitly authorized enabling CI for that PR. Do not assume task notes from a previous session are available.

Enable CI after removing the title prefix: push an actual update with ghstack, or rerun the latest workflows that failed at the [no-ci] gate for that PR's current head. A title edit alone does not start CI.

Set pr_number to the selected PR and inspect its current checks:

bash
gh pr checks "$pr_number" --repo pytorch/pytorch --json name,state,workflow,link,bucket,completedAt

Set check_link to a candidate failed gate's Actions link. For a link with the path /pytorch/pytorch/actions/runs/12345/job/67890, the run ID is 12345. Extract it and inspect the run:

bash
run_id="${check_link#*/actions/runs/}"
run_id="${run_id%%/*}"
gh pr view "$pr_number" --repo pytorch/pytorch --json headRefOid
gh run view "$run_id" --repo pytorch/pytorch --json headSha,conclusion,jobs
gh run view "$run_id" --repo pytorch/pytorch --log-failed

Confirm that the run's headSha matches the PR's headRefOid and its logs show failure at the [no-ci] gate. Rerun each distinct selected run ID once with gh run rerun "$run_id" --repo pytorch/pytorch; several checks may belong to the same run. Avoid stale heads and unrelated failures. Record the updated enabled and deferred PRs in the task notes when done.

Before landing

Enable CI for every open PR included in the landing, including lower dependencies. Remove [no-ci] from their live titles and commit subjects, and wait for the required checks to pass on their current heads before requesting the merge. The prefix intentionally fails a merge-blocking gate, and the live PR title becomes the landed commit subject. CI on an upper PR does not replace required checks on the lower PRs being landed.

Frequently asked questions

What does the Ghstack Ci AI skill do?

Manage CI for PyTorch ghstack stacks by running CI where its results are useful now and deferring other PRs with [no-ci]. Use when creating, submitting, updating, restacking, or landing a stack of PRs.

Why use Ghstack Ci on TypingMind?

Because you install it once and use it with any model. Ghstack Ci is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ghstack Ci in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/pytorch/pytorch/tree/main/.claude/skills/ghstack-ci. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Ghstack Ci?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ghstack Ci?

As many as you like. As long as a model supports skills, you can use Ghstack Ci with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ghstack Ci AI skill free?

It is published on GitHub by pytorch. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇