higress: Skill for Claude Code

.agents/skills/agent-session-monitor/SKILL.md

agent-session-monitor is a skill for Claude Code, Codex from higress-group/higress. It costs 53 tokens per session (3,229 once invoked), scanned A, original, Apache-2.0.

A monitoring tool that reads Higress access logs, groups requests into agent sessions, and records messages, tool calls, token use, and costs. Higress is a gateway system that handles traffic between clients and services.

In plain words
What is it for?
It is for tracking live conversations, token consumption, estimated costs, and complete session histories through a browser interface, including across rotated log files.
Why use it?
It gives developers a continuing view of what agents did across multiple requests, instead of requiring them to inspect raw log files manually.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; installed under .agents/ (shared by several agents).

This is higress-group/higress's own configuration. It tells Claude Code and Codex how to work on higress itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything higress configures →

About the project

Higress is a cloud-native API gateway built on Istio and Envoy that routes and manages APIs and can be extended with WebAssembly plugins. It is used to manage APIs for AI models and MCP servers as well as general services, and the catalogue entries provide agent workflows and integrations for operating it.

higress-group/higress · 9,365 stars · on GitHub · higress.ai

Reuse

Borrowing it

Nothing to install: this file belongs to higress-group/higress. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/higress-group/higress/main/.agents/skills/agent-session-monitor/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/higress-group/higress

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-session-monitor

README.md
[![agentmods](https://agentmods.dev/badge/skills/higress-group/higress/agent-session-monitor/github.svg)](https://agentmods.dev/skills/higress-group/higress/agent-session-monitor)
Your own site
<a href="https://agentmods.dev/skills/higress-group/higress/agent-session-monitor"><img src="https://agentmods.dev/badge/skills/higress-group/higress/agent-session-monitor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-session-monitor

Your own site · 80×15
<a href="https://agentmods.dev/skills/higress-group/higress/agent-session-monitor"><img src="https://agentmods.dev/badge/skills/higress-group/higress/agent-session-monitor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,229 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Data Exfiltration · line 366
    Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.
    Fix: Remove any code that sends prompts, responses, or session data externally. Preserve user privacy; never exfiltrate conversation content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.03229
Opus 5 $0.00026 $0.01614
Sonnet 5 $0.00011 $0.00646
Haiku 4.5 $0.00005 $0.00323

Measured 12d ago against content hash d386a470a394, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

agent-session-monitor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (example/clawdbot_demo.py, example/demo_v2.sh, example/demo.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/agent-session-monitor/SKILL.md · 377 lines

How it starts

The opening of the file, as written. The whole thing — 377 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Overview

Real-time monitoring of Higress access logs, extracting ai_log JSON, grouping multi-turn conversations by session_id, and calculating token costs with visualization.

Core Features

  • Real-time Log Monitoring: Monitors Higress access log files, parses new ai_log entries in real-time
  • Log Rotation Support: Full logrotate support, automatically tracks access.log.1~5 etc.
  • Incremental Parsing: Inode-based tracking, processes only new content, no duplicates
  • Session Grouping: Associates multi-turn conversations by session_id (each turn is a separate request)
  • Complete Conversation Tracking: Records messages, question, answer, reasoning, tool_calls for each turn
  • Token Usage Tracking: Distinguishes input/output/reasoning/cached tokens
  • Web Visualization: Browser-based UI with overview and session drill-down
  • Real-time URL Generation: Clawdbot can generate observation links based on current session ID
  • Background Processing: Independent process, continuously parses access logs
  • State Persistence: Maintains parsing progress and session data across runs

Usage

1. Background Monitoring (Continuous)

# 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

2. Start Web UI (Recommended)

# Start web server
python3 scripts/webserver.py --data-dir ./sessions --port 8888

# Access in browser
open http://localhost:8888

Web UI features:

  • 📊 Overview: View all session statistics and group by model
  • 🔍 Session Details: Click session ID to drill down into complete conversation history
  • 💬 Conversation Log: Display messages, question, answer, reasoning, tool_calls for each turn
  • 💰 Cost Statistics: Real-time token usage and cost calculation
  • 🔄 Auto Refresh: Updates every 30 seconds

Read the full file on GitHub · 377 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 377 lines · 53 tokens per session scan A d386a470a394

Subscribe to this mod's changes

agent-session-monitor is a skill published in the GitHub repository higress-group/higress (9,365 stars, last pushed yesterday), licensed Apache-2.0. It adds 53 tokens to every session and 3,229 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories