Communitygithub.com

ECC Tools 成本審計

以證據為基礎的 ECC Tools 燃燒與計費審計工作流程。用於調查 ECC Tools 儲存庫中失控的 PR 建立、配額繞過、高級模型洩漏、重複作業或 GitHub App 成本飆升等情況。

ECC Tools 成本審計 是什麼?

此技能專為審計 ECC Tools GitHub App 的成本燃燒問題而設計。當使用者懷疑應用程式因 PR 氾濫、配額規避、高級模型不當使用或重複作業導致成本失控時,此技能提供了一個結構化的調查與修復框架。 技能要求審計者透過追蹤 Webhook 路由器、佇列生產者/消費者、PR 建立路徑、用量預留與計費路徑,從原始碼層面定位根因。其適用於 ECC-Tools 儲存庫,並建議搭配 autonomous-loops、agentic-engineering、security-review 等其他 ECC 原生技能以強化多步驟審計、請求路徑追蹤、安全驗證等能力。 工作流程從凍結儲存庫範圍、追蹤請求入口開始,接著分析工作者及其副作用,並重點審計 PR 倍增、配額繞過、高級模型洩漏、重試燃燒等高信號燃燒路徑。修復順序應以燃燒影響為優先,先停止自動 PR 倍增,再處理配額繞過、高級模型洩漏等問題。最後需透過最小化驗證步驟確認修復效果,並明確區分本地變更、驗證、推送或部署等最終狀態。 此技能也特別指出五種高信號失敗模式,包括單一佇列類型觸發所有事件、入隊後才進行用量保留、免費層級仍可使用高級路徑、應用程式產生的分支重新觸發 Webhook、以及創建持久化狀態前的昂貴工作,這些模式有助於快速定位成本燃燒的根本原因。

相容平台✓Claude Code~Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/ecc-tools-cost-audit

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

ECC Tools 成本審計 是做什麼的?

當使用者懷疑 ECC Tools GitHub App 正在燃燒成本、過度建立 PR、繞過使用限制,或將免費使用者路由至高級分析路徑時,請使用此技能。

這是一個針對同名 ECC-Tools 儲存庫的專注操作工作流程。它不是一個通用的計費技能,也不是一個涵蓋整個儲存庫的程式碼審查。

技能堆疊

請在相關情況下將以下 ECC 原生技能引入工作流程:

  • autonomous-loops:用於跨越 Webhook、佇列、計費和重試的有界多步驟審計
  • agentic-engineering:用於將請求路徑追蹤到離散、可證明的小單元
  • customer-billing-ops:當需要清晰分離儲存庫行為與客戶影響計算時
  • search-first:在發明輔助工具或重新實作儲存庫本地實用程式之前
  • security-review:當涉及身份驗證、使用閘門、權限或機密時
  • verification-loop:用於證明重新執行安全性和精確的修復後狀態
  • tdd-workflow:當修復需要在 Worker、路由器或計費路徑中增加回歸測試覆蓋時

使用時機

  • 使用者提及 ECC Tools 燃燒率、PR 遞迴、過度建立的 PR、使用限制繞過或高級模型洩漏
  • 任務位於同名的 ECC-Tools 儲存庫中,且依賴於 Webhook 處理器、佇列工作者、用量保留、PR 建立邏輯或付費閘門執行
  • 客戶報告指出應用程式建立了過多的 PR、計費不正確,或在沒有產生可用結果的情況下分析了程式碼

範圍護欄

  • 僅在 ECC-Tools 儲存庫中工作,而非 everything-claude-code
  • 除非使用者明確要求修復,否則從唯讀開始
  • 在追蹤分析燃燒時,不要修改不相關的計費、結帳或 UI 流程
  • 將應用程式生成的分支和應用程式生成的 PR 視為紅旗遞迴路徑,直到證明其為良性
  • 明確分離三件事:
    • 儲存庫端燃燒根因
    • 面向客戶的計費影響
    • 需要列入待辦事項跟進的產品或權限缺口

工作流程

1. 凍結儲存庫範圍

  • 切換到同名的 ECC-Tools 儲存庫
  • 首先檢查分支和本機差異
  • 確定審計的精確表面:
    • Webhook 路由器
    • 佇列生產者
    • 佇列消費者
    • PR 建立路徑
    • 用量保留 / 計費路徑
    • 模型路由路徑

