All loops
Claude CodeMedium 13 min· claude-opus-4-1
API rate budget
Suggests caching when a route's external call count drifts up.
Read the full Claude Code build guide →NOT DEPLOYEDNOT DEPLOYED
0166ms
Trigger
POST https://hooks.claudeloops.run/api-rate-budget · event=slack.slash:/loop
021066ms
Agent
claude-opus-4-1 · in 1566 tok · out 713 tok
03316ms
Tools
github-mcp/github:pulls.create → 200 OK · 326ms
0456ms
Verify
schema check · zod v3 passed
0586ms
Output
changelog updated · v1.4.2
0646ms
Notify
audit log written · runbook link attached
SUCCESS
0%
0 runs
P50
0ms
median
P95
0ms
tail
AVG COST
—
per run
LAST OK
never
—
LAST FAIL
never
none
Latency · last 30 runs0 samples
no runs yet
Latest output · what your users see
Openacme/infra #1986
feat: add /health endpoint
5 files+106-36
- ✓ Ran full test suite → 218 passed, 0 failed (12.3s)
- ✓ Coverage delta: +0.4% on `src/lib/*`
- ✓ No breaking changes detected in public API
// press Test to run once · Watch live to keep streaming · Deploy to make it real
The problem
perf,observability
The outcome
External API spend creeps as features land.
Ingredients & skills
Secrets
- ANTHROPIC_API_KEY
- GITHUB_TOKEN
Providers
- Anthropic
- GitHub
MCP servers
- github-mcp
#claude-code#github#automation
How it works
Suggests caching when a route's external call count drifts up.
Step 1
1 — Create the locker
Locker `api-rate-budget` holds the GitHub token (repo scope) and the Anthropic key.
bash
locker create api-rate-budget
locker set $_ ANTHROPIC_API_KEY=sk-ant-...
locker set $_ GITHUB_TOKEN=ghp_...Step 2
2 — Wire the GitHub event
Subscribe to the relevant GitHub webhook through the `github-mcp` server. Claude only sees the event payload and the files it requests.
Step 3
3 — Ship the agent
Single TS file in `agents/`. Stateless; the locker is bound at runtime so no env editing for new repos.
One-line deploy
The button above runs the same command with your saved config. This is the raw CLI form.
bash
npx claudeloops deploy api-rate-budget https://hooks.claudeloops.run/api-rate-budget
Related loops
Claude Code
PR review → risk-tagged comment
Claude Code reviews every PR and posts a risk-banded comment with suggested tests.
Claude Code
Test synthesizer for changed files
Claude Code writes Vitest + Playwright tests for every file touched in a PR.
Claude Code
Schema diff → migrations bot
Claude Code reads schema.prisma diffs, writes safe SQL with rollback notes.