@jianshuo: 看得见,才谈得上理解。我写了个 ccglass,npm 装上就能看到 Claude Code 背地里给大模型发了什么——系统提示词、48 个工具、token 账,全摊开。

X AI KOLs Timeline 工具

摘要

ccglass是一个零依赖的本地日志反向代理和Web仪表盘,可以让你实时查看Claude Code等编码代理发送给大模型的系统提示、工具和token使用情况。

看得见,才谈得上理解。我写了个 ccglass,npm 装上就能看到 Claude Code 背地里给大模型发了什么——系统提示词、48 个工具、token 账,全摊开。https://t.co/99thvxcoqh
查看原文
查看缓存全文

缓存时间: 2026/05/23 14:11

看得见,才谈得上理解。我写了个 ccglass,npm 装上就能看到 Claude Code 背地里给大模型发了什么——系统提示词、48 个工具、token 账,全摊开。https://t.co/99thvxcoqh


jianshuo/ccglass

Source: https://github.com/jianshuo/ccglass

ccglass

See exactly what your coding agent sends to the model. A zero-dependency local logging reverse-proxy + web dashboard for Claude Code, Codex, DeepSeek-TUI, and Kimi. One command, like ollama:

npm install -g ccglass
ccglass

Run with no arguments and ccglass asks which client to inspect:

  Which client do you want to inspect?

    1) Claude Code
    2) Codex (OpenAI)
    3) DeepSeek-TUI
    4) Kimi (Moonshot, via Claude Code)

  >

Or name it directly: ccglass claude, ccglass codex, ccglass deepseek, ccglass deepseek-tui, or ccglass kimi.

ccglass starts a proxy, points the client at it via the right base-URL env var, launches it for you, and opens a dashboard where you watch every request in real time — the full system prompt, every tool schema, the message history, token/cache/cost numbers, and a turn-to-turn diff.

  ● ccglass watching Codex (OpenAI) → https://api.openai.com
    dashboard: http://127.0.0.1:57633

Why

These CLIs are Node/native apps that ignore HTTP_PROXY/HTTPS_PROXY — so Charles/mitmproxy never see the traffic, and fetch-patching tools break across updates. ccglass sidesteps all of it: the client does the HTTPS to the real API itself; you only intercept the plain HTTP hop to localhost. No CA certs, no TLS pinning.

Supported clients

ccglass <client>WrapsEnv varUpstreamFormat
claudeClaude CodeANTHROPIC_BASE_URLapi.anthropic.comAnthropic Messages
codexCodexOPENAI_BASE_URLapi.openai.comOpenAI Responses / Chat
deepseekDeepSeek-TUI dispatcherDEEPSEEK_BASE_URLapi.deepseek.comOpenAI Chat
deepseek-tuiDeepSeek-TUI runtimeDEEPSEEK_BASE_URLapi.deepseek.comOpenAI Chat
kimiClaude Code → MoonshotANTHROPIC_BASE_URLapi.moonshot.ai/anthropicAnthropic Messages
run --provider <p> -- <cmd>any clientper providerper providerper provider

Kimi runs through Claude Code against Moonshot’s Anthropic-compatible endpoint — make sure your Moonshot key is set (ANTHROPIC_AUTH_TOKEN). DeepSeek-TUI uses its OpenAI-compatible Chat Completions endpoint — make sure your DeepSeek key is set (DEEPSEEK_API_KEY).

What you get

  • Live request stream — every call appears instantly; click to expand the system prompt, messages, and tools with all escaped strings unescaped.
  • Turn-to-turn diff — pick two requests, see exactly what context was added this turn and which blocks carry a cache breakpoint.
  • Token / cache / cost — exact input/output/cache tokens from the response usage, cache-hit rate, and estimated USD per request (per-provider pricing).
  • Response reassembly + export — streamed SSE rebuilt into the final message (stop_reason, tool calls, usage), for both the Anthropic and OpenAI wire formats; export any request to Markdown / JSON / HAR.

Usage

ccglass                       # pick a client interactively
ccglass claude [args...]      # inspect Claude Code (args pass through, e.g. --resume)
ccglass codex  [args...]      # inspect Codex
ccglass deepseek [args...]    # inspect DeepSeek-TUI (dispatcher)
ccglass deepseek-tui [args...] # inspect DeepSeek-TUI runtime directly
ccglass kimi   [args...]      # inspect Kimi (via Claude Code)
ccglass run --provider openai -- <cmd...>   # inspect any client
ccglass view                  # re-open the dashboard over saved .ccglass/ logs
ccglass export <id> --format md|json|har

Options

FlagDefaultMeaning
--provider <p>from commandForce format/env for run (claude/codex/deepseek/kimi/openai)
--upstream <url>per providerOverride the upstream API
--port <n>autoDashboard port
--proxy-port <n>autoProxy port
--dir <path>./.ccglassWhere logs are stored
--openoffOpen the dashboard in your browser
--no-redactoffKeep auth tokens unmasked in saved logs

Logs & secrets

Captures are written to ./.ccglass/<session>/NNNN.json. Auth tokens (authorization, x-api-key) are masked by default — pass --no-redact to keep them. Treat the log directory as sensitive regardless.

Requirements

Node ≥ 18. No runtime dependencies.

Acknowledgments

Heartfelt thanks to 庄表伟 (@zhuangbiaowei) for contributing first-class DeepSeek-TUI support (#1).

DeepSeek-TUI ships as a dual-binary coding agent — a deepseek dispatcher and a deepseek-tui runtime. 庄表伟 wired up both as native ccglass providers, pointing them at the proxy via DEEPSEEK_BASE_URL and reusing the existing OpenAI-compatible Chat Completions adapter, so every DeepSeek request now shows up in the dashboard with zero extra setup. The contribution also added them to the interactive picker, documented usage across the README, and shipped provider regression tests to keep it working. Thank you for making ccglass better for the whole DeepSeek community. 🙏

License

MIT

相似文章

@koffuxu: https://x.com/koffuxu/status/2054527573439181206

X AI KOLs Timeline

cc-switch 是一个桌面应用,帮助用户通过可视化界面一键切换 Claude Code 使用的底层大模型,无需手动修改配置文件。文章介绍了如何安装配置以接入 DeepSeek 模型,并解释了其工作原理。

@nash_su: https://x.com/nash_su/status/2055541927508881654

X AI KOLs Timeline

本文详细介绍了Claude Code在大型代码库中的最佳实践,强调工具链(CLAUDE.md、钩子、技能、插件、LSP集成、MCP服务器和子代理)比模型本身更重要,并建议团队优先投资代码库设置以获得更好效果。