github-api-cache

Caches GitHub project metadata in environment variables to reduce GraphQL API rate limit consumption.

Updated Jan 1, 2026
One-click install
npx skills add https://github.com/sarkarshivaditya-lab/WellMate --skill github-api-cache-sarkarshivaditya-lab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: github-api-cache
Source: https://github.com/sarkarshivaditya-lab/WellMate/tree/main/.engineering-skills/troykelly-claude-skills/skills/github-api-cache
Command: npx skills add https://github.com/sarkarshivaditya-lab/WellMate --skill github-api-cache-sarkarshivaditya-lab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? GitHub's GraphQL API enforces a 5,000 point/hour rate limit, and repeated project queries during a session can exhaust most of that quota before real work begins. This Skill fetches project fields and items once at session start and serves all subsequent reads from cached environment variables. ## Core Features & Use Cases - One-Time Session Caching: Initializes project fields, items, field IDs, and status option IDs with roughly 3 API calls instead of 20-50. - Zero-Call Read Functions: Provides bash helpers to look up item IDs, statuses, and issue lists entirely from cached JSON using jq. - Rate Limit Guardrails: Includes a quota check function and clear rules for when to refresh the cache or fall back to the REST API. - Use Case: During an AI-assisted development session that updates dozens of GitHub Project board items, all status reads and field lookups consume zero API calls, leaving quota available for actual write operations. ## Quick Start Ask the AI to initialize the GitHub project cache at session start and use cached data for all subsequent project board operations.

Frequently Asked Questions about github-api-cache

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I avoid GitHub GraphQL API rate limits with gh CLI?▼

Fetch project fields and items once at session start and store the JSON in environment variables. Subsequent lookups parse the cached data locally with jq, consuming zero API calls instead of one call per query.

How to check GitHub API rate limit before bulk operations?▼

Run gh api rate_limit and read the resources.graphql.remaining value with jq. If fewer than 100 points remain, compute the wait time from the reset timestamp before proceeding with bulk operations.

Does caching work for GitHub Projects write operations?▼

No, write operations like item-edit and item-add always require live API calls. The cache only eliminates read calls; after adding an item, refresh the items cache once to keep local data consistent.

What environment variables are required for GitHub project caching?▼

GITHUB_PROJECT_NUM and GH_PROJECT_OWNER must be set before initialization. The script then populates GH_CACHE_FIELDS, GH_CACHE_ITEMS, GH_PROJECT_ID, and status option ID variables from the fetched data.

When should I use the REST API instead of GraphQL for GitHub data?▼

Use the REST API when you need data not present in the project cache, such as individual issue details or comments. REST has a separate 5,000/hour limit, so it does not consume GraphQL quota.