The workflow of Cost Router can be divided into three stages:
First Stage: Task Analysis
When a user makes a request, the skill first analyzes the nature of the task. Is it fixing a simple bug? Or refactoring an entire module? Does it need to understand business logic? Or is it purely technical implementation? This classification directly affects subsequent decisions.
Second Stage: Cost Modeling
Based on the task analysis results, the skill estimates the cost of different execution plans. This includes estimating the number of files to read, lines of code, expected output length, and token consumption corresponding to different model choices.
Third Stage: Strategy Recommendation
Synthesizing task characteristics and cost models, the skill provides specific execution suggestions. For example: "It is recommended to use a lightweight model for preliminary analysis, expected to consume 500 tokens; after confirming the plan, use the flagship model to generate code, which is expected to save 60% of costs."