troykelly/claude-skills/github-api-cache
Claude Code and agent skill by troykelly/claude-skills
- community
Checking that the SKILL.md file is still in the repository.
MANDATORY before any GitHub project operations - caches project metadata to prevent rate limit exhaustion. Called by session-start. Other skills MUST use cached data.
Install
npx vskill@latest install troykelly/claude-skills/github-api-cacheSKILL.md
GitHub API Cache
Overview
Cache GitHub project metadata ONCE at session start. All subsequent operations use cached data.
Core principle: Fetch once, extract many. Never repeat API calls for the same data.
This skill is called by `session-start` and provides cached data to all other skills.
The Problem
GitHub GraphQL API has a 5,000 point/hour limit. Without caching:
gh project item-list= 1 call per invocationgh project field-list= 1 call per invocationgh project list= 1 call per invocation
A typical session startup was consuming 3,500+ of 5,000 points through repeated calls.
The Solution
Fetch project metadata ONCE and cache in environment variables. All skills use cached data.
Rate Limit Check
Before any bulk operations, check available quota:
Session Initialization (2 API Calls Total)
Run this ONCE at session start. Store results in environment.
Cached Data Access Functions
These functions use ONLY cached data. NO API calls.
Get Item ID from Issue Number
Get Item Status from Issue Number
Get Issues by Status
Get All Items with Status
Check if Issue is in Project
Cache Refresh
Only refresh cache when you KNOW data has changed:
Write Operations (Still Require API Calls)
Write operations cannot be cached. Use sparingly.
Set Project Status (1 API call)
Add Issue to Project (1 API call + cache refresh)
Anti-Patterns (NEVER DO)
Repeated Field Lookups
Polling Item List in Loops
Re-fetching Field IDs
REST API for Simple Operations
When you need data not in the cache, prefer REST API (separate rate limit):
Environment Variables Reference
After initialization, these are available:
| Variable | Contents | |
|---|---|---|
GH_CACHE_FIELDS | Full project fields JSON | |
GH_CACHE_ITEMS | Full project items JSON | |
GH_PROJECT_ID | Project node ID | |
GH_STATUS_FIELD_ID | Status field ID | |
GH_TYPE_FIELD_ID | Type field ID | |
GH_PRIORITY_FIELD_ID | Priority field ID | |
GH_STATUS_BACKLOG_ID | Backlog option ID | |
GH_STATUS_READY_ID | Ready option ID | |
GH_STATUS_IN_PROGRESS_ID | In Progress option ID | |
GH_STATUS_IN_REVIEW_ID | In Review option ID | |
GH_STATUS_DONE_ID | Done option ID | |
GH_STATUS_BLOCKED_ID | Blocked option ID |
API Cost Summary
| Operation | Before Caching | After Caching | |
|---|---|---|---|
| Session init | 20-50 calls | 3 calls | |
| Check issue status | 1 call | 0 calls | |
| Get field IDs | 3 calls | 0 calls | |
| Query by status | 1 call | 0 calls | |
| Set status | 4 calls | 1 call | |
| Sync verification | 10+ calls | 0 calls |
Integration
This skill is called by:
session-start- Initializes cache at session start
This skill's cached data is used by:
project-board-enforcement- All verification functionsissue-driven-development- Status updates and checksissue-prerequisite- Adding issues to projectepic-management- Epic operationsautonomous-orchestration- State queries
Checklist
Before any GitHub project operation:
- [ ] Cache initialized (GH_CACHE_ITEMS exists and is not empty)
- [ ] Rate limit checked if bulk operation
- [ ] Using cached data for reads
- [ ] Only making API calls for writes
- [ ] Refreshing cache after writes that add items
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/github-api-cache/SKILL.md
Popularity
- Repository stars
- 6
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 2 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/troykelly/claude-skills/github-api-cache)