feat(skills): add 3 operational SKILL.md manifests + AI Skills dashboard tab

- skills/omniroute-routing/SKILL.md: combos, 14 strategies, Auto-combo,
  simulate routing, MCP tools for routing
- skills/omniroute-compression/SKILL.md: RTK, Caveman, stacked mode,
  MCP accessibility filter, language packs
- skills/omniroute-monitoring/SKILL.md: health, circuit breakers,
  p50/p95/p99 metrics, quota, budget guard, MCP audit
- src/shared/constants/agentSkills.ts: single source of truth for all
  13 external agent skills (equivalent of 9route skills.js, adapted)
- dashboard/skills/page.tsx: new "AI Skills" tab with copy-button UX,
  GitHub link, NEW badge for 3 new skills
- skills/omniroute/SKILL.md + README.md: updated index with 13 skills
  (was 10); 5 skills exclusive to OmniRoute highlighted
This commit is contained in:
diegosouzapw
2026-05-15 03:53:22 -03:00
parent 133dd0026d
commit 5072b82e93
7 changed files with 687 additions and 30 deletions

View File

@@ -15,18 +15,21 @@ through `$OMNIROUTE_URL/v1/...` with `Authorization: Bearer $OMNIROUTE_KEY`.
## Skills index
| Capability | Manifest |
| ------------------------ | -------------------------------------------------------------- |
| Entry point + setup | [omniroute/SKILL.md](omniroute/SKILL.md) |
| Chat / code-gen | [omniroute-chat/SKILL.md](omniroute-chat/SKILL.md) |
| Image generation | [omniroute-image/SKILL.md](omniroute-image/SKILL.md) |
| Text-to-speech | [omniroute-tts/SKILL.md](omniroute-tts/SKILL.md) |
| Speech-to-text | [omniroute-stt/SKILL.md](omniroute-stt/SKILL.md) |
| Embeddings | [omniroute-embeddings/SKILL.md](omniroute-embeddings/SKILL.md) |
| Web search | [omniroute-web-search/SKILL.md](omniroute-web-search/SKILL.md) |
| Web fetch (URL→markdown) | [omniroute-web-fetch/SKILL.md](omniroute-web-fetch/SKILL.md) |
| MCP server | [omniroute-mcp/SKILL.md](omniroute-mcp/SKILL.md) |
| A2A protocol | [omniroute-a2a/SKILL.md](omniroute-a2a/SKILL.md) |
| Capability | Manifest |
| ------------------------ | ---------------------------------------------------------------- |
| Entry point + setup | [omniroute/SKILL.md](omniroute/SKILL.md) |
| Chat / code-gen | [omniroute-chat/SKILL.md](omniroute-chat/SKILL.md) |
| Image generation | [omniroute-image/SKILL.md](omniroute-image/SKILL.md) |
| Text-to-speech | [omniroute-tts/SKILL.md](omniroute-tts/SKILL.md) |
| Speech-to-text | [omniroute-stt/SKILL.md](omniroute-stt/SKILL.md) |
| Embeddings | [omniroute-embeddings/SKILL.md](omniroute-embeddings/SKILL.md) |
| Web search | [omniroute-web-search/SKILL.md](omniroute-web-search/SKILL.md) |
| Web fetch (URL→markdown) | [omniroute-web-fetch/SKILL.md](omniroute-web-fetch/SKILL.md) |
| MCP server (37 tools) | [omniroute-mcp/SKILL.md](omniroute-mcp/SKILL.md) |
| A2A protocol | [omniroute-a2a/SKILL.md](omniroute-a2a/SKILL.md) |
| Routing & combos | [omniroute-routing/SKILL.md](omniroute-routing/SKILL.md) |
| Token compression | [omniroute-compression/SKILL.md](omniroute-compression/SKILL.md) |
| Monitoring & health | [omniroute-monitoring/SKILL.md](omniroute-monitoring/SKILL.md) |
## Format
@@ -34,9 +37,12 @@ Each `SKILL.md` follows the Anthropic skill manifest spec with YAML frontmatter
(`name`, `description`) and a self-contained markdown body: setup, endpoints,
examples, and error codes. Assume the reader is an agent with no prior context.
## Additional skills
## Skills exclusive to OmniRoute
OmniRoute includes two protocol-level skills not found in other routers:
These 5 skills have no equivalent in other AI routers:
- `omniroute-mcp` exposes 37 MCP tools (memory, skills, providers, routing) over SSE/stdio/HTTP
- `omniroute-a2a` exposes 5 A2A skills (smart-routing, quota, discovery, cost, health)
- `omniroute-mcp` — 37 MCP tools (memory, skills, providers, routing, compression) over SSE/stdio/HTTP
- `omniroute-a2a` — 5 A2A skills (smart-routing, quota, discovery, cost, health) via JSON-RPC 2.0
- `omniroute-routing` — create/configure combos, 14 strategies, Auto-combo scoring, fallback chains
- `omniroute-compression` — RTK + Caveman + stacked mode + MCP accessibility filter (6090% token savings)
- `omniroute-monitoring` — circuit breakers, p50/p95/p99 latency, budget guard, MCP audit log

