Agent Skillsopen-gitagent/opengap › compute-ladder

compute-ladder

GitHub

定义AI模型调用层级与故障转移策略。基于基础设施健康(如429错误、超时)而非任务复杂度触发回退,优先使用本地免费模型,限制付费模型仅用于审计等特定场景,并包含成本监控机制。

examples/jason-my-claw-is-the-law-deebee-4567b4/skills/compute-ladder/SKILL.md open-gitagent/opengap

Trigger Scenarios

需要选择或切换AI模型时 模型服务出现连接超时或速率限制时 检查AI服务健康状态或API费用时

Install

npx skills add open-gitagent/opengap --skill compute-ladder -g -y
More Options

Non-standard path

npx skills add https://github.com/open-gitagent/opengap/tree/main/examples/jason-my-claw-is-the-law-deebee-4567b4/skills/compute-ladder -g -y

Use without installing

npx skills use open-gitagent/opengap@compute-ladder

指定 Agent (Claude Code)

npx skills add open-gitagent/opengap --skill compute-ladder -a claude-code -g -y

安装 repo 全部 skill

npx skills add open-gitagent/opengap --all -g -y

预览 repo 内 skill

npx skills add open-gitagent/opengap --list

SKILL.md

Frontmatter
{
    "name": "compute-ladder",
    "version": "1.0.0",
    "description": "Model selection by provider health, not task complexity. Tier 0 (local) handles most tasks. Paid models are break-glass only. Fallbacks activate on 429 or timeout — never on perceived task difficulty."
}

Compute Ladder

Tier Definitions

Tier 0 — Local (never dies, zero cost)
  ollama/qwen3-coder:latest    primary, MoE, 128 TPS, 64k ctx
  ollama/gpt-oss:20b           fallback, 32k ctx HARD LIMIT

Tier 1 — Fast Free Cloud (up to 2100 TPS)
  cerebras/qwen-3-235b-a22b-instruct-2507   235B MoE, fast free
  cerebras/llama3.1-8b                      8B, ultra-fast light tasks

Tier 2 — Free Cloud (normal latency)
  openrouter/z-ai/glm-4.5-air
  openrouter/qwen/qwen3-coder

Tier 3 — Free Cloud Deep Reasoning
  openrouter/nousresearch/hermes-3-llama-3.1-405b:free

Tier 4 — Break-Glass (paid, restricted use)
  openrouter/anthropic/claude-opus-4.6  [narco-check and audit ONLY]

Fallback Rules

DO fallback when:

  • HTTP 429 (rate limited)
  • Connection timeout (> 90s)
  • Stream death / incomplete response

DO NOT fallback when:

  • Task seems "complex" or "important"
  • You want "better" output quality
  • Previous attempt gave a poor answer

Use the primary model. Iterate. Fallback is for infrastructure failure, not preference.

Health Check

# Tier 0
curl -s localhost:11434/api/tags | python3 -c "import json,sys; d=json.load(sys.stdin); print('TIER-0 OK:', len(d['models']), 'models')"

# Tier 1
curl -s -o /dev/null -w "%{http_code}" \
  -H "Authorization: Bearer $CEREBRAS_API_KEY" \
  https://api.cerebras.ai/v1/models

# Tier 4
curl -s -o /dev/null -w "%{http_code}" \
  https://openrouter.ai/api/v1/models

Cost Guard

# Check today's OpenRouter spend
curl -s "https://openrouter.ai/api/v1/auth/key" \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  | python3 -c "
import json,sys
d=json.load(sys.stdin)['data']
print(f'today: \${d[\"usage_daily\"]:.2f} | week: \${d[\"usage_weekly\"]:.2f} | month: \${d[\"usage_monthly\"]:.2f}')
"

Daily > $5: flag to Ludo. Weekly > $50: flag immediately — tier-4 model is likely being over-used.

Version History

  • d7a8e2e Current 2026-07-25 08:12

Same Skill Collection

examples/full/skills/document-review/SKILL.md
examples/full/skills/regulatory-analysis/SKILL.md
examples/gitagent-helper/skills/create-agent/SKILL.md
examples/gitagent-helper/skills/export-agent/SKILL.md
examples/gitagent-helper/skills/get-started/SKILL.md
examples/gitagent-helper/skills/manage-skills/SKILL.md
examples/gitagent-helper/skills/run-agent/SKILL.md
examples/jason-my-claw-is-the-law-deebee-4567b4/skills/narco-check/SKILL.md
examples/jason-my-claw-is-the-law-deebee-4567b4/skills/packet-factory/SKILL.md
examples/llm-wiki/skills/wiki-ingest/SKILL.md
examples/llm-wiki/skills/wiki-lint/SKILL.md
examples/llm-wiki/skills/wiki-query/SKILL.md
examples/lyzr-agent/skills/research/SKILL.md
examples/nvidia-deep-researcher/skills/knowledge-retrieval/SKILL.md
examples/nvidia-deep-researcher/skills/paper-search/SKILL.md
examples/nvidia-deep-researcher/skills/web-search/SKILL.md
examples/standard/skills/code-review/SKILL.md

Metadata

Files
0
Version
d7a8e2e
Hash
63151cc4
Indexed
2026-07-25 08:12

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 21:41
浙ICP备14020137号-1 $mapa de visitantes$