eta

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ETA

任务耗时估算(ETA)

<purpose> Provides realistic time estimates for coding tasks before work begins. Users often underestimate task complexity. This skill analyzes codebase scope, categorizes task complexity, identifies risk factors, and calculates estimates based on measured Claude Code performance baselines. Prevents surprise delays and enables better planning. </purpose>
<purpose> 为开始工作前的编码任务提供符合实际的时间估算。用户常常会低估任务复杂度。本Skill会分析代码库范围、对任务复杂度进行分类、识别风险因素,并基于已测算的Claude Code性能基准计算估算值。避免意外延误,助力更好的规划。 </purpose>

Instructions

操作步骤

Step 1: Gather Task Context

步骤1:收集任务上下文

When triggered, collect:
  • Task description from the user
  • Path to relevant codebase (default: current directory)
  • Number of files likely in scope (if known)
触发本Skill时,收集以下信息:
  • 用户提供的任务描述
  • 相关代码库路径(默认:当前目录)
  • 可能涉及的文件数量(若已知)

Step 2: Run Estimation

步骤2:执行估算

bash
python scripts/estimate_task.py --task "<task_description>" --path "<codebase_path>"
Optional flags:
  • --files <n>
    : Override estimated files in scope
  • --json
    : Output structured JSON for programmatic use
bash
python scripts/estimate_task.py --task "<task_description>" --path "<codebase_path>"
可选参数:
  • --files <n>
    :覆盖默认的估算涉及文件数量
  • --json
    :输出结构化JSON格式,供程序化调用

Step 3: Present Estimate

步骤3:展示估算结果

Return the formatted estimate showing:
  • Task category (trivial/simple/medium/complex/major)
  • Scope analysis (files, lines, test coverage)
  • Time range (low-high estimate)
  • Breakdown by phase (analysis, implementation, testing, verification)
  • Risk factors with explanations
  • Checkpoint recommendations for long tasks
返回格式化的估算内容,包含:
  • 任务类别(微小/简单/中等/复杂/重大)
  • 范围分析(文件、代码行数、测试覆盖率)
  • 时间范围(最低-最高估算值)
  • 按阶段细分(分析、实现、测试、验证)
  • 带说明的风险因素
  • 针对长周期任务的检查点建议

Step 4: Adjust Based on Feedback

步骤4:根据反馈调整

If user provides more context:
  • Re-run with
    --files
    override if scope is clearer
  • Adjust category interpretation based on domain knowledge
若用户提供更多上下文:
  • 若范围更清晰,使用
    --files
    参数重新运行估算
  • 根据领域知识调整任务类别的判定

NEVER

禁止操作

  • Start a complex task without providing an estimate first
  • Give single-point estimates (always provide ranges)
  • Ignore risk factors when they're detected
  • Skip the estimate for tasks over 15 minutes
  • Promise exact completion times
  • 在未先提供估算的情况下启动复杂任务
  • 给出单点估算值(始终提供时间范围)
  • 检测到风险因素时却忽略它们
  • 跳过耗时超过15分钟的任务的估算流程
  • 承诺确切的完成时间

ALWAYS

必须执行

  • Run the estimate script before non-trivial tasks
  • Show the breakdown so users understand where time goes
  • Flag risk factors visibly with explanations
  • Recommend checkpoints for tasks over 30 minutes
  • Update estimates if scope changes mid-task
  • 在启动重要任务前运行估算脚本
  • 展示估算细分,让用户了解时间分配
  • 醒目标记风险因素并附上说明
  • 为耗时超过30分钟的任务建议检查点
  • 若任务范围在执行中发生变化,更新估算值

Examples

示例

Example 1: User asks about task duration

示例1:用户询问任务耗时

Input: "How long will it take to add user authentication?"
Workflow:
  1. Run
    scripts/estimate_task.py --task "Add user authentication" --path .
  2. Output shows:
    • Category: Complex
    • Estimated time: 24-53 minutes
    • Risk factors: High-risk changes, External dependencies
    • Recommendation: Break into phases with commits between each
输入:“添加用户认证需要多久?”
流程:
  1. 运行
    scripts/estimate_task.py --task "Add user authentication" --path .
  2. 输出内容如下:
    • 类别:复杂
    • 估算时间:24-53分钟
    • 风险因素:高风险变更、外部依赖
    • 建议:拆分为多个阶段,每个阶段完成后提交代码

Example 2: Before starting a feature

示例2:启动新功能前

Input: "Add a dark mode toggle to settings"
Workflow:
  1. Detect this is a non-trivial task (feature keyword)
  2. Run
    scripts/estimate_task.py --task "Add dark mode toggle to settings" --path ./src
  3. Present estimate: 10-22 minutes (Medium complexity)
  4. Begin implementation with checkpoint plan
输入:“为设置页面添加深色模式切换按钮”
流程:
  1. 识别出这是一项重要任务(含功能关键词)
  2. 运行
    scripts/estimate_task.py --task "Add dark mode toggle to settings" --path ./src
  3. 展示估算结果:10-22分钟(中等复杂度)
  4. 按照检查点计划开始实现

Example 3: Quick fix request

示例3:快速修复请求

Input: "Fix the typo in the README"
Workflow:
  1. Detect trivial task (typo keyword)
  2. Run quick estimate: 3-6 minutes
  3. Proceed immediately (no detailed breakdown needed for trivial tasks)
输入:“修复README中的拼写错误”
流程:
  1. 识别出这是一项微小任务(含拼写错误关键词)
  2. 快速估算:3-6分钟
  3. 立即开始处理(微小任务无需详细细分)",