View File

@@ -0,0 +1,131 @@
---
name: omniroute-compression
description: Configure OmniRoute token compression to save 6090% of context tokens. Covers RTK (command/tool output), Caveman (prose), stacked mode (both), and the MCP accessibility-tree filter (browser snapshots). Use when the user wants to reduce costs, fit long sessions into context windows, or speed up AI responses.
---
# OmniRoute — Compression
Requires `OMNIROUTE_URL` and `OMNIROUTE_KEY`. See [entry-point SKILL](https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute/SKILL.md) for setup.
## Overview
OmniRoute compresses token payloads before forwarding to providers. No code changes required — set it once, it applies to all requests transparently.
| Engine | Best for | Typical savings |
| ------------------------- | ------------------------------------ | --------------- |
| RTK | Terminal / build / test / git output | 6090% |
| Caveman | Human prose, chat history | 46% input |
| Stacked (`rtk → caveman`) | Mixed coding sessions | 7895% |
| MCP accessibility filter | Browser/accessibility tool results | 6080% |
## Get current settings
```bash
curl $OMNIROUTE_URL/api/settings/compression \
-H "Authorization: Bearer $OMNIROUTE_KEY"
```
## Enable RTK (best for coding agents)
```bash
curl -X PUT $OMNIROUTE_URL/api/settings/compression \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{ "mode": "rtk", "enabled": true }'
```
## Enable stacked mode (maximum savings)
```bash
curl -X PUT $OMNIROUTE_URL/api/settings/compression \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "stacked",
"enabled": true,
"stackedPipeline": ["rtk", "caveman"]
}'
```
## Enable Caveman (prose / chat)
```bash
curl -X PUT $OMNIROUTE_URL/api/settings/compression \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{ "mode": "standard", "enabled": true }'
```
Caveman intensities: `lite` (safe), `standard` (balanced), `aggressive` (long sessions), `ultra` (context recovery).
## Preview compression before enabling
```bash
curl -X POST $OMNIROUTE_URL/api/compression/preview \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "rtk",
"text": "$ npm test\n> jest\n\nPASS src/a.test.ts (2.1s)\nPASS src/b.test.ts (1.8s)\n..."
}'
```
Response includes `compressed`, `original_length`, `compressed_length`, `savings_pct`.
## MCP accessibility-tree filter (browser agent use)
When OmniRoute is used with browser/Playwright MCP tools, it automatically compresses verbose accessibility-tree tool results. Enabled by default; configure thresholds:
```bash
curl -X PUT $OMNIROUTE_URL/api/settings/compression \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{
"mcpAccessibility": {
"enabled": true,
"collapseThreshold": 30,
"maxTextChars": 50000
}
}'
```
`collapseThreshold`: collapse sibling lines when ≥ N repeats (default 30).
`maxTextChars`: hard truncate after N chars with navigation hint (default 50000).
## Language packs (Caveman)
Caveman supports language-aware rules for pt-BR, es, de, fr, ja:
```bash
curl -X PUT $OMNIROUTE_URL/api/settings/compression \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "standard",
"cavemanConfig": {
"language": "pt-BR",
"autoDetectLanguage": true
}
}'
```
## Via MCP
```
omniroute_compression_status → current settings + savings analytics
omniroute_compression_configure → update mode/threshold/language
omniroute_set_compression_engine → switch engine at runtime
```
## Disable compression
```bash
curl -X PUT $OMNIROUTE_URL/api/settings/compression \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-d '{ "enabled": false }'
```
## Errors
- `400 invalid mode` → use `off`, `lite`, `standard`, `aggressive`, `ultra`, `rtk`, or `stacked`
- `400 invalid stackedPipeline` → array must contain valid engine ids (`rtk`, `caveman`)

View File

