claude-code - 💡(How to fix) Fix [FEATURE] Support fallback model declaration in SKILL.md frontmatter [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45078Fetched 2026-04-09 08:13:48
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Timeline (top)
labeled ×2commented ×1

Fix Action

Fix / Workaround

We had no workaround other than manually removing the model field from every SKILL.md or waiting for the outage to resolve. A per-skill fallback would make plugins resilient to single-model outages without forcing all skills to always use the most expensive model.

If anyone has found other workarounds for this, I'd love to hear about them in the comments.

Code Example

---
name: my-skill
model: sonnet
---

---

---
name: my-skill
model: sonnet
fallback-model: opus
---

---

---
name: my-skill
model: [sonnet, opus]
---
RAW_BUFFERClick to expand / collapse

Problem

Skills support a model field in SKILL.md frontmatter to specify which model should handle the skill:

---
name: my-skill
model: sonnet
---

When the specified model becomes unavailable (e.g. during an outage), the skill fails entirely. There is currently no way to declare a fallback model at the skill level.

The existing --fallback-model CLI flag is:

  • Global (applies to the entire session, not per-skill)
  • Only triggers on overload, not on other failure scenarios like model unavailability (#8413)
  • Only available in print mode

This means skill authors have no mechanism to ensure their skills remain functional during model outages.

Proposed Solution

Allow a fallback-model (or model-fallback) field in SKILL.md frontmatter:

---
name: my-skill
model: sonnet
fallback-model: opus
---

When the primary model is unavailable (not just overloaded), the skill should automatically retry with the fallback model.

Alternatively, the model field could accept a list to express preference order:

---
name: my-skill
model: [sonnet, opus]
---

Use Case

We maintain a plugin with 10+ skills that all declare model: sonnet for cost efficiency. During a recent Sonnet outage, every skill broke simultaneously — even though the user's session was running on Opus and could handle the work just fine.

We had no workaround other than manually removing the model field from every SKILL.md or waiting for the outage to resolve. A per-skill fallback would make plugins resilient to single-model outages without forcing all skills to always use the most expensive model.

If anyone has found other workarounds for this, I'd love to hear about them in the comments.

Related Issues

  • #8413 — Fallback model only triggers on overload, not on other failure scenarios
  • #38537 — Safety classifier inherits unavailable model, breaking Bash commands
  • #11653 — Feature request for automatic model fallback when quota is exhausted

extent analysis

TL;DR

Implement a fallback-model field in SKILL.md frontmatter to specify an alternative model when the primary model is unavailable.

Guidance

  • Consider adding a fallback-model field to the SKILL.md frontmatter to declare a fallback model for each skill, ensuring they remain functional during model outages.
  • Alternatively, explore the possibility of accepting a list of models in the model field to express preference order, allowing the skill to automatically retry with the next available model.
  • Review related issues (#8413, #38537, #11653) to understand the broader context and potential implications of implementing a per-skill fallback mechanism.
  • Evaluate the trade-offs between using a global --fallback-model CLI flag versus a per-skill fallback model declaration, considering factors like flexibility, maintainability, and cost efficiency.

Example

---
name: my-skill
model: sonnet
fallback-model: opus
---

or

---
name: my-skill
model: [sonnet, opus]
---

Notes

The proposed solution aims to address the limitation of the current --fallback-model CLI flag, which is global and only triggers on overload. However, the implementation details and potential edge cases need to be carefully considered to ensure a robust and effective fallback mechanism.

Recommendation

Apply a workaround by adding a fallback-model field to the SKILL.md frontmatter, as this provides a more flexible and skill-specific solution compared to relying on the global --fallback-model CLI flag.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING