Developers building Claude Code skills often encounter a common challenge: all skills, by default, run on the fastest and most expensive model, even for simple tasks like "open the dashboard" or "run git status." However, within Claude Code's underlying design, there are 15 configurable frontmatter fields, several of which are crucial for optimizing runtime behavior, enhancing efficiency, and reducing costs.
These key fields are not merely metadata; they directly influence how a skill is executed:
Model Selection (model): Assigning the Right "Brain" to Your Skill
This is one of the most critical fields. By setting model: haiku, developers can explicitly direct a skill to be executed by Claude Code's Haiku model. This means Claude will call an entirely different model for that specific skill, rather than merely switching to a "cheaper mode." For mechanical tasks such as opening dashboards, committing code, or filling forms, the Haiku model is ideal. For tasks requiring stronger reasoning capabilities, like writing dev articles, reviewing code, or synthesizing research, the Sonnet model should be employed. Orchestrators that spawn subagents and require maximum reasoning should be left on the default model.
An audit of 42 skills revealed that setting 17 to Haiku (mechanical tasks), 15 to Sonnet (writing/reasoning), and leaving 10 on default (complex orchestration) allowed every session to run the correct tool for the job, significantly improving resource utilization.
Invocation Conditions (when_to_use): Precisely Controlling Auto-Invocation
The content of this field is directly appended to your skill's description in the system prompt. It is what Claude reads when deciding whether to auto-invoke your skill. Skipping this field means Claude will guess based on the description alone, potentially leading to a "deploy" skill being mistakenly triggered when a user mentions "push this to my notes." This field is capped at 250 characters, emphasizing the need for precision over comprehensiveness.
Conditional Loading (paths): Protecting Your Context Window
Skills with a paths: field are not loaded at session start. Instead, they reside in a conditionalSkills map and only activate when Claude interacts with files matching the specified patterns. For instance, a Solidity auditing skill with 2,000 tokens of prompt has no business occupying your context window when you are working on a React application. Any skill without a paths: field will consume context resources in every session, whether needed or not.
Thinking Depth (effort): Controlling Skill Reasoning Level
This field controls how much thinking Claude applies before responding. It can be set to low, medium, high, or an integer. This allows developers to adjust the "thinking" resource consumption based on the complexity of the skill.
By effectively utilizing these frontmatter fields, developers can engineer more refined, efficient, and cost-effective AI agent workflows for Claude Code skills.