@@ -0,0 +1,114 @@
---
name: omniroute-monitoring
description: Monitor OmniRoute system health, provider circuit breakers, per-provider latency (p50/p95/p99), quota usage, and set budget guards. Use when the user wants to check if the system is healthy, debug slow providers, manage spend limits, or set up oncall-style monitoring.
---
# OmniRoute — Monitoring & Health
Requires `OMNIROUTE_URL` and `OMNIROUTE_KEY`. See [entry-point SKILL](https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute/SKILL.md) for setup.
## System health
```bash
curl $OMNIROUTE_URL/api/health \
-H "Authorization: Bearer $OMNIROUTE_KEY"
```
Returns: uptime, memory, active connections, circuit breaker states, rate limit status, cache stats.
Unauthenticated quick check:
```bash
curl $OMNIROUTE_URL/api/health
# → {"ok":true}
```
## Provider circuit breakers
Circuit breakers prevent traffic from hitting failing providers.
States: `CLOSED` (normal), `OPEN` (blocked), `HALF_OPEN` (probe mode — auto-recovers).
```bash
curl $OMNIROUTE_URL/api/monitoring/health \
-H "Authorization: Bearer $OMNIROUTE_KEY"
```
Response includes `circuitBreakers` array with per-provider state and `resetAt` timestamp.
## Per-provider metrics (p50/p95/p99)
```bash
curl $OMNIROUTE_URL/api/providers/metrics \
-H "Authorization: Bearer $OMNIROUTE_KEY"
```
Response shape per provider:
```json
{
"provider": "anthropic",
"requests": 1247,
"successRate": 0.994,
"latency": { "p50": 820, "p95": 2100, "p99": 3800 },
"circuitState": "CLOSED",
"tokensUsed": 2847000
}
```
## Via MCP (if OmniRoute is your MCP server)
```
omniroute_get_health → full system health snapshot
omniroute_get_provider_metrics → p50/p95/p99 + circuit state per provider
omniroute_get_session_snapshot → cost, tokens, errors for current session
omniroute_check_quota → quota balance + percent remaining + reset time
omniroute_db_health_check → diagnose + auto-repair database drift
```
## Quota check
```bash
curl $OMNIROUTE_URL/api/quota \
-H "Authorization: Bearer $OMNIROUTE_KEY"
```
Returns used/total tokens and requests per provider/account, with `resetAt` timestamps.
## Budget guard (spend limit)
Set a session spending limit that degrades or blocks requests when hit:
```bash
curl -X POST $OMNIROUTE_URL/api/budget/guard \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{
"limitUsd": 5.00,
"action": "degrade",
"degradeTo": "openai/gpt-4o-mini"
}'
```
`action` options:
- `degrade` — switch to a cheaper model when limit is hit
- `block` — return 429 when limit is hit
- `alert` — continue but add `X-Budget-Warning` header
## MCP audit log
OmniRoute logs every MCP tool call to `mcp_audit` table. Query via API:
```bash
curl "$OMNIROUTE_URL/api/mcp/status" \
-H "Authorization: Bearer $OMNIROUTE_KEY"
```
Returns: server status, heartbeat, recent audit activity summary.
## Errors
- `503` on health endpoint → OmniRoute is starting up; retry in 5s
- Circuit breaker `OPEN` → provider is temporarily blocked; check `resetAt` to know when it auto-recovers
- `429 budget_exceeded` → budget guard limit reached; raise limit or wait for reset

View File

