libaoming

LLM Request Logger — AI skill for Claude Code

AI community

See what your AI coding agent really sends to the model each turn, what each piece of your config costs, and where the prompt cache breaks.

How to install LLM Request Logger

This entry records only its repository, not the path inside it, so there is no exact command to give. Open libaoming/llm-request-logger and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What LLM Request Logger does

See what your AI coding agent really sends to the model each turn, what each piece of your config costs, and where the prompt cache breaks. Fake endpoint + real proxy. Claude Code, Kimi, GLM, DeepSeek, MiniMax, Qwen, Doubao. Python stdlib only.

Alternatives in AI

  • WindsurfAPI — Turn Windsurf / Devin Desktop's 100+ AI models (Claude, GPT, Gemini, DeepSeek, Kimi, GLM, SWE) into OpenAI-, A 3k ★
  • CliRelay — Self-hosted AI gateway for coding CLIs — one OpenAI/Claude/Gemini/Codex-compatible endpoint, with a multi-tena 1k ★
  • Devo — Model-neutral agent desktop/runtime for private, enterprise, and OpenAI-compatible / Anthropic-compatible mode 316 ★

README

llm-request-logger

[English](README.md) | [中文](README.zh-CN.md)

See exactly what your AI coding agent sends to the model on every turn — and what each piece of your own config costs you.

Formerly `claude-code-prompt-probe`. v1 was a fake endpoint for measuring Claude Code's system prompt. v2 adds a real forwarding proxy and two analysis commands that no plain logger has: **attribution** (which file, skill list or MCP server put those characters in your request) and **cache-prefix diff** (where exactly two requests stop sharing a cache).

Python standard library only. No install step.

Two ways to capture

  fake   claude ──▶ llmlog ──▶ (nothing)           free, no credentials, single turn
  proxy  claude ──▶ llmlog ──▶ api.anthropic.com   real sessions, replies, token usage
                       │
                       ▼
                 cap/*.json  ──▶  report   what is in one request, and where it came from
                             ──▶  diff     where two requests stop sharing a cache prefix
                             ──▶  compare  system prompt sections across models
                             ──▶  export   scrubbed copies you can publish
fake proxy
Request leaves your machine no yes, forwarded untouched
Costs quota no yes
Credentials a dummy key is enough your real login passes through, never written to disk
You get the request the request, the reply, real token usage incl. cache reads and writes
Use it for measuring the vendor's prompt from a clean config, comparing models auditing your real setup, debugging cache misses

Quick start

git clone https://github.com/libaoming/llm-request-logger.git && cd llm-request-logger

./llmlog.py proxy                      # terminal A
ANTHROPIC_BASE_URL=http://127.0.0.1:8787 ENABLE_TOOL_SEARCH=true claude    # terminal B

./llmlog.py report cap/.json     # read a capture

`llmlog.py fake` prints its own command,