logo

Just make your own usage brake for Cloudflare

Posted by es0teric5662 |7 hours ago |2 comments

_wire_ 13 minutes ago

Can't AI solve this?

es0teric5662 7 hours ago

They give you the parts necessary and people seem to be requesting it.

It's just a Worker with a cron trigger. Every tick it samples Cloudflare usage metrics, evaluates your budget rules over rolling windows, and may write reversible brake state that your app checks before starting or producing more work. It can send a webhook notification to Discord or anywhere.

The repo also includes a skill to adapt the reference Worker to your app's architecture and risk tolerance. It is an interactive skill: you must choose the scope and thresholds of the brake, while the agent audits the architecture and wires it into your code.

Intended to be forked, extended, and improved. Hopefully a native feature from Cloudflare gets shipped one day.