Rechercher

PythonReactSEOPDF
OpenClaw

lemnos-cost-guard

Real-time API cost tracking, context bloat detection, and budget enforcement for OpenClaw agents. Use when setting up cost guardrails, checking daily spend, logging token usage after a task, analyzing context bloat, generating cost reports (daily/weekly/monthly), getting model routing recommendations, or when a user asks about API costs, budget status, or why costs are high.

getlemnos320 installations selon la source☆ 0 Étoiles du dépôt

Installation

Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.

SkillHub CLI

skillhub install getlemnos32/lemnos-cost-guard

Examinez la source et la compatibilité, puis suivez les étapes d’installation.

Donnez le lien à votre agent et demandez-lui d’examiner instructions et dépendances avant d’expliquer les étapes.

Voir la source ↗Guides

Instructions

Lemnos Cost Guard

Track token usage, enforce budgets, detect context bloat, and route to cheaper models.

Quick Reference

Script Purpose
scripts/track_cost.py Log a cost entry after a task
scripts/cost_report.py Generate cost summary
scripts/context_analyzer.py Scan workspace for bloat

Pricing and model routing rules: references/model_pricing.md

Workflow

After Every Significant Task

Log cost immediately using session delta (session_status before vs after):

python3 skills/lemnos-cost-guard/scripts/track_cost.py \
  --task "email batch" \
  --input 45000 \
  --output 1200 \
  --model claude-sonnet-4-6

Logs to: logs/cost-YYYY-MM-DD.jsonl

Daily Briefing — Cost Summary Block

Run before sending the morning briefing:

python3 skills/lemnos-cost-guard/scripts/cost_report.py --days 1 --budget 5.00 --format brief

Include output verbatim in briefing. Flag anything over 80% of budget.

Budget Alerts
  • ≥80% of $5/day → warn Nick, pause non-revenue tasks
  • ≥100% of $5/day → hard stop, notify Nick immediately
  • Single call >500K input tokens → immediate alert
  • I/O ratio >50:1 → context bloat warning, recommend compaction
Context Bloat Check (run weekly or when costs spike)
python3 skills/lemnos-cost-guard/scripts/context_analyzer.py \
  --workspace /root/.openclaw/workspace

Context Loading Rules (enforce on every session)

Load ONLY what the current task requires:

Task Load
Morning briefing SOUL.md, USER.md, MEMORY.md, HEARTBEAT.md, today's memory
Email outreach MEMORY.md (Lemnos rules only), sent-log.md
LinkedIn research sent-log.md only
Crypto/market MEMORY.md (crypto section only)
Heartbeat (nothing to do) HEARTBEAT.md only

Do NOT load full MEMORY.md + all skills + all reference files unless the task requires it.

Model Routing

See references/model_pricing.md for full table....

Informations sur la source

Source
github
Repository
openclaw/skills
Path
skills/getlemnos32/lemnos-cost-guard
Version
—
Commit
4547d4aac054bb6709cbfa336b8bfe9bcc779854
Source de classification
rules
Statut
active
Visibilité
public

Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.

Contenu extrait

SKILL.md
# Lemnos Cost Guard

Track token usage, enforce budgets, detect context bloat, and route to cheaper models.

## Quick Reference

| Script | Purpose |
|--------|---------|
| `scripts/track_cost.py` | Log a cost entry after a task |
| `scripts/cost_report.py` | Generate cost summary |
| `scripts/context_analyzer.py` | Scan workspace for bloat |

Pricing and model routing rules: `references/model_pricing.md`

## Workflow

### After Every Significant Task
Log cost immediately using session delta (session_status before vs after):

```bash
python3 skills/lemnos-cost-guard/scripts/track_cost.py \
  --task "email batch" \
  --input 45000 \
  --output 1200 \
  --model claude-sonnet-4-6
```

Logs to: `logs/cost-YYYY-MM-DD.jsonl`

### Daily Briefing — Cost Summary Block
Run before sending the morning briefing:

```bash
python3 skills/lemnos-cost-guard/scripts/cost_report.py --days 1 --budget 5.00 --format brief
```

Include output verbatim in briefing. Flag anything over 80% of budget.

### Budget Alerts
- **≥80% of $5/day** → warn Nick, pause non-revenue tasks
- **≥100% of $5/day** → hard stop, notify Nick immediately
- **Single call >500K input tokens** → immediate alert
- **I/O ratio >50:1** → context bloat warning, recommend compaction

### Context Bloat Check (run weekly or when costs spike)

```bash
python3 skills/lemnos-cost-guard/scripts/context_analyzer.py \
  --workspace /root/.openclaw/workspace
```

## Context Loading Rules (enforce on every session)

Load ONLY what the current task requires:

| Task | Load |
|------|------|
| Morning briefing | SOUL.md, USER.md, MEMORY.md, HEARTBEAT.md, today's memory |
| Email outreach | MEMORY.md (Lemnos rules only), sent-log.md |
| LinkedIn research | sent-log.md only |
| Crypto/market | MEMORY.md (crypto section only) |
| Heartbeat (nothing to do) | HEARTBEAT.md only |

Do NOT load full MEMORY.md + all skills + all reference files unless the task requires it.

## Model Routing

See `references/model_pricing.md` for full table....

Skills associés

OpenClaw

xint

0xnyk

X Intelligence CLI — search, monitor, analyze, and engage on X/Twitter. TypeScript + Bun. AI agent skill.

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

flightclaw

jackculpan

Track flight prices from Google Flights with this OpenClaw skill. Search routes, monitor prices, and get alerts when prices drop.

OpenClaw

openclaw-trading-assistant

openclaw-trade

openclaw trading assistant| openclaw trading skill | nof1.ai & openclaw [moltbot] collaboration | We get the best practices from alpha arena trading seasons and bring it to clawdbot All top AI agents, realtime...