cashclaw-guard

cashclaw-guard is a skill for Claude Code, Codex from ertugrulakben/cashclaw. It costs 55 tokens per session (1,538 once invoked), scanned A, original, MIT.

A runtime protection layer for AI agents that applies limits during language-model calls and tool use. It uses a YAML policy to cap costs, stop recursive calls, block tools, and send alerts.

In plain words
What is it for?
Use it to set cost caps, detect recursion, deny selected tools, configure rate limits, and connect Slack, Telegram, or Discord alerts for OpenClaw-compatible agents.
Why use it?
It helps prevent runaway spending and infinite agent loops while the agent is running. Unlike monitoring alone, it can enforce hard limits in real time.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: positional $N argument; built for openclaw.

Good fit Use it to set cost caps, detect recursion, deny selected tools, configure rate limits, and connect Slack, Telegram, or Discord alerts for OpenClaw-compatible agents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ertugrulakben/cashclaw/cashclaw-guard
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ertugrulakben/cashclaw --skill cashclaw-guard
Clone the repo
git clone --depth 1 https://github.com/ertugrulakben/cashclaw

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 cashclaw-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/ertugrulakben/cashclaw/cashclaw-guard/github.svg)](https://agentmods.dev/skills/ertugrulakben/cashclaw/cashclaw-guard)
Your own site
<a href="https://agentmods.dev/skills/ertugrulakben/cashclaw/cashclaw-guard"><img src="https://agentmods.dev/badge/skills/ertugrulakben/cashclaw/cashclaw-guard/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 cashclaw-guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/ertugrulakben/cashclaw/cashclaw-guard"><img src="https://agentmods.dev/badge/skills/ertugrulakben/cashclaw/cashclaw-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,538 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 medium

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 →

  • medium Rogue Agent · line 100
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.00055 $0.01538
Opus 5 $0.00028 $0.00769
Sonnet 5 $0.00011 $0.00308
Haiku 4.5 $0.00006 $0.00154

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

Security

Grade A, and why

cashclaw-guard 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 13d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/guard.js), 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.

skills/cashclaw-guard/SKILL.md · 175 lines

How it starts

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

CashClaw Guard

Agent runtime protection. Stop $34K incidents in 12 lines of code.

When an AI agent runs unattended, two things can break the bank in one night:

  1. Cost runaway — a misconfigured loop calls the LLM API thousands of times before the soft limit kicks in 24 hours later.
  2. Sonsuz döngü — agent calls itself, or two agents call each other, with no exit condition.

Cloudflare lost $34,000 in 8 days to a Durable Object loop in February 2026. The fix wasn't a smarter agent — it was a runtime layer that says "no, you've spent enough."

CashClaw Guard is that layer. It plugs into any OpenClaw-compatible agent and enforces a YAML policy at every LLM call and tool invocation.

Why this skill?

Tool Watches Enforces
Helicone, Langfuse
Datadog, Sentry
OpenAI soft limits ✅ (24h delay) ⚠️ partial
CashClaw Guard real-time, hard cap

Pricing Tiers

Tier Scope Price Delivery
Audit Policy review + recommended config for 1 agent $19 24h
Setup Full deploy: install, YAML policy, webhook hookup, dashboard $49 48h
Hardening Audit + custom rate limits + multi-agent + on-call runbook $99 5d

Quick Start

npm install cashclaw
cashclaw guard init
# edit ~/.cashclaw/guard-policy.yaml
cashclaw guard test

SDK

import { guard } from 'cashclaw/guard';

// Wrap any LLM call
const safeChat = guard.llm({
  maxCostUsd: 5,
  maxTokens: 50000,
  model: 'gpt-5.5',
  agentId: 'support-bot',
})(async (prompt) => {
  return await openai.chat.completions.create({
    model: 'gpt-5.5',
    messages: [{ role: 'user', content: prompt }],
  });
});

await safeChat('summarize this ticket');
// → throws BudgetExceeded if the call would push you over the cap
// → throws RecursionKilled if the same fingerprint repeats 5x in 60s
// → fires Telegram alert before throwing
// Tool firewall (called before any shell / api / mcp invocation)
import { guard } from 'cashclaw/guard';

guard.tool('slack.send', { agentId: 'support-bot' });
// throws ToolDenied if slack.send isn't in the allowlist
// throws RateLimitExceeded if rate per minute/hour is hit

Read the full file on GitHub · 175 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 13d ago First seen · 175 lines · 55 tokens per session scan A 7846c9569910

Subscribe to this mod's changes

cashclaw-guard is a skill published in the GitHub repository ertugrulakben/cashclaw (300 stars, last pushed 3mo ago), licensed MIT. It adds 55 tokens to every session and 1,538 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-30.