costfence

Costfence Lite — Security skill for Claude Code

Security community

Free lightweight security & API cost guardrails (.cursorrules & CLAUDE.md) for Cursor, Claude Code, Bolt & Lovable builders.

How to install Costfence Lite

This entry records only its repository, not the path inside it, so there is no exact command to give. Open costfence/costfence-lite and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Costfence Lite does

Free lightweight security & API cost guardrails (.cursorrules & CLAUDE.md) for Cursor, Claude Code, Bolt & Lovable builders.

Alternatives in Security

  • Free Code — The free build of Claude Code 8.1k ★
  • ThinkWatch — Self-hosted AI API and MCP gateway for organizations: SSO and RBAC, per-user identity for MCP tool calls, PII 817 ★
  • Claude Bootstrap — Opinionated project initialization with security-first guardrails, spec-driven atomic todos, LLM testing patte 536 ★

README

CostFence Lite 🛡️

**Free Security & API Cost Guardrails for AI-Built Apps (Cursor, Claude Code, Bolt, Lovable)**

AI coding tools optimize for *working* code—not *safe* or *cost-capped* code. Drop this lightweight ruleset into your `.cursorrules` or `CLAUDE.md` to prevent common production disasters.


Quick Free `.cursorrules` Snippet (Copy & Paste)

# CostFence Lite Guardrails
1. NEVER hardcode API keys, tokens, or secrets in client-side code or prefix private keys with NEXT_PUBLIC_ / VITE_.
2. ALWAYS enforce Supabase Row-Level Security (RLS) and server-side session checks on every database query and API route.
3. ALWAYS add explicit `max_tokens`, timeouts, and rate-limiting on LLM / AI API calls to prevent infinite retry loops and runaway bills.
4. STOP AND ASK: Never modify existing files for security or refactoring without listing the exact vulnerabilities first and waiting for the user to reply `APPROVED`.

Want the Full Pre-Launch Protection? 🚀

Upgrade to **CostFence Pro Kit ($15)** for the complete drop-in system:

  • Full Master Guardrails: Complete .cursor/rules/costfence.mdc, .cursorrules, and CLAUDE.md rulesets.
  • Interactive Flight Check Dashboard (costfence-flight-check.html): Local bilingual (EN / TR) pre-launch panel with live security score tracking.
  • 15 Surgical XML Audit Prompts: Deep scans for Auth/IDOR flaws, RLS gaps, webhooks, and runaway token loops (with strict APPROVED safety lock).
  • Client Handover Report & 5-Minute Checklist: Ready-to-use audit summary for freelancers & agencies (EN & TR).

👉 **[Get CostFence Pro Kit on Gumroad ($15)](https://gumroad.com)**