TokenGuard β Data skill for Claude Code
π‘οΈ Safety middleware for Claude Code & autonomous AI agents: real-time budget limits, prompt-caching-aware cost tracking, streaming (SSE) abort, Redis-backed shared limits and sha256 agent loop detec.
How to install TokenGuard
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open wison693-stack/TokenGuard and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What TokenGuard does
π‘οΈ Safety middleware for Claude Code & autonomous AI agents: real-time budget limits, prompt-caching-aware cost tracking, streaming (SSE) abort, Redis-backed shared limits and sha256 agent loop detection.
Alternatives in Data
- App Store Compliance β Avoid common App Store and Google Play rejections 3.6k β
- Azure Event Hub .net β High-throughput event streaming 1.8k β
- Wp Perf Review β WordPress performance code review - detects database anti-patterns, caching issues, hook problems, and scalabi 76 β
README
TokenGuard π‘οΈ
**Safety middleware for Claude Code and autonomous AI agents.** TokenGuard sits between your agent and the LLM API and stops the two things that quietly burn money: **runaway API spend** and **infinite agent loops**. Zero required dependencies, pure Python 3.8+.
agent βββΊ TokenGuard βββΊ LLM API
β cache-aware cost tracking β streaming abort
β sha256 loop detection β Redis-backed shared limits
βββΊ AgentAlert: bell + banner + hooks (Slack / webhook / logs)
Table of contents
- The problem
- Features
- Installation
- Quick start
- Running the tests
- Usage guide
- API reference
- Project layout
- How it works
- Limitations & notes
- FAQ
- Contributing
π― The problem
When AI CLI agents (Claude Code and friends) run fully autonomously, three things go wrong:
- Infinite execution loops. The agent keeps re-running a failing command (
pytest,npm test, a syntax fix) and re-sends nearly the same turn hundreds of times, burning thousands of tokens without progress. - Uncontrolled API costs. High-context loops can burn $50+ in minutes before anyone notices.
- Blind spots in modern setups. Streamed (SSE) answers, prompt-cache discounts and multi-instance deployments make naive "tokens x price" accounting wrong or useless.
π Features
| Feature | What it does |
|---|---|
| **Real-time cos |
Related Skills
Dexpaprika API
Free DEX data across 34 chains: 30M+ pools, 27M+ tokens, real-time SSE streaming, OHLCV. No API key, no rate l
Cost Aware LLM Pipeline
Cost optimization patterns for LLM API usage β model routing by task complexity, budget tracking, retry logic,
AI Powered Devloper Platform For Databricks
Just shipped a full-stack AI developer platform for Databricks π β Claude agent with live SSE streaming + too
Web Lead Enrichment
Polite web data collection and AI lead enrichment: robots.txt, rate limits and caching; Claude extracts facts
Jarvis Control
Comandos de controle durante checkpoints do Pipeline Jarvis (continue, abort, skip)
ClaudeMemorySync Server
Server do Claude Memory Sync (Node + Postgres, pronto para a Railway). Recebe e mescla a configuraΓ§Γ£o do Claud
Related Agents
Hono Builder
Hono API implementer β routes, middleware, validation, error handling, streaming/SSE, the typed RPC client (Ap
Nextjs Builder
Next.js App Router network-boundary implementer β Server Component data fetching, Server Actions, route handle
Adk Reviewer
Reviews Google ADK 1.29.0 agent code. Checks ADK-specific patterns, tool contracts, session management, SSE st