Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By gigun-devv0.4.0In 1 marketplace
Review your own coding sessions from real data (time, tokens, tool breakdown, subagents, worktree handling) and decide whether configuration improvements are warranted. Works from local transcripts without credentials, and from Langfuse traces when configured.
Claude loads one when your task matches it, or you run it by name.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
bin/session-breakdown は Claude Code と Codex のローカル JSONL を読み、選択した時間窓の経過・
tool・明示的な待機・分類できない時間・トークンを集計する。資格情報もネットワークも要らない。
/telemetry:review (skills/review/SKILL.md) は問いに応じてこの CLI、cman、または要求された
Langfuse のスクリプトを選ぶ。
| Claude Code | Langfuse の observation |
|---|---|
| 1ターン(prompt_id) | Trace + root span claude-code turn |
| LLM 応答1回 | generation(モデル名・トークン・Langfuse が返す応答本文) |
| ツール実行 | tool(成功=DEFAULT / 失敗=ERROR) |
| サブエージェント | agent(配下に generation と tool がぶら下がる) |
hook はツールの前後しか知らず、LLM の出力もトークン数も渡してこないので、generation は hook イベントからは作れない。そこで Stop / SubagentStop の時に transcript の JSONL を解析して復元 している。この復元が無いと generation と usage は送られず、ローカルログだけから思考時間を 復元することもできない。
資格情報は ~/.config/claude-code/langfuse.env(600・git 管理外)、接続先は dotfiles が管理する
~/.config/claude-code/langfuse-endpoints.env に分ける。LANGFUSE_BASE_URL は REST API / CLI 用、
LANGFUSE_OTLP_ENDPOINT は送信専用で、別々のホストを指定できる。Langfuse の集計を明示的に要求
された場合だけ読み、未設定またはネットワーク不通ならその旨を出して終了する。
summary.sh と query.sh は用途別の Metrics / Observations API を直接読むので、CLI の導入は不要。
対話的なCLIアクセスにはdotfilesの langfuse 関数があり、bunx @langfuse/cli で起動する。
自前配置は Langfuse v4 の events_only モードで動く。正典は配置自身が出す OpenAPI
(${LANGFUSE_BASE_URL}/generated/api/openapi.yml。self-host はインストール版と一致するので
langfuse.com の docs より優先する)。同じ内容の対話用リファレンスは /api/docs にもある。
OpenAPI の info.description に明記されている通り、リアルタイムに読める経路は
Observations API v2(GET /api/public/v2/observations)と Metrics API v2 の2つだけで、
他の read/write は反映まで約10分遅延しうる。
events_only では次のレガシー経路が 404 で塞がれ、本文
{"message":"This endpoint is not available on deployments running in Langfuse v4 events_only mode..."} を返す(2026-09-25 に実機で確認):
GET /api/public/tracesGET /api/public/observations、GET /api/public/observations/{id}(単体取得)GET /api/public/v2/scores代わりに使える経路:
GET /api/public/v2/observations(filter パラメータで
id 等の列を条件指定すれば1件に絞れる。query.sh gen がこれを使う)GET /api/public/v3/scores(v2 ではなく v3 が現行)POST /api/public/scores(未検証。telemetry のスクリプト群は読み取り専用)このエラー本文は query.sh の全サブコマンドが利用者に表示する(2026-09-25 以前は id の
有無だけで「見つからない」と誤診し、バックエンドの拒否をユーザー入力ミスとして報告していた)。
/telemetry:review は必要なときだけ Langfuse を読む。bin/session-breakdown は資格情報も
ネットワークも要らず、選択した Claude Code / Codex JSONL だけを読む。
plugins/telemetry/bin/session-breakdown --source claude --session <session-id> --from <ISO> --to <ISO> --main --json
plugins/telemetry/bin/session-breakdown --source codex --session <thread-id> --from <ISO> --to <ISO> --json
plugins/telemetry/bin/session-breakdown --source claude --project <repo のパス> --since 1d --main
--source は claude / codex / auto、--session は ID または JSONL パス、--from と
--to は ISO-8601 または Unix timestamp で指定する。--since は既存の Claude CLI と互換の
相対指定で、--from と同時には使わない。窓の外の usage は数えず、窓をまたぐ tool call/result は
対応付けてから duration を窓へ切り詰める。
体(subagent 1 体、または本線 1 セッション)ごとに、経過時間、tool の和集合、明示的な wait、
分類できない時間、トークン、Bash の所要とコマンド種別の内訳、同一コマンドの再実行、worktree
の扱いを出す。親子の parent_id / root_id と groups も出し、グループの経過時間は重なる
子の時間を二重に足さない。分類できない時間をモデルの思考時間やサブスクリプション費用とは
解釈しない。
subagent の行の置き場は Claude Code のバージョンで 2 通りある。<session>/subagents/agent-*.jsonl
に分離されている場合と、本線の JSONL に isSidechain: true で混在している場合で、どちらも読む。
Codex は ~/.codex/sessions/**/rollout-*.jsonl と ~/.codex/archived_sessions/*.jsonl を読み、
session_meta の subagent 親識別子(parent_thread_id または
source.subagent.thread_spawn.parent_thread_id)、response_item の tool call/result、
event_msg の task/item 区間、token_usage_record の response-level usage を使う。Codex の
token_usage_record は response_id で重複排除する。cached input は input の部分集合、reasoning
output は output の部分集合として扱い、token_count のスナップショットを合計しない。usage が
無い窓ではゼロではなく status: unavailable と表示する。通常の会話 fork を示す
forked_from_id は別の識別子として保持し、subagent の親子集計には使わない。親子の一部だけに
usage があるグループは status: partial と欠損 body を表示する。
ログから出せないものは unattributed として残す。モデルの思考時間と tool 実行時間の切り分け、
本線が利用者の入力を待っていた時間、subagent の起動遅延、worktree が後片付けされたかどうかは、
いずれも transcript だけでは確定しない。
使用量の記録と本文の取得可否は別に扱う。本文が欠けている/不透明な値の場合、依頼文の長さや 連絡の必要性を推測しない。この CLI は本文を復号せず、Langfuse への送信も追加しない。 公式の取得経路は App Server の thread/read (includeTurns)、CLI 実行を記録する codex exec --json、 継続観測用の OpenTelemetry。 OTel の prompt 本文は opt-in、tool result は抜粋なので、全文の代替や過去ログの復元を保証しない。
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub gigun-dev/claude-code --plugin telemetryPlugins from other owners that cover similar ground