一键导入
nix-github-rate-limit
Prevents and handles GitHub API rate limits with gh-nix. Use when Nix, flakes, nixpkgs commands, or comma may fetch GitHub-backed inputs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Prevents and handles GitHub API rate limits with gh-nix. Use when Nix, flakes, nixpkgs commands, or comma may fetch GitHub-backed inputs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run a code review using Codex CLI. Use when the user wants a code review of uncommitted changes, a specific commit, or changes against a base branch.
Guides execute-inspect-adjust development and t-wada Red-Green-Refactor TDD. Use for exploratory implementation or when stable behaviour needs an executable test-first contract.
Manages worktree lifecycle operations through git-wt without replacing an existing linked worktree. Use when creating, switching, listing, renaming, or deleting worktrees.
Runs the full PR workflow — creates a feature branch, commits, pushes, and opens the pull request. Use when the user asks to create or open a PR ("create a PR", "push this up and open a PR").
Resolves missing CLI tools. Use when a command is unavailable, a shell reports command not found, or a tool must be run without installing it globally.
Guides agent-skill creation and updates following Anthropic's SKILL.md best practices. Use when adding or editing skills under `agents/skills/`, writing SKILL.md frontmatter, references, or skill routing.
| name | nix-github-rate-limit |
| description | Prevents and handles GitHub API rate limits with gh-nix. Use when Nix, flakes, nixpkgs commands, or comma may fetch GitHub-backed inputs. |
Use this skill before running Nix commands that may fetch GitHub-backed flakes or packages, especially nix flake update, nix run github:..., nix run nixpkgs#..., nix build, nix shell, and comma.
Use gh-nix to run commands that may cause Nix to fetch from GitHub. It reads the token from the authenticated GitHub CLI at runtime and supplies it through Nix's access-tokens setting without exposing the token in the command text:
gh-nix nix flake update
gh-nix nix run github:<owner>/<repo>
gh-nix nix run nixpkgs#<package> -- <args>
gh-nix nix build
gh-nix nix shell nixpkgs#<package> --command <command>
gh-nix , <command>
For this dotfiles repo:
gh-nix nix run .#build
gh-nix nix run .#switch
gh-nix nix run .#update
Do not write GitHub tokens to nix.conf, repository files, skill files, shell config, or command arguments.
If gh-nix is unavailable, prefer ephemeral token injection from GitHub CLI. Shell history records the literal command substitution rather than the expanded token:
NIX_CONFIG="access-tokens = github.com=$(gh auth token)" nix flake update
If GITHUB_TOKEN is already present in the environment, bridge it into Nix's documented access-tokens setting without exposing the token value in the command text:
NIX_CONFIG="access-tokens = github.com=$GITHUB_TOKEN" nix flake update
If ghtkn is configured and a short-lived GitHub App user token is preferred:
NIX_CONFIG="access-tokens = github.com=$(ghtkn get)" nix flake update
Do not create GITHUB_TOKEN by pasting a raw token into the terminal or an agent tool call.
If the command may cause Nix to fetch from GitHub, check whether gh-nix is available:
command -v gh-nix
If available, prefix the original command with gh-nix. Preserve every argument exactly.
If gh-nix reports that gh is unauthenticated, ask the user to run gh auth login; do not attempt to capture or supply credentials.
If gh-nix is unavailable, use the safest fallback token source already present: $GITHUB_TOKEN, authenticated gh, or configured ghtkn.
If no safe token source is available, run the command normally unless the user explicitly wants to authenticate first.
If a GitHub API rate limit error appears, retry once with gh-nix or the safest available fallback.
gh-nix because the command text contains neither the token nor token-producing command substitution.gh-nix, prefer inline command substitution such as $(gh auth token) or $(ghtkn get) inside the command the user runs.$GITHUB_TOKEN; do not assign the raw value in the command.env NIX_CONFIG="access-tokens = github.com=ghp_..." ....--access-tokens "github.com=$(gh auth token)" because command arguments can be exposed via process listings.~/.config/nix/nix.conf, /etc/nix/nix.conf, repository files, or dotfiles by default.gh-nix preserves existing NIX_CONFIG settings while prepending the GitHub access token configuration.NIX_CONFIG keeps the token out of the command arguments, but environment variables can still be visible to sufficiently privileged local processes. Prefer it only for short-lived commands.GITHUB_TOKEN is already provided by CI or a controlled environment, Nix may use it, but do not create or persist it just for local interactive use.