com um clique
nix-github-rate-limit
// Prevents and handles GitHub API rate limits during Nix commands. Use when running nix flake, nix run, nix build, nix shell, or comma against GitHub-backed inputs.
// Prevents and handles GitHub API rate limits during Nix commands. Use when running nix flake, nix run, nix build, nix shell, or comma against GitHub-backed inputs.
Guides t-wada Red-Green-Refactor TDD. Use when implementing features, fixing bugs, or refactoring logic with strict test-first development.
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.
Consults Codex CLI for a second opinion on implementation plans, code reviews, or problem-solving. Use when an independent perspective from a different agent is needed before a significant decision.
Creates atomic Conventional Commits. Use when committing code changes, splitting hunks into revertable units, or writing detailed commit messages.
Spawns parallel task agents to explore a codebase area. Use when researching unfamiliar code, auditing a subsystem, or gathering diverse perspectives before a design decision.
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").
| name | nix-github-rate-limit |
| description | Prevents and handles GitHub API rate limits during Nix commands. Use when running nix flake, nix run, nix build, nix shell, or comma against 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.
Prefer ephemeral token injection from GitHub CLI. Do not write GitHub tokens to nix.conf, repository files, skill files, shell config, or command arguments.
Use command substitution inside NIX_CONFIG for a single command when gh is already authenticated. Shell history records the literal command substitution, not the expanded token:
env NIX_CONFIG="access-tokens = github.com=$(gh auth token)" nix flake update
If ghtkn is configured and a short-lived GitHub App user token is preferred:
env NIX_CONFIG="access-tokens = github.com=$(ghtkn get)" 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:
env NIX_CONFIG="access-tokens = github.com=$GITHUB_TOKEN" nix flake update
Do not create GITHUB_TOKEN by pasting a raw token into the terminal or an agent tool call.
For this dotfiles repo:
env NIX_CONFIG="access-tokens = github.com=$(gh auth token)" nix run .#build
env NIX_CONFIG="access-tokens = github.com=$(gh auth token)" nix run .#switch
env NIX_CONFIG="access-tokens = github.com=$(gh auth token)" nix run .#update
For missing tool execution:
env NIX_CONFIG="access-tokens = github.com=$(gh auth token)" nix run nixpkgs#<package> -- <args>
env NIX_CONFIG="access-tokens = github.com=$(gh auth token)" nix shell nixpkgs#<package> --command <command>
If the command is a Nix command that may touch GitHub, check whether gh is available and authenticated:
command -q gh; and gh auth status
If GITHUB_TOKEN is already set, run the Nix command with NIX_CONFIG="access-tokens = github.com=$GITHUB_TOKEN".
If gh is authenticated, run the Nix command with NIX_CONFIG="access-tokens = github.com=$(gh auth token)".
If ghtkn is configured and the user prefers short-lived GitHub App tokens, use NIX_CONFIG="access-tokens = github.com=$(ghtkn get)".
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 the safest available NIX_CONFIG wrapper.
$(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.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.