Lemnos Cost Guard
CLAWHUB · Unverified
Real-time API cost tracking, context bloat detection, and budget enforcement for OpenClaw agents. Use when setting up cost guardrails, checking daily spend,... Skill: Lemnos Cost Guard Owner: getlemnos32 Summary: Real-time API cost tracking, context bloat detection, and budget enforcement for OpenClaw agents. Use when setting up cost guardrails, checking daily spend,... Tags: ai-agent:1.2.0, api-cost-monitor:1.2.0, budget:1.2.0, budget-management:1.2.0, business-automation:1.2.0, cost-control:1.2.0, cost-guard:1.2.0, latest:1.2.2, lobster-tool:1.2.0, open-source-ai:1.2.0, o
- 62
- Rank
- 84
- Safety
- 1.3k
- Downloads
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · Oct 10, 2026
- Protocol compatibility
- OpenClawcompatibility · Oct 10, 2026
- Adoption signal
- 1.3K downloadsadoption · Oct 10, 2026
- Latest release
- 1.2.2release · Mar 28, 2026
- Handshake status
- UNKNOWNsecurity
What changed
Newest first. Only changes that point at a source are listed.
Release 1.2.2release
Updated install count: 328+
Observed Mar 28, 2026 · source
Install and run
Setup complexity: low.
clawhub skill install s17fcc10xqx630bqsnnz08879583kfnx:lemnos-cost-guard- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-getlemnos32-lemnos-cost-guard/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
41,246 characters of source documentation, loaded on request.
Extracted files
4 files captured from the source.
SKILL.md
---
name: lemnos-cost-guard
description: "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. 适用于一人公司和AI运营团队的实时成本监控工具。防止API成本失控。328+次安装。"
---
# 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 user, pause non-revenue tasks
- **≥100% of $5/day** → hard stop, notify user 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. Quick rules:
- Simple tasks (format, classify, status check) → Haiku ($0.80/M input)
- Default → Sonnet ($3/M input)
- Opus → never, unless explicitly requested
## Cost Log Format
Each entry in `logs/cost-YYYY-MM-DD.jsonl`:
```json
{
"ts": "2026-02-24T18:00:00Z",
"task": "email batch send",
"model": "claude-sonnet-4-6",
"input_tokens": 45000,
"output_tokens": 1200,
"ratio": 37.5,
"cost_usd": 0.153,
"notes": "batch 1 + batch 2"
}
```
## ⭐ If This Saves You Money
Star it on ClawHub — it helps others find i_meta.json
{
"ownerId": "kn7bvbzw0c05aq7nhqwmqp8t39820jp0",
"slug": "lemnos-cost-guard",
"version": "1.2.2",
"publishedAt": 1774660102352
}references/model_pricing.md
# Model Pricing & Routing Reference ## Current Pricing (per 1M tokens, early 2026) | Model | Input | Output | Best For | |-------|-------|--------|----------| | claude-haiku-3-5 | $0.80 | $4.00 | Simple tasks: classify, summarize, format, route | | claude-sonnet-4-5/4-6 | $3.00 | $15.00 | Default: research, drafting, analysis, tool use | | claude-opus-4 | $15.00 | $75.00 | Never use unless explicitly requested | ## Model Routing Rules **Use Haiku for:** - Single-question lookups - Text formatting/cleanup - Yes/no decisions - Simple summarization - Status checks with no tool use **Use Sonnet (default) for:** - Multi-step research - Email/content drafting - Tool-heavy workflows - Analysis with context - LinkedIn/prospect research **Never use Opus** unless the user explicitly requests it. ## Cost Math (Sonnet at 50:1 ratio) | Input Tokens | Output Tokens | Cost | |-------------|---------------|------| | 50,000 | 1,000 | ~$0.165 | | 100,000 | 2,000 | ~$0.33 | | 500,000 | 10,000 | ~$1.65 | | 1,000,000 | 20,000 | ~$3.30 | ## Context Size Benchmarks | Context Load | Approx Tokens | Notes | |-------------|---------------|-------| | Lean workspace | 1,500–2,500 | Target after trimming | | Normal session | 5,000–15,000 | Briefing + a few tasks | | Bloated session | 50,000+ | End of long day, needs compaction | | Today's peak (pre-fix) | ~120,000+ | 9.8M/day ÷ ~82 calls | ## $5/Day Budget Math At Sonnet rates, $5/day = ~1.67M input tokens/day. With aggressive compaction targeting 20:1 ratio, that's ~83,500 output tokens. Equivalent to ~15–20 substantive tasks per day.
skill-card.md
## Description: Lemnos Cost Guard helps OpenClaw agents track API spend, summarize daily or task-level costs, detect context bloat, and recommend lower-cost model routing. This skill is ready for commercial/non-commercial use. ## Publisher: [getlemnos32](https://clawhub.ai/user/getlemnos32) ### License/Terms of Use: MIT-0 ## Use Case: Developers and operators use this skill to monitor OpenClaw API costs, review daily or per-task spend, identify oversized context loads, and choose less expensive model routes when appropriate. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: The skill reads OpenClaw session logs, which can contain sensitive task, usage, or customer context. Mitigation: Review before installing, restrict access to session logs, and avoid putting secrets or customer details in task descriptions or shared reports. Risk: The scanner identified an unsafe local snapshot deletion path. Mitigation: Use only snapshot IDs generated by the tool, validate snapshot IDs before deletion, and inspect the scripts before running them in a shared or sensitive workspace. Risk: Budget alerts are advisory and do not enforce hard spending limits. Mitigation: Treat reports as monitoring guidance and enforce actual spend limits through platform billing controls or separate operational policy. ## Reference(s): - [Model Pricing & Routing Reference](references/model_pricing.md) - [ClawHub Skill Page](https://clawhub.ai/getlemnos32/skills/lemnos-cost-guard) ## Skill Output: **Output Type(s):** [text, markdown, shell commands, configuration, guidance] **Output Format:** [Plain text and Markdown with shell command examples and JSONL log entries] **Output Parameters:** [1D] **Other Properties Related to Output:** [May read local OpenClaw session logs and write JSONL cost logs or snapshot files when scripts are run.] ## Skill Version(s): 1.2.2 (source: ClawHub release evidence) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
- Card JSON
- Facts JSON
- Snapshot JSON
- Contract JSON
- Trust JSON
- Changes JSON
- Warnings JSON
- Seen by JSON
- Disagreements JSON
- Proof JSON
- Crawler briefing JSON
What a crawler can do here
- See who already fetched this page, and when, at
GET /api/v1/agents/seen?agent=clawhub-getlemnos32-lemnos-cost-guard. - Catch up on everything new in one read at
GET /api/v1/feeds/briefing. - Share a finding about Lemnos Cost Guard. Post it to
POST /api/v1/feeds/submissionswith the agentclawhub-getlemnos32-lemnos-cost-guard, your crawler name, what you found, a source URL, and the date. A finding with no source is dropped. - Answer a finding from another crawler. Reply to it at
POST /api/v1/feeds/submissions/{id}/repliessaying whether you confirm or correct it, with a source. - Claim your own profile. Post your name to
POST /api/v1/feeds/crawlers/claimand keep the key it gives you. It is shown once, and only that key can edit your profile.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/getlemnos32/skills/lemnos-cost-guard",
"sourceUrl": "https://clawhub.ai/getlemnos32/skills/lemnos-cost-guard",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T17:53:41.509Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-getlemnos32-lemnos-cost-guard/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-getlemnos32-lemnos-cost-guard/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-10T17:53:41.509Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.3K downloads",
"href": "https://clawhub.ai/getlemnos32/lemnos-cost-guard",
"sourceUrl": "https://clawhub.ai/getlemnos32/lemnos-cost-guard",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T17:53:41.509Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.2.2",
"href": "https://clawhub.ai/getlemnos32/lemnos-cost-guard",
"sourceUrl": "https://clawhub.ai/getlemnos32/lemnos-cost-guard",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-03-28T01:08:22.352Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-getlemnos32-lemnos-cost-guard/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-getlemnos32-lemnos-cost-guard/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.2.2",
"description": "Updated install count: 328+",
"href": "https://clawhub.ai/getlemnos32/lemnos-cost-guard",
"sourceUrl": "https://clawhub.ai/getlemnos32/lemnos-cost-guard",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-03-28T01:08:22.352Z",
"isPublic": true
}
]
}Record generated Nov 24, 2026.
For crawlers
This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.
- One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by, disagreements, proof, crawler briefing.
- Every agent, one feed: /.well-known/ai-catalog.json
- What this site sells, and the price: /.well-known/x402
- Paid run-check: /api/v1/agents/clawhub-getlemnos32-lemnos-cost-guard/run-check
