Skip to content
Back to skills

Add Top Openrouter Models

ASecurity

Sync OpenRouter models used by OpenClaw into this installation's config. Fetches the OpenClaw app leaderboard from OpenRouter, verifies model IDs against the API catalog, and adds missing models with correct specs and aliases. Use when asked to "sync openrouter models", "add missing models", "update openrouter config", or "check openrouter models".

  • 14 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 7, 2026
toolspythonbashreactapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill add-top-openrouter-models --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Add Top Openrouter Models?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Add Top Openrouter Models
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-add-top-openrouter-models/badge)](https://www.skillsdirectory.com/skills/modbender-add-top-openrouter-models)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: add-top-openrouter-models
description: Sync OpenRouter models used by OpenClaw into this installation's config. Fetches the OpenClaw app leaderboard from OpenRouter, verifies model IDs against the API catalog, and adds missing models with correct specs and aliases. Use when asked to "sync openrouter models", "add missing models", "update openrouter config", or "check openrouter models".
---

# OpenRouter Model Sync

Syncs models from the OpenClaw app leaderboard on OpenRouter into this openclaw installation.

## Workflow

### Step 1: Extract Model IDs via Browser

The app page is a React SPA -- must use browser tool, not web_fetch.

1. Open `https://openrouter.ai/apps?url=https%3A%2F%2Fopenclaw.ai%2F` in browser (profile: openclaw)
2. Take a snapshot, find and click "Show more" to expand full leaderboard
3. Take another snapshot after expansion
4. Extract model IDs from link hrefs -- they follow the pattern `/<provider>/<model-name>` (e.g. `/moonshotai/kimi-k2.5`)
5. Filter out non-model links (navigation links to `/docs`, `/chat`, `/rankings`, `/pricing`, `/enterprise`, `/about`, etc.)
6. Collect the model IDs (without leading slash)

### Step 2: Run Sync Script

```bash
python3 scripts/sync-openrouter-models.py --models "model/id1,model/id2,..."
```

Options:
- `--dry-run` — preview changes without writing files
- `--json` — machine-readable JSON output on stdout
- stdin also accepted (one model ID per line)

The script:
1. Verifies each ID against the OpenRouter `/api/v1/models` catalog (rejects unverified)
2. Converts verified models to openclaw format (context window, pricing, reasoning, modalities)
3. Creates timestamped backups before writing any config file
4. Adds missing models to `~/.openclaw/agents/<agent>/agent/models.json` and `~/.openclaw/openclaw.json`
5. Generates aliases (from `references/aliases.json` or auto-derived)

### Step 3: Restart Gateway

```bash
openclaw gateway restart
```

## Environment Variables

| Variable | Purpose | Default |
|----------|---------|---------|
| `OPENCLAW_DIR` | Override openclaw directory | `~/.openclaw` |
| `OPENCLAW_AGENT_DIR` | Override agent directory | auto-detected |
| `OPENROUTER_API_KEY` | API key (falls back to config) | from config |

## Maintaining Aliases

Edit `references/aliases.json` to add or update short aliases for model IDs. The script loads this file at runtime. If missing, built-in defaults are used.

## What Gets Updated

- `~/.openclaw/agents/main/agent/models.json` — openrouter provider models
- `~/.openclaw/openclaw.json` — openrouter provider models + aliases
- Backups created as `<file>.bak.<timestamp>` before each write

## Limitations

- Additive only (does not remove delisted models)
- Reasoning detection uses heuristics (architecture field + known model families)
- Requires browser tool for Step 1 (app page is JS-rendered)

Files in this skill

  • CHANGELOG.md457 B
  • README.md2.1 KB
  • SKILL.md2.9 KB
  • references/aliases.json722 B
  • scripts/sync-openrouter-models.py12.9 KB
  • skill.yml502 B
  • tests/test-triggers.json486 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…