@@ -0,0 +1,129 @@
---
name: omniroute-routing
description: Create and configure OmniRoute routing combos, choose from 14 strategies (priority, weighted, auto, round-robin, cost-optimized, etc.), activate Auto-combo 9-factor scoring, and set up fallback chains. Use when the user wants to configure multi-provider routing, load balancing, or cost-optimized model selection.
---
# OmniRoute — Routing & Combos
Requires `OMNIROUTE_URL` and `OMNIROUTE_KEY`. See [entry-point SKILL](https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute/SKILL.md) for setup.
## What is a combo?
A combo is a named group of providers/models with a routing strategy. All requests through a combo are automatically distributed, failed-over, and load-balanced — the caller uses a single model ID like `my-combo`.
## List existing combos
```bash
curl $OMNIROUTE_URL/api/combos \
-H "Authorization: Bearer $OMNIROUTE_KEY"
```
Response includes `id`, `name`, `strategy`, `enabled`, and per-target stats.
## Create a combo
```bash
curl -X POST $OMNIROUTE_URL/api/combos \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-combo",
"strategy": "priority",
"targets": [
{ "provider": "anthropic", "model": "claude-opus-4-7", "weight": 1 },
{ "provider": "openai", "model": "gpt-4o", "weight": 1 }
]
}'
```
## 14 routing strategies
| Strategy | Description |
| ------------------- | -------------------------------------------------- |
| `priority` | Always use target[0]; fall back on error |
| `weighted` | Distribute by weight percentage |
| `round-robin` | Rotate targets in order |
| `fill-first` | Fill quota of target[0] before spilling |
| `least-used` | Route to target with fewest active requests |
| `cost-optimized` | Pick cheapest target for the token estimate |
| `auto` | 9-factor scoring: cost + latency + quota + circuit |
| `random` | Uniform random selection |
| `strict-random` | Random without repeating until all used |
| `p2c` | Power-of-2-choices: sample 2, pick better |
| `reset-aware` | Prefer targets near quota reset time |
| `lkgp` | Last-known-good-provider sticky routing |
| `context-optimized` | Pick best model for context length |
| `context-relay` | Chain models for very long contexts |
## Auto-combo (recommended for production)
Auto-combo scores each candidate on 9 factors every request:
```bash
curl -X POST $OMNIROUTE_URL/api/combos \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "prod-auto",
"strategy": "auto",
"targets": [
{ "provider": "anthropic", "model": "claude-sonnet-4-6" },
{ "provider": "openai", "model": "gpt-4o-mini" },
{ "provider": "google", "model": "gemini-2.0-flash" }
]
}'
```
Then call it with:
```bash
curl -X POST $OMNIROUTE_URL/v1/chat/completions \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "prod-auto", "messages": [{ "role": "user", "content": "Hello" }] }'
```
## Activate / deactivate a combo
```bash
# Activate
curl -X PUT $OMNIROUTE_URL/api/combos/{id}/toggle \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-d '{ "enabled": true }'
```
## Get combo metrics
```bash
curl $OMNIROUTE_URL/api/combos/{id}/metrics \
-H "Authorization: Bearer $OMNIROUTE_KEY"
```
Returns p50/p95/p99 latency, success rate, cost, and per-target breakdown.
## Simulate routing (dry run)
```bash
curl -X POST $OMNIROUTE_URL/api/routing/simulate \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{ "comboId": "{id}", "messages": [{ "role": "user", "content": "test" }] }'
```
Returns which provider would be selected and why — no actual API call is made.
## Via MCP (if OmniRoute is your MCP server)
```
omniroute_list_combos → list all combos
omniroute_switch_combo → enable/disable a combo
omniroute_set_routing_strategy → change strategy at runtime
omniroute_simulate_route → dry-run routing decision
omniroute_best_combo_for_task → get recommendation by task type
```
## Errors
- `404 combo not found` → check `id` from `/api/combos`
- `400 invalid strategy` → use one of the 14 strategies above
- `409 name conflict` → combo name already exists

View File

@@ -34,17 +34,20 @@ Use `data[].id` as `model` field in requests. Combos appear with `owned_by:"comb
## Capability skills
| Capability | Raw URL |
| ---------------- | -------------------------------------------------------------------------------------------------- |
| Chat / code-gen | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-chat/SKILL.md |
| Image generation | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-image/SKILL.md |
| Text-to-speech | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-tts/SKILL.md |
| Speech-to-text | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-stt/SKILL.md |
| Embeddings | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-embeddings/SKILL.md |
| Web search | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-web-search/SKILL.md |
| Web fetch | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-web-fetch/SKILL.md |
| MCP server | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-mcp/SKILL.md |
| A2A protocol | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-a2a/SKILL.md |
| Capability | Raw URL |
| --------------------- | --------------------------------------------------------------------------------------------------- |
| Chat / code-gen | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-chat/SKILL.md |
| Image generation | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-image/SKILL.md |
| Text-to-speech | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-tts/SKILL.md |
| Speech-to-text | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-stt/SKILL.md |
| Embeddings | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-embeddings/SKILL.md |
| Web search | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-web-search/SKILL.md |
| Web fetch | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-web-fetch/SKILL.md |
| MCP server (37 tools) | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-mcp/SKILL.md |
| A2A protocol | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-a2a/SKILL.md |
| Routing & combos | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-routing/SKILL.md |
| Token compression | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-compression/SKILL.md |
| Monitoring & health | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-monitoring/SKILL.md |
## Errors