tmcfarlane/skillforge/cloudflare-log-reader
Claude Code and agent skill by tmcfarlane/skillforge
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install tmcfarlane/skillforge/cloudflare-log-readerSKILL.md
Cloudflare AI Gateway Log Reader
Read execution traces from Cloudflare AI Gateway via the Cloudflare API and store them in local SQLite for skill extraction and analytics.
When to Use
Use this skill to poll gateway logs after LLM calls complete, feed the AutoResearch loop with real usage data, or build a local analytics cache.
Steps
- Get a Cloudflare API token with
AI Gateway: Readpermission scope. Store it in the environment asCF_API_TOKEN(not in code).
- Build the request URL:
`` GET https://api.cloudflare.com/client/v4/accounts/{account_id}/ai-gateway/gateways/{gateway_name}/logs `` Query parameters:
status=success— only successful completionsorder_by=created_at&direction=asc— chronological ordersince={iso_timestamp}— incremental polling from last seen entry
- Authenticate with Bearer token:
``typescript headers: { Authorization: Bearer ${CF_API_TOKEN} } ``
- Parse the response —
resultarray contains log entries with fields:id,provider,model,status,cached,prompt_tokens,completion_tokens,duration,request,response,created_at.
- Deduplicate by `id` before inserting — the API may return overlapping entries on incremental polls.
- Insert into local SQLite
gateway_logstable for offline analysis.
- Flush DB to disk after batch insert (required when using sql.js WASM).
- Track `MAX(logged_at)` as the cursor for the next incremental poll.
Algorithm
Primitives
- http-fetch, sql-query, scheduling, data-transform
Tags
cloudflare, sqlite, typescript, observability
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cloudflare-log-reader/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
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/tmcfarlane/skillforge/cloudflare-log-reader)