Skip to content

agent-model

Agent model should be a known alias or valid model ID

From plugin
claudelint
1113 skills13 agents1 command1 hook
Install
$ npx -y skills add pdugan20/claudelint --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Agent model should be a known alias or valid model ID

Agent definition

agent-model.md
description: "Agent model should be a known alias or valid model ID"

agent-model

<RuleHeader description="Agent model should be a known alias or valid model ID" severity="warn" :fixable="false" :configurable="false" category="Agents" />

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

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

Model name with wrong casing

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

Correct

Valid model alias

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

Full model ID

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

Using inherit to match the parent model

---
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.

Related Rules

  • [`agent-name`](/rules/agents/agent-name)
  • [`agent-description`](/rules/agents/agent-description)

Resources

  • [Rule Implementation](https://github.com/pdugan20/claudelint/blob/main/src/rules/agents/agent-model.ts)
  • [Rule Tests](https://github.com/pdugan20/claudelint/blob/main/tests/rules/agents/agent-model.test.ts)

Version

Available since: v0.2.0

Read more
Ships withclaudelint

A linter for Claude Code projects. Validates CLAUDE.md files, skills, settings, hooks, MCP servers, plugins, and more.

Get the whole plugin, auto-invoked
Stats
11
Stars
0
Views
0
Forks
Active
Maintenance
TypeScript
Language
MIT
License
3d ago
Last commit
6mo ago
Created

Repo: pdugan20/claudelint