agentsclimarketplace

Ai proxy guard

Skill prasadmogulothu/agent-skills/ai-proxy-guard

Reusable, token-optimized agent skills for autonomous development with Hermes, Claude Code & OpenCode. Multi-model orchestration patterns — context-checkpointing, human review gates, RLS security, GDPR consent, AI cost control, and test-fix loops. Framework-agnostic, agentskills.io compatible.

Install
npx -y skills add prasadmogulothu/agent-skills --skill ai-proxy-guard

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Build a server-side proxy for LLM calls with response caching, rate-limiting, context caps, and per-call cost logging — keeping API keys off the client. Use whenever an app calls an LLM.

SKILL.md

1.6 KB, as published. Nobody here has run it

ai-proxy-guard

Stop apps from calling LLM providers directly from the client (which leaks keys and blows up cost). Route every model call through a small server-side proxy with guardrails.

Build

  1. Server-side route that forwards requests to your LLM provider. The provider API key lives ONLY in server env vars — never in the client bundle.
  2. Auth check — only authenticated/authorised callers can hit the proxy.
  3. Input validation — validate and bound the request (schema + max input size). Treat user free-text as untrusted (consider prompt-injection).
  4. Context cap — trim the input to the minimum needed (e.g. a recent window), not everything.
  5. Caching — cache responses for inputs that repeat or change slowly; serve cache hits cheaply.
  6. Rate-limiting — per-user/IP limits to stop abuse-driven spend.
  7. Cost logging — log tokens + cost per call so spend is observable and capped.
  8. Batch where possible — prefer scheduled/batched calls over per-keystroke calls for non-interactive features.

Done when

No key is in any client bundle; cache + rate-limit + cost-cap are verified by tests; a sample call logs its cost.

Token tactics

This skill IS token optimisation: caching + context caps + batching are the levers. Build the proxy once; every feature reuses it. Bake any static prompt templates as files (built once), not regenerated at runtime.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.