Statistics
thedaviddias/ux-patterns-for-developers
A skill your agent uses when you need to display key metrics and statistics.
Real-time agent conversation monitoring - monitors Higress access logs, aggregates conversations by session, tracks token usage.
$ npx skills add higress-group/higress --skill agent-session-monitor -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install higress-group/higress agent-session-monitor --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/higress-group/higress.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/agent-session-monitor .claude/skills/agent-session-monitor && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "agent-session-monitor" agent skill from https://github.com/higress-group/higress/tree/main/.agents/skills/agent-session-monitor into .claude/skills/agent-session-monitor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-session-monitor", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/higress-group/higress/tree/main/.agents/skills/agent-session-monitorType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add higress-group/higress --skill agent-session-monitor -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install higress-group/higress agent-session-monitor --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/higress-group/higress.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/agent-session-monitor .agents/skills/agent-session-monitor && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "agent-session-monitor" agent skill from https://github.com/higress-group/higress/tree/main/.agents/skills/agent-session-monitor into .agents/skills/agent-session-monitor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-session-monitor", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add higress-group/higress --skill agent-session-monitor -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install higress-group/higress agent-session-monitor --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/higress-group/higress.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/agent-session-monitor .cursor/skills/agent-session-monitor && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "agent-session-monitor" agent skill from https://github.com/higress-group/higress/tree/main/.agents/skills/agent-session-monitor into .cursor/skills/agent-session-monitor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-session-monitor", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/higress-group/higress.git --path .agents/skills/agent-session-monitor--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add higress-group/higress --skill agent-session-monitor -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install higress-group/higress agent-session-monitor --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/higress-group/higress.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/agent-session-monitor .gemini/skills/agent-session-monitor && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "agent-session-monitor" agent skill from https://github.com/higress-group/higress/tree/main/.agents/skills/agent-session-monitor into .gemini/skills/agent-session-monitor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-session-monitor", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install higress-group/higress agent-session-monitorInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add higress-group/higress --skill agent-session-monitor -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/higress-group/higress.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/agent-session-monitor .github/skills/agent-session-monitor && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "agent-session-monitor" agent skill from https://github.com/higress-group/higress/tree/main/.agents/skills/agent-session-monitor into .github/skills/agent-session-monitor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-session-monitor", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add higress-group/higress --skill agent-session-monitor -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install higress-group/higress agent-session-monitor --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/higress-group/higress.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/agent-session-monitor .opencode/skills/agent-session-monitor && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "agent-session-monitor" agent skill from https://github.com/higress-group/higress/tree/main/.agents/skills/agent-session-monitor into .opencode/skills/agent-session-monitor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-session-monitor", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
agent-session-monitorReal-time agent conversation monitoring - monitors Higress access logs, aggregates conversations by session, tracks token usage.
Agent Session Monitor is an agent skill from higress-group/higress. Real-time agent conversation monitoring - monitors Higress access logs, aggregates conversations by session, tracks token usage. Supports web interface for viewing complete conversation history and costs. Use when users ask about current session token consumption, conversation history, or cost statistics.
Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts (for example `QUICKSTART.md`, `README.md` and `example/clawdbot_demo.py`).
It sits in Data & Analytics, covering Frontend development and Statistics. The repository describes itself as: 🤖 AI Gateway | AI Native API Gateway. The licence is Apache-2.0.
9 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit c74d7e2. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 2 files in scripts/ (Python and Shell), which the agent can run.
Shell commands in SKILL.md call:
python3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Agent Session Monitor loads about 3.3k tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 714 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from higress-group/higress at commit c74d7e2, republished under its Apache-2.0 licence (© higress-group). 714 words, ~3,293 tokens.
.claude/skills/agent-session-monitor/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.Real-time monitoring of Higress access logs, extracting ai_log JSON, grouping multi-turn conversations by session_id, and calculating token costs with visualization.
# Parse Higress access logs (with log rotation support)
python3 main.py --log-path /var/log/proxy/access.log --output-dir ./sessions
# Filter by session key
python3 main.py --log-path /var/log/proxy/access.log --session-key <session-id>
# Scheduled task (incremental parsing every minute)
* * * * * python3 /path/to/main.py --log-path /var/log/proxy/access.log --output-dir /var/lib/sessions# Start web server
python3 scripts/webserver.py --data-dir ./sessions --port 8888
# Access in browser
open http://localhost:8888Web UI features:
When users ask about current session token consumption or conversation history:
Example response:
Your current session statistics:
- Session ID: agent:main:discord:channel:1465367993012981988
- View details: http://localhost:8888/session?id=agent:main:discord:channel:1465367993012981988
Click the link to see:
✅ Complete conversation history
✅ Token usage breakdown per turn
✅ Tool call records
✅ Cost statistics# View specific session details
python3 scripts/cli.py show <session-id>
# List all sessions
python3 scripts/cli.py list --sort-by cost --limit 10
# Statistics by model
python3 scripts/cli.py stats-model
# Statistics by date (last 7 days)
python3 scripts/cli.py stats-date --days 7
# Export reports
python3 scripts/cli.py export finops-report.json| Parameter | Description | Required | Default |
|---|---|---|---|
--log-path | Higress access log file path | Yes | /var/log/higress/access.log |
--output-dir | Session data storage directory | No | ./sessions |
--session-key | Monitor only specified session key | No | Monitor all sessions |
--state-file | State file path (records read offsets) | No | <output-dir>/.state.json |
--refresh-interval | Log refresh interval (seconds) | No | 1 |
| Parameter | Description | Required | Default |
|---|---|---|---|
--data-dir | Session data directory | No | ./sessions |
--port | HTTP server port | No | 8888 |
--host | HTTP server address | No | 0.0.0.0 |
🔍 Session Monitor - Active
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Active Sessions: 3
┌──────────────────────────┬─────────┬──────────┬───────────┐
│ Session ID │ Msgs │ Input │ Output │
├──────────────────────────┼─────────┼──────────┼───────────┤
│ sess_abc123 │ 5 │ 1,250 │ 800 │
│ sess_xyz789 │ 3 │ 890 │ 650 │
│ sess_def456 │ 8 │ 2,100 │ 1,200 │
└──────────────────────────┴─────────┴──────────┴───────────┘
📈 Token Statistics
Total Input: 4240 tokens
Total Output: 2650 tokens
Total Cached: 0 tokens
Total Cost: $0.00127
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━$ python3 scripts/cli.py show agent:main:discord:channel:1465367993012981988
======================================================================
📊 Session Detail: agent:main:discord:channel:1465367993012981988
======================================================================
🕐 Created: 2026-02-01T09:30:00+08:00
🕑 Updated: 2026-02-01T10:35:12+08:00
🤖 Model: Qwen3-rerank
💬 Messages: 5
📈 Token Statistics:
Input: 1,250 tokens
Output: 800 tokens
Reasoning: 150 tokens
Total: 2,200 tokens
💰 Estimated Cost: $0.00126000 USD
📝 Conversation Rounds (5):
──────────────────────────────────────────────────────────────────────
Round 1 @ 2026-02-01T09:30:15+08:00
Tokens: 250 in → 160 out
🔧 Tool calls: Yes
Messages (2):
[user] Check Beijing weather
❓ Question: Check Beijing weather
✅ Answer: Checking Beijing weather for you...
🧠 Reasoning: User wants to know Beijing weather, I need to call weather API.
🛠️ Tool Calls:
- get_weather({"location":"Beijing"})$ python3 scripts/cli.py stats-model
================================================================================
📊 Statistics by Model
================================================================================
Model Sessions Input Output Cost (USD)
────────────────────────────────────────────────────────────────────────────
Qwen3-rerank 12 15,230 9,840 $ 0.016800
DeepSeek-R1 5 8,450 6,200 $ 0.010600
Qwen-Max 3 4,200 3,100 $ 0.008300
GPT-4 2 2,100 1,800 $ 0.017100
────────────────────────────────────────────────────────────────────────────
TOTAL 22 29,980 20,940 $ 0.052800
================================================================================$ python3 scripts/cli.py stats-date --days 7
================================================================================
📊 Statistics by Date (Last 7 days)
================================================================================
Date Sessions Input Output Cost (USD) Models
────────────────────────────────────────────────────────────────────────────
2026-01-26 3 2,100 1,450 $ 0.0042 Qwen3-rerank
2026-01-27 5 4,850 3,200 $ 0.0096 Qwen3-rerank, GPT-4
2026-01-28 4 3,600 2,800 $ 0.0078 DeepSeek-R1, Qwen
────────────────────────────────────────────────────────────────────────────
TOTAL 22 29,980 20,940 $ 0.0528
================================================================================Access http://localhost:8888 to see:
Home Page:
Session Detail Page:
Features:
Each session is stored as an independent JSON file with complete conversation history and token statistics:
{
"session_id": "agent:main:discord:channel:1465367993012981988",
"created_at": "2026-02-01T10:30:00Z",
"updated_at": "2026-02-01T10:35:12Z",
"messages_count": 5,
"total_input_tokens": 1250,
"total_output_tokens": 800,
"total_reasoning_tokens": 150,
"total_cached_tokens": 0,
"model": "Qwen3-rerank",
"rounds": [
{
"round": 1,
"timestamp": "2026-02-01T10:30:15Z",
"input_tokens": 250,
"output_tokens": 160,
"reasoning_tokens": 0,
"cached_tokens": 0,
"model": "Qwen3-rerank",
"has_tool_calls": true,
"response_type": "normal",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant..."
},
{
"role": "user",
"content": "Check Beijing weather"
}
],
"question": "Check Beijing weather",
"answer": "Checking Beijing weather for you...",
"reasoning": "User wants to know Beijing weather, need to call weather API.",
"tool_calls": [
{
"index": 0,
"id": "call_abc123",
"type": "function",
"function": {
"name": "get_weather",
"arguments": "{\"location\":\"Beijing\"}"
}
}
],
"input_token_details": {"cached_tokens": 0},
"output_token_details": {}
}
]
}Session Level:
session_id: Unique session identifier (from ai_log's session_id field)created_at: Session creation timeupdated_at: Last update timemessages_count: Number of conversation turnstotal_input_tokens: Cumulative input tokenstotal_output_tokens: Cumulative output tokenstotal_reasoning_tokens: Cumulative reasoning tokens (DeepSeek, o1, etc.)total_cached_tokens: Cumulative cached tokens (prompt caching)model: Current model in useRound Level (rounds):
round: Turn numbertimestamp: Current turn timestampinput_tokens: Input tokens for this turnoutput_tokens: Output tokens for this turnreasoning_tokens: Reasoning tokens (o1, etc.)cached_tokens: Cached tokens (prompt caching)model: Model used for this turnhas_tool_calls: Whether includes tool callsresponse_type: Response type (normal/error, etc.)messages: Complete conversation history (OpenAI messages format)question: User's question for this turn (last user message)answer: AI's answer for this turnreasoning: AI's thinking process (if model supports)tool_calls: Tool call list (if any)input_token_details: Complete input token details (JSON)output_token_details: Complete output token details (JSON)Higress access logs must include ai_log field (JSON format). Example:
{
"__file_offset__": "1000",
"timestamp": "2026-02-01T09:30:15Z",
"ai_log": "{\"session_id\":\"sess_abc\",\"messages\":[...],\"question\":\"...\",\"answer\":\"...\",\"input_token\":250,\"output_token\":160,\"model\":\"Qwen3-rerank\"}"
}Supported ai_log attributes:
session_id: Session identifier (required)messages: Complete conversation historyquestion: Question for current turnanswer: AI answerreasoning: Thinking process (DeepSeek, o1, etc.)reasoning_tokens: Reasoning token count (from PR #3424)cached_tokens: Cached token count (from PR #3424)tool_calls: Tool call listinput_token: Input token countoutput_token: Output token countinput_token_details: Complete input token details (JSON)output_token_details: Complete output token details (JSON)model: Model nameresponse_type: Response type© higress-group, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 11 other files (scripts) in .agents/skills/agent-session-monitor of higress-group/higress.
Open the folder on GitHubat commit c74d7e2
Agent Session Monitor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Agent Session Monitor this skillhigress-group/higress | 9.5k | — | ~3.3k | Automated safety check: Pass | Apache-2.0 | |
| Statisticsthedaviddias/ux-patterns-for-developers | 259 | — | ~1k | Automated safety check: Pass | Custom licence | |
| Sandbox Benchvercel/next.js | 143k | — | ~4.1k | Automated safety check: Pass | MIT | |
| Statistical Analysisspacering-net/codeg | 3.9k | 3 repos | ~5k | Automated safety check: Pass | MIT | |
| StatsmodelszLanqing/codex-claude-academic-skills | 4.7k | 15 repos | ~4.9k | Automated safety check: Pass | BSD-3-Clause | |
| AI Daily DigestvigorX777/ai-daily-digest | 1.6k | — | ~1.3k | Automated safety check: Pass | None |
thedaviddias/ux-patterns-for-developers
A skill your agent uses when you need to display key metrics and statistics.
vercel/next.js
Benchmark React or Next.js changes on Vercel Sandbox VMs with paired A/B statistics: react PR/commit vs base, or Next.js PR/commit vs base, measured end-to-end through the bench/render-pipeline app…
spacering-net/codeg
Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting.
zLanqing/codex-claude-academic-skills
Statistical models library for Python. An agent skill from zLanqing/codex-claude-academic-skills.
vigorX777/ai-daily-digest
Fetches RSS feeds from 90 top Hacker News blogs (curated by Karpathy), uses AI to score and filter articles, and generates a daily digest in Markdown with Chinese-translated titles, category…
spacering-net/codeg
Sample-size and statistical power calculations for planning studies.
higress-group/higress
Deploy and configure Higress AI Gateway for OpenClaw integration.
higress-group/higress
Migrate from ingress-nginx to Higress in Kubernetes environments.
higress-group/higress
Develop Higress WASM plugins using Go 1.24+. An agent skill from higress-group/higress.
higress-group/higress
Configure automatic model routing using the get-ai-gateway.sh CLI tool for Higress AI Gateway.
higress-group/higress
生成 Higress 项目每日报告,追踪 issue/PR 动态,沉淀问题处理经验,驱动社区问题闭环。用于生成日报、跟进 issue、记录解决方案。
higress-group/higress
Update Higress Envoy binary and gateway image dependencies for e2e validation.
Categories
Real-time agent conversation monitoring - monitors Higress access logs, aggregates conversations by session, tracks token usage. Agent Session Monitor is an agent skill from higress-group/higress. Real-time agent conversation monitoring - monitors Higress access logs, aggregates conversations by session, tracks token usage.
Agent Session Monitor fits situations like: users ask about current session token consumption; conversation history; cost statistics.
Run `npx skills add higress-group/higress --skill agent-session-monitor -a claude-code`. Or copy the skill folder (.agents/skills/agent-session-monitor in higress-group/higress) into .claude/skills/agent-session-monitor in your project. Claude Code loads it when a task matches its description.
Run `npx skills add higress-group/higress --skill agent-session-monitor -a codex`. Or copy the skill folder (.agents/skills/agent-session-monitor in higress-group/higress) into .agents/skills/agent-session-monitor in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add higress-group/higress --skill agent-session-monitor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-session-monitor, .gemini/skills/agent-session-monitor, .github/skills/agent-session-monitor and .opencode/skills/agent-session-monitor in your project.
Going by SKILL.md and its folder, Agent Session Monitor needs Python and a shell for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3; A Bash shell.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Agent Session Monitor is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Agent Session Monitor: Statistics (thedaviddias/ux-patterns-for-developers, 259 stars), Sandbox Bench (vercel/next.js, 143k stars), Statistical Analysis (spacering-net/codeg, 3.9k stars) and Statsmodels (zLanqing/codex-claude-academic-skills, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
higress-group (a GitHub organization) maintains it in higress-group/higress, which has 9,516 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 8, 2026.
Source: higress-group/higress on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.