一个插件,将最新的云成本意识注入编码代理,防止因计量服务产生意外账单。

Stars

160

7 天增长

+72

Fork 数

2

开放 Issue

0

开源协议

MIT

最近更新

2026-07-19

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它通过将成本规则版本化在仓库中并注入到 11 多个代理的会话中,解决了 LLM 冻结知识与快速变化的云定价之间的差距。

适合谁使用

  • 使用 AI 编码代理(Claude Code、Copilot 等)的开发者
  • 通过代理部署并面临意外账单的非技术用户
  • 在代理驱动的工作流中管理云成本的团队

典型使用场景

  • 防止导致按请求计费的无限循环(例如 Cloudflare KV 写入)
  • 避免遗忘的临时资源(如 Neon 数据库、E2B 沙盒)产生费用
  • 在部署到 Vercel 或 GitHub Actions 等服务前检查免费层配额

项目优势

  • 以单一规则集和单一真实来源支持 11 多个代理平台
  • 经过研究和交叉验证的定价数据(22 个服务组,2025-07),具有漂移检测
  • 非阻塞——提供上下文而不停止代理的命令
  • 两级提醒强度(安静/正常/严格)以适应用户对提醒的容忍度

使用前须知

  • 仅限于正常使用的成本意识,不处理凭据泄露或欺诈
  • 需要针对每个代理平台手动安装(npm 包加特定主机设置)
  • 编辑 AGENTS.md 后必须重新生成静态规则副本以保持同步

README 快速开始

frugal

Cloud cost awareness for coding agents.

English | 简体中文


Agents deploy to Vercel, spin up Neon databases, run E2B sandboxes, push commits that trigger GitHub Actions — all metered — and non-technical users only find out on the monthly bill. frugal makes the agent spend consciously: surface free-tier numbers and fail-open vs hard-pause on first touch, optional usage digs, one-line notice before lasting paid resources, and tear down of what it left running. It never blocks the command.

Works across Claude Code, Codex, GitHub Copilot, Qoder, Gemini CLI, OpenCode, pi, Cursor, Windsurf, Cline, and Kiro — one ruleset, one source of truth.

Why a plugin, not “just tell the model to be careful”?

LLMs ship with frozen training-cut knowledge of free tiers, defaults, and “how this cloud bills.” Cloud pricing and fail-open traps move every quarter (Workflows per-step billing, Spend Management notify-only, free-tier cliffs). The model still “remembers” last year’s story.

frugal keeps the numbers and tripwires in the repo — versioned, researched, testable — and injects them into the agent loop on each session / pre-CLI hit. Update the package (or pull the repo) and the loop gets current billing, not whatever the weights last memorized.

How it saves you money

Two layers, both context-cheap (~1.7 KB of rules per session + at most 5 full reminders per day — after that, new services still get a numbers-only line — never blocking), with intensity levels like a volume knob:

LevelSession + injectWhen to use
quietFree-tier / key quota numbers onlyHate noise but still want numbers
normal (default)Numbers + one trap; dig optionalMost people
strict+ real-bill context; confirm scary actionsNon-technical / vibe-coding
  • Session rules (SessionStart): one short line on first touch, announce lasting paid resources, kill ephemeral things, escalate only for scary spend.
  • Just-in-time data (PreToolUse): vercel → short Vercel line, wrangler r2 → R2, git push with workflows → Actions — once per provider per session. Horror-dollar amounts stay in strict (and the skill), not every deploy.

This is scoped to normal usage that quietly runs up a bill — wrong tier, a forgotten resource, a loop that hits a paid meter, a config default nobody checke

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

react
精选
react GitHub avatar

react

React is a JavaScript library for building user interfaces with declarative, component-based, and cross-platform design.

Web 开发前端框架
246,741
tandpfun
精选
tandpfun GitHub avatar

wardrobe

A GPT‑image powered app that extracts individual garment cutouts from photos, organizes them into a digital wardrobe, and generates modeled outfit previews.

JavaScript
1,570
mshumer
精选
mshumer GitHub avatar

Claude-of-Duty

A browser-based first-person shooter built entirely with procedural generation and orchestrated AI agents, featuring 55k lines of Three.js/WebGL2 code and no art assets.

AI 与机器学习AI 智能体
1,234