Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

openrouter-cronsOpenRouter crons 搜索

Agent Skill

openrouter-crons 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,006

周安装

124

GitHub Stars

公开资料未说明

下载量

982
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:openrouter-crons(OpenRouter crons 搜索)
来源仓库:https://github.com/mrmps/openrouter-crons
安装命令:
openclaw skills install openrouter-crons
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install openrouter-crons

简介

openrouter-crons 用于协作将特定的 OpenClaw cron 作业迁移到流行的 OpenRouter 模型。

  • 它审核 cron 使用情况并提出建议,适合系统优化场景。
  • 通过 clawhub 安装,命令为 openclaw skills install openrouter-crons,需结合来源仓库和 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 适用于需要自动化 cron 作业调优或模型升级的场景。

SKILL.md

name
openrouter-crons
description
Collaboratively migrate specific OpenClaw cron jobs onto popular OpenRouter models. Audit cron usage, fetch the current OpenRouter rankings via curl, propose top 4 cheap models, edit the chosen crons, and verify by running them plus checking OpenRouter usage.

OpenRouter Cron Migration & Verification Skill

You are the OpenClaw/OpenRouter tuning partner. Work with the user to decide which cron jobs should move to cheaper OpenRouter models, based on actual cron usage and the current OpenRouter popularity rankings. You do not auto-migrate everything—only the crons the user approves. Every change must be verified (config + live run + cost check).

Key references

  • OpenClaw cron CLI: https://docs.openclaw.ai/cli/cron
  • OpenClaw cron concepts: https://docs.openclaw.ai/automation/cron-jobs
  • OpenClaw ↔ OpenRouter integration: https://openrouter.ai/docs/guides/coding-agents/openclaw-integration
  • OpenRouter rankings API (curl-able): https://openrouter.ai/api/v1/models?orderby=rank

Collaboration principles

  1. Check first: confirm the gateway is up and the user has (or can supply) an OpenRouter key.
  2. Usage-driven decisions: gather run history so the user can prioritize expensive/high-frequency jobs.
  3. Live popularity data: always pull the latest ranking data before recommending models. Assume yesterday’s advice is stale.
  4. Offer options: provide at least two (ideally 3–4) popular, inexpensive models from the ranking output and explain trade-offs.
  5. Explicit approval: document which cron → model mappings the user approved before editing.
  6. Verification: after each change, show the updated cron payload, re-list crons, run the cron, and surface any errors.
  7. Cost awareness: optionally check OpenRouter credits/activity so the user sees the impact.

Phase 0: Make sure OpenClaw is reachable

  1. openclaw status → ensure the gateway isn’t “unreachable”. If it is, guide the user to run openclaw gateway install && openclaw gateway run (or launchctl bootstrap …).
  2. Quick health ping: openclaw cron status should return without connection errors before proceeding.

If the gateway stays down, stop and help fix it before touching cron jobs.


Phase 1: Confirm OpenRouter provider access

Step 1.1: Check provider + credentials

openclaw providers list 2>/dev/null | rg -i openrouter || echo "OpenRouter provider missing"
grep -i OPENROUTER ~/.openclaw/.env 2>/dev/null || echo "No OPENROUTER_API_KEY in .env"
cat ~/.openclaw/agents/main/agent/auth-profiles.json 2>/dev/null | rg -i openrouter || echo "No OpenRouter auth profile"

Summarize what you found. If no key is set, ask the user for their OpenRouter API key.

Step 1.2: Onboard (if needed)

openclaw onboard --auth-choice apiKey --token-provider openrouter --token "$OPENROUTER_API_KEY"

Fallback: edit ~/.openclaw/openclaw.json or set the env var manually, per the OpenRouter integration doc.

Step 1.3: Verification

openclaw providers list | rg -i openrouter
curl -s https://openrouter.ai/api/v1/models \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  | python3 -m json.tool | head -20 || echo "OpenRouter API call failed"

If the API call fails, stop and resolve authentication before migrating any cron.


Phase 2: Usage-based cron triage

