Gym: Skill for Claude Code

.agents/skills/gh-stack/SKILL.md

gh-stack is a skill for Claude Code, Codex from NVIDIA-NeMo/Gym. It costs 65 tokens per session (9,057 once invoked), scanned A, original, Apache-2.0.

A GitHub command-line workflow for stacked branches and pull requests. A stack is a chain of dependent branches where each pull request builds on the one below it.

In plain words
What is it for?
Use it to create, navigate, rebase, push, synchronize, inspect, or rebuild a stack of related branches and pull requests.
Why use it?
It keeps large changes split into smaller reviewable layers while preserving their dependency order.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is NVIDIA-NeMo/Gym's own configuration. It tells Claude Code and Codex how to work on Gym itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Gym configures →

About the project

NVIDIA-NeMo/Gym is a library and infrastructure for evaluating and improving models and agents inside environments, where each environment defines tasks, agent interaction, verification, and execution state. It is for teams running reproducible evaluations or training at scale across settings such as code execution, tool calling, and sandboxes, and the catalogue entries provide skills and instructions for working with it.

NVIDIA-NeMo/Gym · 1,320 stars · on GitHub · docs.nvidia.com

Reuse

Borrowing it

Nothing to install: this file belongs to NVIDIA-NeMo/Gym. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/NVIDIA-NeMo/Gym/main/.agents/skills/gh-stack/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/NVIDIA-NeMo/Gym

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 gh-stack

README.md
[![agentmods](https://agentmods.dev/badge/skills/nvidia-nemo/gym/gh-stack/github.svg)](https://agentmods.dev/skills/nvidia-nemo/gym/gh-stack)
Your own site
<a href="https://agentmods.dev/skills/nvidia-nemo/gym/gh-stack"><img src="https://agentmods.dev/badge/skills/nvidia-nemo/gym/gh-stack/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gh-stack

Your own site · 80×15
<a href="https://agentmods.dev/skills/nvidia-nemo/gym/gh-stack"><img src="https://agentmods.dev/badge/skills/nvidia-nemo/gym/gh-stack.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,057 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00065 $0.09057
Opus 5.5 $0.00026 $0.03623
Sonnet 5.5 $0.00013 $0.01811
Haiku 4.5 $0.00006 $0.00906

Measured 2mo ago against content hash 088d8e9895ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gh-stack 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 2mo ago.

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.

.agents/skills/gh-stack/SKILL.md · 857 lines

How it starts

The opening of the file, as written. The whole thing — 857 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gh-stack

gh stack is a GitHub CLI extension for managing stacked branches and pull requests. A stack is an ordered list of branches where each branch builds on the one below it, rooted on a trunk branch (typically the repo's default branch). Each branch maps to one PR whose base is the branch below it, so reviewers see only the diff for that layer.

main (trunk)
 └── feat/auth-layer     → PR #1 (base: main)               - bottom (closest to trunk)
  └── feat/api-endpoints → PR #2 (base: feat/auth-layer)
   └── feat/frontend     → PR #3 (base: feat/api-endpoints) - top (furthest from trunk)

The bottom of the stack is the branch closest to the trunk, and the top is the branch furthest from the trunk. Each branch inherits from the one below it. Navigation commands (up, down, top, bottom) follow this model: up moves away from trunk, down moves toward it.

When to use this skill

Use this skill when the user wants to:

  • Break a large change into a chain of small, reviewable PRs
  • Create, rebase, push, or sync a stack of dependent branches
  • Navigate between layers of a branch stack
  • View the status of stacked PRs
  • Tear down and rebuild a stack to remove, reorder, or rename branches

Prerequisites

The GitHub CLI (gh) v2.0+ must be installed and authenticated. Install the extension with:

gh extension install github/gh-stack

Before using gh stack, configure git to prevent interactive prompts:

git config rerere.enabled true           # remember conflict resolutions (skips prompt on init)
git config remote.pushDefault origin     # if multiple remotes exist (skips remote picker)

Agent rules

All gh stack commands must be run non-interactively. Every command invocation must include the flags and positional arguments needed to avoid prompts, TUIs, and interactive menus. If a command would prompt for input, it will hang indefinitely.

  1. Always supply branch names as positional arguments to init, add, and checkout. Running these commands without arguments triggers interactive prompts.
  2. When a prefix is set, pass only the suffix to add. gh stack add auth with prefix feat → feat/auth. Passing feat/auth creates feat/feat/auth.
  3. Always use --auto with gh stack submit to auto-generate PR titles. Without --auto, submit prompts for a title for each new PR.
  4. Always use --json with gh stack view. Without --json, the command launches an interactive TUI that cannot be operated by agents. There is no other appropriate flag — always pass --json.
  5. Use --remote <name> when multiple remotes are configured, or pre-configure git config remote.pushDefault origin. Without this, push, submit, sync, link, and checkout trigger an interactive remote picker.
  6. Avoid branches shared across multiple stacks. If a branch belongs to multiple stacks, commands exit with code 6. Check out a non-shared branch first.
  7. Plan your stack layers by dependency order before writing code. Foundational changes (models, APIs, shared utilities) go in lower branches; dependent changes (UI, consumers) go in higher branches. Think through the dependency chain before running gh stack init.
  8. Use standard git add and git commit for staging and committing. This gives you full control over which changes go into each branch. The -Am shortcut is available but should not be the default approach—stacked PRs are most effective when each branch contains a deliberate, logical set of changes.
  9. Navigate down the stack when you need to change a lower layer. If you're working on a frontend branch and realize you need API changes, don't hack around it at the current layer. Navigate to the appropriate branch (gh stack down, gh stack checkout, or gh stack bottom), make and commit the changes there, run gh stack rebase --upstack, then navigate back up to continue.
  10. Use gh stack link for external tool workflows. When branches are managed by an external tool (jj, Sapling, etc.), use gh stack link branch-a branch-b. link does not rely on local tracking state and is intended for API-driven PR and stack management. Always provide at least 2 branch names or PR numbers.

Read the full file on GitHub · 857 lines

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. 2mo ago First seen · 857 lines · 65 tokens per session scan A 088d8e9895ad

Subscribe to this mod's changes

gh-stack is a skill published in the GitHub repository NVIDIA-NeMo/Gym (1,320 stars, last pushed today), licensed Apache-2.0. It adds 65 tokens to every session and 9,057 once invoked, about $0.0003 per session on Opus 5.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

gh-stack compared with skills from other repositories

gh-stack next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gh-stackNVIDIA-NeMo/GymSkill1.3ktodayApache-2.0A65Claude Code, Codex
agent-framework-py-releasemicrosoft/agent-frameworkSkill15kyesterdayMITA102Claude Code, Codex
orchard-releaserohitg00/ai-engineering-from-scratchSkill77kyesterdayMITA11Claude Code, Codex
resolve-handoffomnigent-ai/omnigentSkill11ktodayApache-2.0A23Claude Code, Codex
otto-pr-review-loopomnigent-ai/omnigentSkill11ktodayApache-2.0A17Claude Code, Codex
orchard-reviewrohitg00/ai-engineering-from-scratchSkill77kyesterdayMITA8Claude Code, Codex
orchestratehumanlayer/humanlayerSkill13kyesterdayApache-2.0A49Claude Code