agentleFS
jiten-singh-shahijiten-singh-shahi/salesforce-claude-code/.cursor/skills/model-route/SKILL.md

model-route

Skill15 starsChanged 7 months agoMITView on GitHub

Use when selecting Claude model tier for Salesforce development tasks. Recommend haiku, sonnet, or opus based on Apex complexity, deploy risk, and budget.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before starting a task where model choice significantly affects quality or cost

    line 13
  2. Distinctive:

    When deciding between haiku, sonnet, and opus for a Salesforce development task

    line 14
  3. Distinctive:

    When the user wants cost-conscious model selection guidance

    line 15
  4. Distinctive:

    When routing sub-agent work to the appropriate model tier

    line 16
  5. Very specific:

    Use opus when the task requires deep understanding of Salesforce architecture, security implications, or governor limit analysis across …

    line 41
  6. Very specific:

    Use haiku when the task is deterministic, well-scoped, and unlikely to have subtle correctness issues.

    line 51
  7. Very specific:

    Use sonnet (default) for standard development work that requires understanding but follows well-known patterns.

    line 61

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Model Route — Task-to-Model Tier Recommendation

Recommend the best model tier for the current task by complexity and budget.

When to Use

  • Before starting a task where model choice significantly affects quality or cost
  • When deciding between haiku, sonnet, and opus for a Salesforce development task
  • When the user wants cost-conscious model selection guidance
  • When routing sub-agent work to the appropriate model tier

Usage

/model-route [task-description] [--budget low|med|high]

Routing Heuristic

  • haiku: deterministic, low-risk mechanical changes
  • sonnet: default for implementation and refactors
  • opus: architecture, deep review, ambiguous requirements

Model names (haiku, sonnet, opus) refer to the current Claude model mapped to that tier in your Claude Code configuration.

Output Format

  • recommended model
  • confidence level
  • why this model fits
  • fallback model if first attempt fails

Salesforce Routing Examples

Opus — Complex Reasoning Tasks

Use opus when the task requires deep understanding of Salesforce architecture, security implications, or governor limit analysis across multiple execution paths.

TaskWhy Opus
Governor limit audit across trigger/flow/batch chainsMust trace cumulative DML/SOQL across async boundaries, understand order of execution, and reason about worst-case heap/CPU scenarios
Security review of @RestResource or with sharing/without sharing decisionsRequires nuanced reasoning about record access, CRUD/FLS enforcement, SOQL injection vectors, and org-wide defaults
Architecture review for large-scale data model changesMust evaluate cascade effects on triggers, flows, validation rules, sharing rules, and downstream integrations

Haiku — Mechanical / Low-Risk Tasks

Use haiku when the task is deterministic, well-scoped, and unlikely to have subtle correctness issues.

TaskWhy Haiku
Formatting LWC components (fix indentation, add missing @api decorators)Purely mechanical — no logic changes, just style compliance
Simple Apex fixes (rename a variable, fix a typo in a label, add a missing null check)Single-line or few-line changes with obvious correctness
Adding <meta.xml> boilerplate or updating apiVersion across componentsRepetitive, pattern-based edits with no ambiguity

Sonnet — Balanced Implementation Tasks

Use sonnet (default) for standard development work that requires understanding but follows well-known patterns.

TaskWhy Sonnet
Code review of an Apex trigger handler or service classNeeds to understand patterns and spot issues, but follows standard review criteria
Generating Apex test classes with @TestSetup, mocking, and assertionsRequires understanding the class under test, but test generation follows repeatable patterns
Implementing a new LWC component with wire adapters and error handlingStandard implementation work — needs context awareness but not deep architectural reasoning

Arguments

  • [task-description] optional free-text
  • --budget low|med|high optional

Examples

/model-route Review the sharing model for the new Patient__c object hierarchy
/model-route Fix the CSS alignment on the accountDashboard LWC --budget low
/model-route Generate test coverage for OpportunityTriggerHandler
/model-route Audit all SOQL queries in force-app for governor limit risks --budget high

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.