尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證A credit guard for paid generation APIs: runs start as requests with model and credit cost, a typed approval naming the count arms a single run, the guard relocks after, and a ledger records cost per run.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗A credit guard for paid generation APIs: runs start as requests with model and credit cost, a typed approval naming the count arms a single run, the guard relocks after, and a ledger records cost per run.
python demo.py
Runs the whole gate end to end against the real hooks and CLI, in a temp state dir. Tests: python -m unittest discover -s tests.
Python 3.8+. No dependencies.
python -m creditguard request "intro clip" --model video-x --settings "720p 5s" --cost 12.approve hook (UserPromptSubmit) reads the prompt; typing go 12 approves the pending request that costs exactly 12 credits. A wrong count approves nothing, and a negated phrase ("do not go 12") is ignored.python -m creditguard arm <id> --quoted <cost> arms exactly one run, and refuses if the quoted price differs from what was approved.guard hook (PreToolUse) denies any generate command unless an arm is live, and spends the arm on first use, so a retry is locked again. Arms expire after 5 minutes.python -m creditguard ledger prints the total. Optional CREDIT_BUDGET caps cumulative spend.Hook wiring for Claude Code (settings.json):
{"hooks": {
"UserPromptSubmit": [{"hooks": [{"type": "command", "command": "python creditguard/hooks.py approve"}]}],
"PreToolUse": [{"matcher": "Bash", "hooks": [{"type": "command", "command": "python creditguard/hooks.py guard"}]}]
}}
Set CREDIT_GENERATE_PATTERN to a regex matching your tool's paid command.
Measured from the author's own use of the guard around a paid video and image service, totals only, no prompts or project names. Requests were filed 20 to 23 Oct 2026.
| Measure | Count |
|---|---|
| Requests filed | 32 |
| Approved by a typed approval | 20 |
| Never approved | 12 |
| Approved requests that ran | 13 |
| Approved requests that never ran | 7 |
MIT. See LICENSE.
Built with Claude Code. More: https://made-by-asking.pages.dev/showcase/studio-credit-guard/