2. 在理論化之前追蹤入口

  • 首先檢查 src/index.* 或主要進入點
  • 在建議修復之前,繪製每個入隊路徑
  • 確認哪些 GitHub 事件共享同一佇列類型
  • 確認 push、pull_request、synchronize、comment 或手動重新執行事件是否可以匯聚到同一條昂貴的路徑

3. 追蹤工作者及其副作用

  • 檢查負責分析的佇列消費者或排程工作者
  • 確認排隊的分析是否總是導致:
    • PR 建立
    • 分支建立
    • 檔案更新
    • 高級模型呼叫
    • 用量增加
  • 如果分析可以花費 Token 然後在輸出持久化之前失敗,則將其分類為「無輸出燃燒」

4. 審計高信號燃燒路徑

PR 倍增

  • 檢查 PR 輔助工具和分支命名
  • 檢查去重、同步事件處理和現有 PR 重用
  • 如果應用程式生成的分支可以重新進入分析,則將其視為優先級為 0 的遞迴風險

配額繞過

  • 檢查配額檢查的位置,以及用量保留或增加的位置
  • 如果配額在入隊之前檢查,但用量僅在 Worker 內部收取,則將並發的前門通過視為真實的競態條件

高級模型洩漏

  • 檢查模型選擇、層級分支和提供者路由
  • 在存在高級金鑰的情況下,驗證免費或受限使用者是否仍然可以命中高級分析器

重試燃燒

  • 檢查重試迴圈、重複的佇列工作和確定性失敗重新執行
  • 如果相同的非暫時性錯誤可以重複花費分析資源,請在進行品質改進之前先修復此問題

5. 按燃燒順序修復

如果使用者要求程式碼變更,請按以下順序優先修復:

  1. 停止自動 PR 倍增
  2. 停止配額繞過
  3. 停止高級模型洩漏
  4. 停止重複作業 Fanout 和無意義的重試
  5. 關閉重新執行/更新安全漏洞

除非同一個根因明確跨越了多個檔案,否則將範圍限制在一到三個直接修復範圍內。

6. 以最小證明步驟驗證

  • 僅重新執行涵蓋已變更路徑的目標測試或整合片段
  • 驗證燃燒路徑現在是否:
    • 被封鎖
    • 被去重
    • 降級為更便宜的分析
    • 或被提前拒絕
  • 精確說明最終狀態:
    • 已在本地變更
    • 已在本地驗證
    • 已推送
    • 已部署
    • 仍被封鎖

高信號失敗模式

1. 所有觸發器共用一個佇列類型

如果 push、PR sync 和手動審計都入隊同一個作業,且 Worker 總是建立一個 PR,那麼分析就等於 PR 垃圾郵件。

2. 入隊後的用量保留

如果在入口處檢查用量,但僅在 Worker 中增加用量,則並發請求可以全部通過閘門並超出配額。

3. 免費層級走高級路徑

如果存在金鑰時,免費排隊的作業仍然可以路由至 Anthropic 或其他高級提供者,即使使用者從未看到高級結果,這也是真實的支出洩漏。

4. 應用程式生成的分支重新進入 Webhook

如果 pull_request.synchronize、分支推送或評論觸發的執行在應用程式擁有的分支上觸發,則應用程式可以遞迴地分析自己的輸出。

5. 持久化安全性之前的昂貴工作

如果系統可以花費 Token 然後在 PR 建立、檔案更新或分支衝突時失敗,則它是在燃燒成本而不產生價值。

陷阱

  • 不要從廣泛的儲存庫漫遊開始;先確定 Webhook -> 佇列 -> Worker 的流程
  • 不要將客戶計費推斷與基於程式碼的產品事實混合
  • 在最高燃燒路徑被控制之前,不要修復價值較低的品質問題
  • 在執行狹義的證明步驟之前,不要聲稱燃燒已被修復
  • 除非使用者要求,否則不要推送或部署
  • 如果已經有正在進行中的不相關儲存庫本地更改,不要觸碰它們

驗證

  • 根因必須引用準確的檔案路徑和程式碼區域
  • 修復按燃燒影響排序,而非程式碼整潔度
  • 證明命令必須被命名
  • 最終狀態必須區分本地變更、驗證、推送和部署

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

相關技能