一键导入
cost-aware-llm-pipeline
Use when building LLM-powered features - model routing by task complexity, budget tracking, retry logic, and prompt caching
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when building LLM-powered features - model routing by task complexity, budget tracking, retry logic, and prompt caching
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Debug frontend vanilla JS issues - console errors, rendering bugs, SPA navigation, WebSocket
Automates the process of setting up the first admin user or adding new admins via the bootstrap endpoint. Includes a Python script for easy execution.
Push to remote and wait for CI to pass. If CI fails, read logs, fix bugs, and re-push. Repeat until green.
Use when building or debugging LangGraph multi-agent systems - eval-first execution, task decomposition, model routing by complexity, and cost discipline
Use when AI agent modifies API routes or backend logic - catch systematic blind spots where the same model writes and reviews code
Use when making or recording significant architectural decisions - capture context, alternatives, and rationale as structured ADRs
| name | cost-aware-llm-pipeline |
| description | Use when building LLM-powered features - model routing by task complexity, budget tracking, retry logic, and prompt caching |
MODEL_CHEAP = "claude-3-haiku-20240307"
MODEL_STANDARD = "claude-sonnet-4-20250514"
MODEL_POWERFUL = "claude-opus-4-20250514"
def route_model(task: dict) -> str:
if task["complexity"] == "simple":
return MODEL_CHEAP
elif task["complexity"] == "standard":
return MODEL_STANDARD
return MODEL_POWERFUL
class BudgetTracker:
def __init__(self, daily_limit_usd: float):
self.daily_limit = daily_limit_usd
self.spent_today = 0.0
def check_budget(self, estimated_cost: float) -> bool:
return self.spent_today + estimated_cost <= self.daily_limit