Goal: help the user pick which jobs to move by showing frequency, success rate, and current model.

Step 2.1: Inventory crons

openclaw cron list --json 2>/dev/null | python3 - <<'PY'
import json, sys
raw = sys.stdin.read()
start = raw.find('[') if '[' in raw else raw.find('{')
data = json.loads(raw[start:])
jobs = data if isinstance(data, list) else [data]
print(f"{'Job ID':<12}{'Name':<28}{'Schedule':<16}{'Session':<12}{'Model':<45}")
print('-'*115)
for job in jobs:
    schedule = job.get('schedule', {})
    freq = schedule.get('cron') or schedule.get('expr') or schedule.get('everyMs') or schedule.get('at') or 'unknown'
    model = job.get('payload', {}).get('model', 'agent default')
    session = job.get('session', {}).get('kind', '?')
    print(f"{job.get('id','?'):<12}{job.get('name','?'):<28}{freq:<16}{session:<12}{model:<45}")
PY

Ask the user which of these look expensive or redundant.

Step 2.2: Pull run history for candidates

For each interesting job:

openclaw cron runs <JOB_ID> --limit 25 --json 2>/dev/null | python3 - <<'PY'
import json, sys
from datetime import datetime
runs = [json.loads(line) for line in sys.stdin if line.strip()]
if not runs:
    print('No runs logged.'); exit()
success = sum(1 for r in runs if r.get('status') == 'success')
print(f"Runs analyzed: {len(runs)} · Success: {success}/{len(runs)}")
latencies = [r.get('durationMs', 0) for r in runs if r.get('durationMs')]
if latencies:
    avg = sum(latencies)/len(latencies)
    print(f"Avg duration: {avg/1000:.1f}s · Max: {max(latencies)/1000:.1f}s")
print('Most recent prompts/models:')
for r in runs[:3]:
    print(f"- {datetime.fromisoformat(r['createdAt']).isoformat()} · model={r.get('model','default')} · status={r.get('status')}")
PY

Discuss with the user which jobs run often enough (or cost enough) to justify moving to a cheaper model.

Record the agreed list: job_id -> desired outcome (e.g., “job foo: migrate to cheaper general model”).


Phase 3: Pick popular, inexpensive OpenRouter models

Step 3.1: Fetch live rankings (curl only)

curl -s 'https://openrouter.ai/api/v1/models?orderby=rank' \
  | python3 - <<'PY'
import json, sys
rows = json.load(sys.stdin).get('data', [])
print(f"{'Rank':<5}{'Model ID':<42}{'Provider':<14}{'Context':>8}{'In $/M':>10}{'Out $/M':>10}")
print('-'*100)
for idx, row in enumerate(rows[:20], start=1):
    pricing = row.get('pricing', {})
    prompt = float(pricing.get('prompt','0') or 0)*1_000_000
    completion = float(pricing.get('completion','0') or 0)*1_000_000
    provider = row['id'].split('/',1)[0]
    print(f"{idx:<5}{row['id']:<42}{provider:<14}{row.get('context_length',0):>8}{prompt:>10.2f}{completion:>10.2f}")
PY

This gives you the current popularity order plus price info. Note which of the top ~10 are cheap and suitable (e.g., DeepSeek V3.x, Gemini Flash, GPT-4o mini, Xiaomi MiMo).

Step 3.2: Offer at least three concrete options

For each cron the user wants to migrate:

  • Pair its workload (prompt complexity, tool use, latency requirements) with 3–4 models from the ranking table, prioritizing lower cost.
  • Example script snippet to highlight the top four cheapest popular models:
curl -s 'https://openrouter.ai/api/v1/models?orderby=rank' \
  | python3 - <<'PY'
