tmcfarlane/skillforge/cloudflare-log-reader

Claude Code and agent skill by tmcfarlane/skillforge

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install tmcfarlane/skillforge/cloudflare-log-reader

SKILL.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

  1. Get a Cloudflare API token with AI Gateway: Read permission scope. Store it in the environment as CF_API_TOKEN (not in code).
  1. 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 completions
  • order_by=created_at&direction=asc — chronological order
  • since={iso_timestamp} — incremental polling from last seen entry
  1. Authenticate with Bearer token:

``typescript headers: { Authorization: Bearer ${CF_API_TOKEN} } ``

  1. Parse the response — result array contains log entries with fields: id, provider, model, status, cached, prompt_tokens, completion_tokens, duration, request, response, created_at.
  1. Deduplicate by `id` before inserting — the API may return overlapping entries on incremental polls.
  1. Insert into local SQLite gateway_logs table for offline analysis.
  1. Flush DB to disk after batch insert (required when using sql.js WASM).
  1. Track `MAX(logged_at)` as the cursor for the next incremental poll.

Algorithm

lastSeen = SELECT MAX(logged_at) FROM gateway_logs
entries = GET /logs?since=lastSeen&status=success
for entry in entries:
if entry.id not in gateway_logs:
INSERT INTO gateway_logs(...)
persistDb()

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/tmcfarlane/skillforge/cloudflare-log-reader/badge)](https://verified-skill.com/skills/tmcfarlane/skillforge/cloudflare-log-reader)

Something wrong with this skill or its page? Tell us.