[FEATURE] Allow CLAUDE.md or prompt headers to set /model and /effort programmatically so automated skill workflows don't require manual pre-selection.
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Summary
When building automated workflows with Claude Code — skills, agents, scheduled tasks — the model and effort level have to be set manually via /model and /effort before each session. There's no way to specify them declaratively in a prompt, SKILL.md, or CLAUDE.md so they're applied automatically.
Desired behavior
A structured header or CLAUDE.md directive that CC reads at session start and applies before executing. Something like:
cc_model: claude-sonnet-4-5
cc_effort: high
Or equivalently, a CLAUDE.md directive:
default_model: claude-opus-4-5
default_effort: xhigh
Individual prompts could override the CLAUDE.md default, giving a hierarchy: prompt-level → CLAUDE.md → manual selection.
Why it matters
Every automated skill has an implicit "correct" model and effort tier based on its complexity — a deterministic file operation should run at Sonnet/medium, a novel architecture build should run at Opus/max. That knowledge currently lives outside the prompt, requiring a separate manual step every run.
If the person running the session forgets or picks the wrong setting, output quality silently degrades with no warning. Embedding defaults in the prompt or CLAUDE.md makes each skill self-contained and removes a coordination step from every single run. For anyone building reusable skill libraries or running scheduled workflows, this is a meaningful reliability improvement.
Not asking for
Auto-escalation or dynamic model switching mid-session — just static declaration of intended defaults so the workflow is self-describing.
Proposed Solution
Add support for a cc_model and cc_effort directive in CLAUDE.md that Claude Code reads at session start and applies as defaults. Example:
default_model: claude-sonnet-4-5
default_effort: high
Individual prompts could override via a frontmatter header:
---
cc_model: claude-opus-4-5
cc_effort: max
---
Override hierarchy: prompt frontmatter → CLAUDE.md default → manual /model / /effort selection (current behavior, unchanged as fallback).
Alternative Solutions
- A dedicated
--modeland--effortflag when launching a CC session from the terminal, so it can be scripted externally even if not embedded in the prompt itself - A per-directory
.claude-sessionconfig file (separate fromCLAUDE.md) that sets session defaults for that workspace
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
- Skill libraries — A reusable
SKILL.mdprompt that performs complex multi-step analysis should be able to declarecc_effort: xhighso it always runs correctly regardless of who runs it or what their current session default is.
- Scheduled / automated runs — A workflow triggered on a schedule (e.g., Windows Task Scheduler, cron) has no human in the loop to set model/effort before the session starts. Declarative defaults make unattended runs reliable.
- Team environments — When multiple people run the same prompts, manual model/effort selection is an invisible variable that produces inconsistent output quality. Embedding it in the prompt removes that variable entirely.
- Cost control — A
CLAUDE.mddefault ofcc_effort: mediumfor routine tasks, with individual high-stakes prompts explicitly overriding tomax, gives teams predictable cost behavior without relying on everyone remembering to downgrade manually.
Additional Context
_No response_