Skip to content

agent-model

Agent model should be a known alias or valid model ID

Warning

Rule Details

This rule checks that the model field in agent markdown frontmatter is either a known alias (sonnet, opus, haiku, inherit) or a full Claude model ID (e.g. claude-opus-4-6). The inherit option tells the agent to use the parent conversation model. Unrecognized values produce a warning since Claude Code accepts arbitrary model strings.

Incorrect

Non-Claude model name

yaml
---
name: code-review
description: Reviews code for quality
model: gpt-4
---

Model name with wrong casing

yaml
---
name: code-review
description: Reviews code for quality
model: Sonnet
---

Correct

Valid model alias

yaml
---
name: code-review
description: Reviews code for quality
model: sonnet
---

Full model ID

yaml
---
name: code-review
description: Reviews code for quality
model: claude-opus-4-6
---

Using inherit to match the parent model

yaml
---
name: code-review
description: Reviews code for quality
model: inherit
---

How To Fix

Set the model field to a known alias (sonnet, opus, haiku, inherit) or a full Claude model ID (e.g. claude-opus-4-6).

Options

This rule does not have any configuration options.

Resources

Version

Available since: v0.2.0