Skip to content
Back to skills

Model Escalation

ASecurity

Advisory model escalation based on task outcome tracking

  • 43 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 9, 2026
ai-agents

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add baekenough/oh-my-customcode --skill model-escalation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Model Escalation?

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

Security grade badge for Model Escalation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/baekenough-model-escalation/badge)](https://www.skillsdirectory.com/skills/baekenough-model-escalation)

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: model-escalation
description: Advisory model escalation based on task outcome tracking
scope: core
user-invocable: false
---

# Model Escalation Skill

Tracks task outcomes and advises model upgrades when failures are detected. **Advisory-only** — the orchestrator makes the final decision (R010).

## Escalation Path

```
haiku → sonnet → opus
```

## Trigger Conditions

| Condition | Action |
|-----------|--------|
| 2+ failures with same model for same agent type | Advise escalation |
| 3+ consecutive failures across any agent type | Advise global escalation |
| Sustained success after escalation | Advise de-escalation |

## Thresholds

| Parameter | Default | Description |
|-----------|---------|-------------|
| `failure_threshold` | 2 | Failures before escalation advisory |
| `consecutive_threshold` | 3 | Consecutive failures for global advisory |
| `cooldown_tasks` | 5 | Successes before de-escalation advisory |

## Cost Guard

- Advisory includes estimated cost multiplier
- De-escalation suggested after sustained success at higher tier
- Cost tracked per session via PPID-scoped temp file

## Architecture

```
PostToolUse (Task) → task-outcome-recorder.sh
  Records: agent_type, model, success/failure, error_summary
  Storage: /tmp/.claude-task-outcomes-$PPID (JSON lines, max 50)

PreToolUse (Task) → model-escalation-advisor.sh
  Reads outcomes → counts failures → advises escalation via stderr
  Advisory only — never blocks, never modifies tool input
```

## Advisory Format

```
--- [Model Escalation Advisory] ---
  Agent type: {agent_type}
  Current model: {current_model}
  Recent failures: {count}/{threshold}
  ⚡ Recommended: Escalate to {next_model}
  Cost impact: {multiplier} per task
---
```

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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.