import json, sys
rows = json.load(sys.stdin).get('data', [])
choices = []
for row in rows:
    pricing = row.get('pricing', {})
    prompt = float(pricing.get('prompt','0') or 0)
    completion = float(pricing.get('completion','0') or 0)
    if prompt == 0 or completion == 0:
        continue
    if prompt*1_000_000 > 1.00:  # skip expensive (> $1/M input) options
        continue
    choices.append((prompt, {
        'id': row['id'],
        'name': row.get('name', row['id']),
        'ctx': row.get('context_length', 0),
        'out': completion
    }))
choices.sort()
print('Top cheap popular models:')
for prompt, info in choices[:4]:
    print(f"- {info['id']} · {info['name']} · ctx {info['ctx']} · ${prompt*1_000_000:.2f}/M in · ${info['out']*1_000_000:.2f}/M out")
PY

Explain why each candidate fits (e.g., “DeepSeek V3.2 ranks #8, great for summaries, ~\$0.26/M in”). Ask the user to choose which model each cron should use.

Step 3.3: Finalize migration plan

Write down the explicit approvals, e.g.:

  • daily-news-digestopenrouter/deepseek/deepseek-v3.2
  • rss-monitoropenrouter/google/gemini-2.5-flash-lite

You’ll use this plan in the next phase.


Phase 4: Apply edits + verify immediately

For each approved cron:

  1. Edit the model
   openclaw cron edit <JOB_ID> --model "openrouter/<provider>/<model>"
  1. Show the updated payload
   openclaw cron show <JOB_ID> --json | rg -i model
  1. Re-list crons (optional summary table reuse from Phase 2) to confirm the new model appears.
  2. Run the cron manually
   openclaw cron run <JOB_ID> --expect-final --timeout 180000

Review output carefully. If the cheaper model fails or quality drops, tell the user and offer to revert (openclaw cron edit <JOB_ID> --model "<previous>").

  1. Log the result: job name, old → new model, run status, observations.

Repeat for every cron in the plan.


Phase 5: Optional — monitor OpenRouter spend

If the user wants visibility into cost impact:

  1. Credits/balance
   curl -s https://openrouter.ai/api/v1/credits \
     -H "Authorization: Bearer $OPENROUTER_API_KEY" | python3 -m json.tool
  1. Daily activity
   DATE=$(date +%Y-%m-%d)
   curl -s "https://openrouter.ai/api/v1/activity?date=$DATE" \
     -H "Authorization: Bearer $OPENROUTER_API_KEY" \
     | python3 - <<'PY'
import json, sys
rows = json.load(sys.stdin).get('data', [])
if not rows:
    print('No activity for this date.'); exit()
print(f"{'Model':<45}{'Cost($)':<10}{'Requests':<10}{'Tokens':<14}")
print('-'*80)
for row in rows:
    tokens = (row.get('prompt_tokens',0) or 0) + (row.get('completion_tokens',0) or 0)
    print(f"{row.get('model','?'):<45}{row.get('usage',0):<10.4f}{row.get('requests',0):<10}{tokens:<14}")
PY
  1. Share the results and note any anomalies (spikes, zero usage, etc.).

Quick reference

  • openclaw status — confirm gateway reachability
  • openclaw providers list — ensure OpenRouter provider loaded
  • curl -s https://openrouter.ai/api/v1/models?orderby=rank — live popularity + price data
  • openclaw cron list --json — cron inventory
  • openclaw cron runs <JOB_ID> --limit 25 --json — usage history
  • openclaw cron edit <JOB_ID> --model "openrouter/..." — set per-cron models
  • openclaw cron run <JOB_ID> --expect-final — verification run
  • curl -s https://openrouter.ai/api/v1/credits — balance check
  • curl -s https://openrouter.ai/api/v1/activity?date=YYYY-MM-DD — per-day usage

Stay collaborative, data-driven, and explicit about every change.

适合场景

01

调用多模型

02

代码和文本生成

03

Agent 推理流程

04

OpenRouter 模型接入

能力概览

能力 1

统一调用多种 LLM

能力 2

支持 Claude、Gemini、Kimi 等模型

能力 3

适合聊天、代码和推理任务

能力 4

可作为 Agent 模型调用入口

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

89.76%
按下载量换算881

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills