Skip to content
Back to skills

Github Rate Limits

ASecurity

Use when a `gh` or GitHub API call fails with 403, 429, a rate-limit or secondary-limit message, or before a burst of writes (many comments, replies or thread resolutions).

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 17, 2026
ai-agentsgitapi

Works with

  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add eborden/logseq-mcp-server --skill github-rate-limits --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Github Rate Limits?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Github Rate Limits
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/eborden-github-rate-limits/badge)](https://www.skillsdirectory.com/skills/eborden-github-rate-limits)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: github-rate-limits
description: 'Use when a `gh` or GitHub API call fails with 403, 429, a rate-limit or secondary-limit message, or before a burst of writes (many comments, replies or thread resolutions).'
---

# GitHub rate limits

`gh` hides the headers by default, so a failure doesn't say which limit it hit. Diagnose first, then pick a response. There is no wrapper script: the agent decides.

**Diagnose.** Re-run the failing call with `gh api -i ...` to see the status line and headers. `gh api rate_limit` shows the primary buckets (`core`, `graphql`, `search`) and doesn't count against them.
- **Primary:** `X-Ratelimit-Remaining: 0` and a future `X-Ratelimit-Reset` (epoch seconds), or `rate_limit` shows that bucket at 0. Each bucket is separate, so `core` can be empty while `graphql` is not.
- **Secondary:** HTTP 403 or 429, a `Retry-After` header, and a body that says "secondary rate limit". `rate_limit` still shows plenty left, since it doesn't report secondary limits.

**Respond.**
- Primary: wait until the reset time. Don't retry before it.
- Secondary: wait `Retry-After` seconds. With no header, wait at least 60s, and double the wait on each repeat. Never retry in a tight loop, because that extends the block.
- Wait with `sleep` in a background command or a Monitor `until` loop rather than a foreground sleep, and tell the maintainer how long you're waiting and why.
- If the wait is long (a primary reset more than ~10 minutes away, or repeated secondary hits), stop and say so. Don't burn the session polling.

**Avoid secondary limits.** They count bursts of writes (roughly 80 content-creating requests a minute, 500 an hour, 100 concurrent), and they're per account, so parallel subagents share one budget.
- Post a review's inline comments in one `reviews` call (see "Code review" in the `work-the-queue` skill), not one call per comment.
- Don't run several subagents' write phases at once (comments, replies, thread resolutions, issue edits). Reads are cheap. Stagger the writes.
- A fixer with many threads replies and resolves them in sequence, not in parallel.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.