Skip to content
Back to skills

Session Monitor

ASecurity

Real-time session monitoring tracking waste trajectory, dispatching periodic probes, and alerting on regressions.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 4, 2026
ai-agents

Security analysis

A100/100

Scanned October 4, 2026

npx -y skills add nseney1/Soma-Governance --skill session-monitor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Session Monitor?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Session Monitor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nseney1-session-monitor/badge)](https://www.skillsdirectory.com/skills/nseney1-session-monitor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Session Monitor
description: Real-time session monitoring tracking waste trajectory, dispatching periodic probes, and alerting on regressions.
trigger: user_request
---

# Session Monitor

> **Role**: Live waste tracking and alerting for active Antigravity sessions. Periodically samples session trajectories, quantifies waste patterns, and alerts the orchestrator upon regression or threshold breaches.

## Workflow

1. **Initialize Session Tracking**: Receive the target session ID from the orchestrator.
2. **Establish Baseline**: Execute `sweep_session.py --summary-only` on the session's `transcript.jsonl` to record the initial waste rate and step count baseline.
3. **Configure Periodic Monitoring**: Use the `schedule` tool to set a recurring timer (default: 15 minutes, or as configured).
4. **Periodic Re-scan & Trajectory Evaluation**:
   - On each interval, re-scan `transcript.jsonl`.
   - Compute current waste rate, delta against baseline, and top emerging waste patterns.
5. **Threshold-Gated Reporting**: Report back to the orchestrator *only* when a configured threshold is breached or an adverse trajectory change is detected.
6. **Auto-Termination**: Automatically stop monitoring after 3 consecutive clean checks or upon verified session closure.

## Alert Thresholds

| Condition | Action |
|:----------|:-------|
| **Waste < 5%** | Silent (healthy execution, no notification needed) |
| **Waste 5–15%** | Note in next scheduled report (warning state) |
| **Waste > 15%** | Alert orchestrator immediately with breakdown |
| **Increasing 3 consecutive checks** | Alert immediately + recommend specific steering intervention |
| **New pattern not in taxonomy** | Alert + recommend taxonomy update |

## Tools & Utilities Used

- `sweep_session.py`: Analyzes waste patterns and computes waste metrics.
- `transcript.jsonl`: Direct log inspection for step-by-step verification.
- `schedule`: Schedules one-shot or recurring inspection intervals without polling loops.

## Trajectory Tracking Format

Maintain trajectory history in structured JSON format:

```json
[
  {
    "timestamp": "2026-09-26T21:15:00Z",
    "step_count": 92,
    "waste_rate": 0.032,
    "top_pattern": "SYNTAX_ONLY_VERIFICATION"
  },
  {
    "timestamp": "2026-09-26T21:30:00Z",
    "step_count": 128,
    "waste_rate": 0.081,
    "top_pattern": "RED_TEST_SKIPPED"
  }
]
```

## Anti-Patterns & Failure Modes

- **Expensive Over-Auditing**: Do not dispatch full staff reviews during monitoring (token inefficient).
- **Session Mutation**: Never modify the target session's files or active workspace state.
- **Chatter Pollution**: Do not alert on every clean check—notify only on threshold breaches, regressions, or trend anomalies.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.