ワンクリックで
google-sheets-api-coordinator
Manages Google Sheets API calls with rate limiting and quota enforcement
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Manages Google Sheets API calls with rate limiting and quota enforcement
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Tiered planning orchestrator. Runs the full SPARC+ pipeline (research, spec, decide, pseudo, data, arch, ux, design, test, ops) as a parallel DAG, scaled by build stage (mvp/beta/enterprise) via inclusion profiles. Enforces two gates: every success criterion is executable (verifiable-done) and every step is unambiguous (haiku-executable). Use as the entry point for any non-trivial build instead of cfn-spa-plan.
Post-planning completeness review. Extracts assumptions, traces dependencies, analyzes blast radius, checks alpha-readiness, surfaces gaps before implementation. Use after writing any plan that touches data, APIs, or shared state.
SPARC Specification phase. Make testable acceptance criteria, edge cases, pre/post conditions, invariants BEFORE planning implementation. Use when starting any non-trivial task to lock intent, surface ambiguity early.
Test-strategy phase of cfn-megaplan. Designs test depth properly: fixtures/test-data, the unit/integration/contract/e2e/load split, mocking strategy, and non-functional tests, instead of lumping everything into a vague red phase. Feeds Bar A (verifiable-done): every acceptance criterion becomes a concrete runnable check. Use after cfn-spec, cfn-arch, and (if frontend) cfn-ux.
Pre-edit backup + post-edit validation for safe file edits. Use to capture file state before edits, validate changes after edits, revert files to prior state, or ensure edit safety via auto backup/validation hooks.
Extract complete Redis coordination data from completed CFN Loop tasks and structure into comprehensive JSON analysis files
| name | google-sheets-api-coordinator |
| version | 1.0.0 |
| category | coordination |
| tags | ["google-sheets","api-coordination","rate-limiting","quota-management"] |
| status | approved |
| author | CFN Team |
| description | Manages Google Sheets API calls with rate limiting and quota enforcement |
| dependencies | ["jq","bash","curl"] |
| created | "2025-11-18T00:00:00.000Z" |
| updated | "2025-11-18T00:00:00.000Z" |
| complexity | Medium |
| keywords | ["api-coordination","rate-limiting","quota","batch-operations"] |
| triggers | ["api-rate-limit","quota-exceeded","batch-operations","api-calls"] |
| performance_targets | {"execution_time_ms":2000,"success_rate":0.97,"quota_violations":0} |
Manages and coordinates Google Sheets API calls with automatic rate limiting, quota tracking, and batch operation support. Prevents quota exhaustion, enforces API rate limits, and provides automatic retry logic with exponential backoff.
Google Sheets API has strict quotas (300 requests/min for most users). Without coordination, multiple agents making concurrent API calls quickly exceed limits, causing cascading failures. This skill provides centralized quota management with rate limiting and batch operations enabling safe parallel execution.
api-call.shRequired Parameters:
--api-endpoint: Google Sheets API endpoint path--method: HTTP method: GET, POST, PUT, DELETE (default: GET)--spreadsheet-id: Spreadsheet ID for quota trackingOptional Parameters:
--batch-size: Batch operations size (default: 50)--max-retries: Max retry attempts (default: 3)--quota-limit: Requests per minute limit (default: 300)--payload: JSON payload for POST/PUT requests--timeout: Request timeout in seconds (default: 10)--api-key: Google API key (or GOOGLE_API_KEY env var)Usage:
# Single API call with rate limiting
./.claude/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh \
--api-endpoint "spreadsheets.values:get" \
--spreadsheet-id abc123def456
# Batch operation
./.claude/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh \
--api-endpoint "spreadsheets.values:batchUpdate" \
--spreadsheet-id abc123def456 \
--batch-size 100 \
--payload '{"data": [...]}'
# With custom quota limit and retries
./.claude/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh \
--api-endpoint "spreadsheets:create" \
--spreadsheet-id abc123def456 \
--quota-limit 60 \
--max-retries 5
# Request rate tracking
./.claude/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh \
--quota-limit 60 # Custom limit for restricted account
{
"quota_window": {
"start_time": "2025-11-18T10:00:00Z",
"end_time": "2025-11-18T10:01:00Z",
"requests_made": 45,
"quota_limit": 300,
"available_requests": 255,
"time_until_reset_seconds": 42
},
"spreadsheet_quota": {
"spreadsheet_id": "abc123def456",
"requests_this_minute": 12,
"average_response_time_ms": 250
}
}
{
"success": true,
"confidence": 0.97,
"api_call": {
"endpoint": "spreadsheets.values:get",
"method": "GET",
"status_code": 200
},
"quota_usage": {
"requests_made": 1,
"quota_remaining": 299,
"rate_limited": false,
"next_request_delay_ms": 100
},
"response": {
"data": {...}
},
"metrics": {
"execution_time_ms": 245,
"retries_attempted": 0
},
"deliverables": ["api_response"],
"errors": []
}
Automatic retry logic with exponential backoff:
{
"error_code": "RATE_LIMIT_EXCEEDED",
"status_code": 429,
"action": "backoff",
"wait_time_ms": 2000,
"retry_attempt": 1,
"max_retries": 3
}
Coordinate API calls with automatic rate limiting:
# Make API call with automatic quota management
RESPONSE=$(./.claude/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh \
--api-endpoint "spreadsheets.values:get" \
--spreadsheet-id "$SHEET_ID" \
--quota-limit 300)
STATUS=$(echo "$RESPONSE" | jq -r '.success')
REMAINING=$(echo "$RESPONSE" | jq -r '.quota_usage.quota_remaining')
if [ "$STATUS" = "true" ]; then
echo "API call successful, $REMAINING requests remaining"
else
echo "API call failed"
fi
# Batch update with automatic batching
./.claude/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh \
--api-endpoint "spreadsheets.values:batchUpdate" \
--spreadsheet-id "$SHEET_ID" \
--batch-size 100 \
--payload "$BATCH_DATA"
All agents share quota pool:
# Agent 1 makes call (uses 1 of 300)
AGENT1=$(./.claude/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh ...)
# Agent 2 makes call (automatically delayed to respect shared quota)
AGENT2=$(./.claude/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh ...)
# Both complete without quota exhaustion
❌ Direct API calls - Always use coordinator script ❌ Hardcoded delays - Use automatic rate limiting ❌ No retry logic - Implement exponential backoff ❌ Per-agent quotas - Use shared quota pool ❌ Ignoring rate limits - Always respect 429 responses
export GOOGLE_API_KEY="your-api-key"
export GOOGLE_SHEETS_QUOTA_LIMIT=300 # Requests per minute
export GOOGLE_SHEETS_QUOTA_WINDOW_MINUTES=1 # Quota window duration
export GOOGLE_API_TIMEOUT_SECONDS=10 # Request timeout
Rate limit state stored in: .claude/cfn-extras/.gs-api-quota.json
{
"quota_limit": 300,
"window_start": "2025-11-18T10:00:00Z",
"requests": [
{"timestamp": "2025-11-18T10:00:15Z", "endpoint": "spreadsheets.values:get", "status": 200}
]
}
google-sheets-validation skill.claude/commands/CFN_LOOP_TASK_MODE.md