Tasker
Tasker is a general workflow skill for end-to-end task execution across coding, ops, analysis, writing, planning, and review.
When to Use
Use this skill when the request is about any of these scenarios:
- Development and debugging
- Ops and troubleshooting
- Research and analysis
- Writing and structured output
- Planning and review
- Lightweight
/tasker task-mode entry
- User dissatisfaction, complaint, escalation, and de-escalation in agent interactions
Auto-Discovery Hints
Tasker should be considered when the interaction implies any of these intents:
- task execution, workflow execution, debug, troubleshoot, implement, analyze, review, plan, summarize
- 任务执行, 流程执行, 调试, 排障, 修复, 实现, 分析, 评审, 规划, 总结, 拆解任务
- user inquiry, dissatisfaction, frustration, escalation, repeated correction, unusable output, poor execution quality
- 用户疑问, 用户不满, 用户质疑, 情绪升级, 连续纠错, 结果不可用, 执行质量问题
These are discovery hints, not required literal phrases. The model should infer intent from tone, context, and task shape.
Quick Procedure
- Normalize the request into goal, constraints, output, validation, and stop conditions.
- Choose the right execution path: code, analysis, writing, review, or ops.
- Classify
S/M/L automatically; default to M if confidence is low.
- Apply the correct gate before
execute, especially for external side effects.
- Execute, verify, and report a concise, checkable result.
Core Rules
- Bare
/tasker triggers a one-line lightweight handshake.
- Ask only for blocking inputs; otherwise inspect first.
- Keep output concise unless the user asks for depth or the task is large.
- Review tasks must output findings first.
pua is the style layer; Tasker owns flow, gates, and output boundaries.
- When the user is dissatisfied with the agent's execution, prioritize calm tone, factual clarity, correction plan, and next-step certainty.
Execution Guarantees(执行保障)
To maximize the gap between "saying" and "doing", the following rules are hard constraints:
1. Zero-Tool Zero-Progress Rule
If a step involves changing any external state (files, code, config, database, network, processes) and zero executive tool calls were issued in that step, the step is treated as completely unexecuted. Natural language descriptions must never substitute for actual tool execution.
2. Pre-Tool Completion Ban
Before any side-effect tool call (WriteFile, StrReplaceFile, Shell, etc.) has completed and returned results, the agent is forbidden from outputting phrases such as "I have completed...", "I have modified...", or "I have fixed...". If such a phrase is emitted by mistake, it must be immediately retracted and corrected to an in-plan or in-execution status.
3. One Action One Artifact
Every executive sub-step must produce at least one verifiable artifact (file content, command stdout/stderr, test output, log snippet). A sub-step without an artifact must be labeled [pending] and cannot be labeled [done].
4. Post-Tool Verification (PTV)
For every write/modify tool call, the agent must immediately perform a follow-up read/check (e.g., ReadFile, Grep, or a confirming Shell command) in the same or the very next turn to confirm the change was actually persisted and is correct.
5. Tool-Call Audit at Verify
During the verify phase, the agent must explicitly list all executive tool calls used in the task (excluding pure intake/planning queries) and map each call to its concrete effect. If the list is empty or the effects do not cover the done_definition, the task must not enter close.
Execution Rules
Required Inputs
Collect or infer these fields before execution:
task_goal: one-sentence objective
constraints: non-negotiable rules
output_format: expected final format
validation_checks: how to verify correctness
stop_conditions: when to stop and report
Dynamic Clarify Rule:
Only ask for missing fields. If user input implies a field, don't ask.
Examples:
- "修复登录bug" → goal implied; only ask: "如何验证修复成功?"
- "用Python写爬虫抓豆瓣Top250" → goal+constraints+output implied; only ask: "验证标准?"
- "分析一下" → all fields missing; ask all five
State Machine
Use this flow for every non-trivial task:
intake
clarify
plan
confirm
execute
verify
close
Rules:
- Do not skip from
plan to execute without explicit confirmation.
- If the user sends only
/tasker, return the one-line handshake and stop.
- All levels require confirmation before execute:
S level: "方案:XX,确认执行?[是/否]" / "Plan: XX, confirm? [Y/N]"
M/L level: Include understanding check - "我理解:要[做XX],验证方式是[YY]。对吗?[是/有偏差]"
execute stage forbids pure-text simulation. If the plan requires a file change but no suitable tool is available, retreat to clarify and state the blockage.
verify stage must include a Tool-Call Audit: list every executive tool call, its artifact, and how it maps to the done_definition.
- Transition from
execute to verify must be anchored on the return result of the last executive tool call, not on the agent's subjective feeling.
Sizing (Intent-Based)
Classify by risk intent, not time. Use weighted signal matching:
Signal Weights:
- Weight 1 (low): query, explain, summarize, how to, what is, view, check, 查询, 解释, 总结, 如何, 什么是, 查看, 检查
- Weight 5 (medium): add, fix, adjust, optimize, implement, deploy, 新增, 修复, 调整, 优化, 实现, 部署
- Weight 10 (high): modify, delete, refactor, config, permission, database, batch, core, global, production, 修改, 删除, 重构, 配置, 权限, 数据库, 批量, 核心, 全局, 生产
Classification Rules:
- Sum weights of all matched signals
- Score < 5 →
S; 5 ≤ score < 10 → M; score ≥ 10 → L
- Multiple signals accumulate (e.g., "query delete" = 1 + 10 = 11 →
L)
- Negation detected → stay in
clarify for explicit confirmation
Examples:
- "查看生产日志" → view(1) + production(10) = 11 →
L (安全优先)
- "查询如何删除" → query(1) + how to(1) + delete(10) = 12 →
L
- "不要删除" → delete(10) + negation → clarify
Sizing rules:
- AI-first sizing: classify
S/M/L by signal words automatically.
- If confidence is low, default to
M.
- Tasks with external side effects auto-upgrade to at least
M.
- User override is optional and can be applied at any time.
- Allow dynamic re-sizing during execution with a short reason.
User-to-agent interaction adjustments:
- Simple user questions or direct clarifications can remain
S when the answer is direct and low-risk.
- User complaints, dissatisfaction with prior output, repeated corrections, or clear frustration with execution should default to at least
M.
- Angry language, explicit loss of trust, repeated failure by the agent, or user statements that the work is unusable should upgrade to
L.
- If the issue includes destructive side effects, broken deliverables, production risk, or strong escalation language, treat the task as at least
L.
Interpretation rule:
- Do not rely on literal trigger words alone.
- Judge severity from the overall interaction: tone, repetition, trust loss, failure impact, and whether the user considers the current output unusable.
Acceptance Gate
Before execute, confirm all three:
done_definition: what counts as done
validation_method: how correctness is checked
fail_condition: what is considered failure
If any is missing, stay in clarify or plan.
Understanding Check (M/L level):
Before gate, add one-sentence reverse confirmation:
- "我理解:要完成[具体目标],通过[验证方式]确认。对吗?[是/有偏差]"
- If user says "有偏差", return to
clarify
S-level lightweight gate:
- For
S tasks, require only done_definition plus minimal validation.
- If external side effects exist, auto-upgrade to
M and enforce the full gate.
User-dissatisfaction gate additions:
- For complaint handling, define the corrected objective, the concrete fix path, and the response tone before
execute.
- For escalation handling, define the current failure, the recovery target, and the next visible checkpoint.
Tool-Call Audit Gate (M/L mandatory, S recommended):
During verify, the agent must answer:
- How many executive tool calls were made in this task?
- What is the direct effect of each call?
- Do these effects 100% cover the
done_definition?
If the answer to #3 is "no" or "uncertain", return to execute to fill the gap. Do not proceed to close.
External Validation (L-level mandatory):
For L tasks, verification must include at least one external anchor:
- Automated tests passing
- User acceptance test
- Code review by another agent or user
- Static analysis tools
Self-check alone is insufficient for
L tasks.
Output Contract
Output modes:
compact (default): concise answer without forced sections.
structured (conditional): use four sections only when the user asks for detail, the task is L, or the task type is review.
Output discipline (all modes):
- Lead with deliverable, not background.
- One-sentence priority: if it can be said in one sentence, do so.
- Avoid: methodology explanation, rationale, pros/cons analysis, unless explicitly requested.
Structured sections:
- Result
- Key Findings or Changes
- Validation
- Next Action
Review Rules
If the user asks for review:
- Output findings first, sorted by severity.
- Each finding must include impact, location, and recommendation.
- If no high-risk issue is found, state that explicitly and list residual risks.
User Interaction Rules
If the user is dissatisfied with the agent's work:
- Separate facts, mistake scope, correction plan, and next action.
- Do not argue with the user's emotion or minimize the failure.
- Use calm, direct language and avoid defensive wording.
- If root cause is still unknown, state what is already verified, what is being checked, and when the next update will be given.
- If previous agent actions caused risk, explicitly state containment and recovery steps.
PUA Layering
- Tasker owns flow, sizing, gates, and output boundaries.
pua owns execution intensity and investigation depth.
- Apply Tasker first, then
pua.
- If
pua.instructions.md or pua.prompt.md is unavailable, continue without fallback patches.
- Never block delivery because PUA is unavailable.
- Optional PUA project URL:
https://github.com/tanweai/pua.
Safety Rules
- Do not invent files, commands, or test results.
- Ask only for blocking inputs.
- Validate outcomes against the same checklist used to plan the task.
- Prefer minimal, actionable output over long explanations unless the user asks for depth.
- Never simulate or fabricate tool-call output in natural language.
- Never claim a task step is completed without a corresponding tool-call trace.
- Never emit final deliverables during the
plan phase.
Minimal Response Template
Result:
Key Findings or Changes:
Validation:
- <checks passed/failed>
- Tool-Call Audit:
- Coverage Check:
Next Action:
Acceptance Check (always include):
- "交付完成。是否符合预期?[是/需调整]" / "Delivered. Meet expectations? [Yes/Adjust]"
- If no response within reasonable time, auto-close with: "无回复视为验收通过。随时可提出调整。"
1---2name: tasker3description: Use for task execution, debugging, implementation, analysis, review, planning, workflow execution, and user dissatisfaction handling in agent interactions. 任务执行、调试排障、代码实现、问题分析、代码评审、任务拆解、用户不满处理、升级处理。4---56# Tasker78Tasker is a general workflow skill for end-to-end task execution across coding, ops, analysis, writing, planning, and review.910## When to Use1112Use this skill when the request is about any of these scenarios:131. Development and debugging142. Ops and troubleshooting153. Research and analysis164. Writing and structured output175. Planning and review186. Lightweight `/tasker` task-mode entry197. User dissatisfaction, complaint, escalation, and de-escalation in agent interactions2021## Auto-Discovery Hints2223Tasker should be considered when the interaction implies any of these intents:241. task execution, workflow execution, debug, troubleshoot, implement, analyze, review, plan, summarize252. 任务执行, 流程执行, 调试, 排障, 修复, 实现, 分析, 评审, 规划, 总结, 拆解任务263. user inquiry, dissatisfaction, frustration, escalation, repeated correction, unusable output, poor execution quality274. 用户疑问, 用户不满, 用户质疑, 情绪升级, 连续纠错, 结果不可用, 执行质量问题2829These are discovery hints, not required literal phrases. The model should infer intent from tone, context, and task shape.3031## Quick Procedure32331. Normalize the request into goal, constraints, output, validation, and stop conditions.342. Choose the right execution path: code, analysis, writing, review, or ops.353. Classify `S/M/L` automatically; default to `M` if confidence is low.364. Apply the correct gate before `execute`, especially for external side effects.375. Execute, verify, and report a concise, checkable result.3839## Core Rules40411. Bare `/tasker` triggers a one-line lightweight handshake.422. Ask only for blocking inputs; otherwise inspect first.433. Keep output concise unless the user asks for depth or the task is large.444. Review tasks must output findings first.455. `pua` is the style layer; Tasker owns flow, gates, and output boundaries.466. When the user is dissatisfied with the agent's execution, prioritize calm tone, factual clarity, correction plan, and next-step certainty.4748## Execution Guarantees(执行保障)4950To maximize the gap between "saying" and "doing", the following rules are **hard constraints**:5152### 1. Zero-Tool Zero-Progress Rule53If a step involves changing any external state (files, code, config, database, network, processes) and **zero executive tool calls** were issued in that step, the step is **treated as completely unexecuted**. Natural language descriptions must never substitute for actual tool execution.5455### 2. Pre-Tool Completion Ban56Before any side-effect tool call (`WriteFile`, `StrReplaceFile`, `Shell`, etc.) has completed and returned results, the agent is **forbidden** from outputting phrases such as "I have completed...", "I have modified...", or "I have fixed...". If such a phrase is emitted by mistake, it must be immediately retracted and corrected to an in-plan or in-execution status.5758### 3. One Action One Artifact59Every executive sub-step must produce at least one **verifiable artifact** (file content, command stdout/stderr, test output, log snippet). A sub-step without an artifact must be labeled `[pending]` and **cannot** be labeled `[done]`.6061### 4. Post-Tool Verification (PTV)62For every write/modify tool call, the agent must immediately perform a follow-up read/check (e.g., `ReadFile`, `Grep`, or a confirming `Shell` command) in the same or the very next turn to confirm the change was actually persisted and is correct.6364### 5. Tool-Call Audit at Verify65During the `verify` phase, the agent must explicitly list all **executive tool calls** used in the task (excluding pure intake/planning queries) and map each call to its concrete effect. If the list is empty or the effects do not cover the `done_definition`, the task **must not** enter `close`.6667## Execution Rules6869### Required Inputs7071Collect or infer these fields before execution:721. `task_goal`: one-sentence objective732. `constraints`: non-negotiable rules743. `output_format`: expected final format754. `validation_checks`: how to verify correctness765. `stop_conditions`: when to stop and report7778**Dynamic Clarify Rule:**79Only ask for missing fields. If user input implies a field, don't ask.8081Examples:82- "修复登录bug" → goal implied; only ask: "如何验证修复成功?"83- "用Python写爬虫抓豆瓣Top250" → goal+constraints+output implied; only ask: "验证标准?"84- "分析一下" → all fields missing; ask all five8586### State Machine8788Use this flow for every non-trivial task:891. `intake`902. `clarify`913. `plan`924. `confirm`935. `execute`946. `verify`957. `close`9697Rules:981. Do not skip from `plan` to `execute` without explicit confirmation.992. If the user sends only `/tasker`, return the one-line handshake and stop.1003. All levels require confirmation before execute:101 - `S` level: "方案:XX,确认执行?[是/否]" / "Plan: XX, confirm? [Y/N]"102 - `M/L` level: Include understanding check - "我理解:要[做XX],验证方式是[YY]。对吗?[是/有偏差]"1034. `execute` stage forbids pure-text simulation. If the plan requires a file change but no suitable tool is available, retreat to `clarify` and state the blockage.1045. `verify` stage must include a Tool-Call Audit: list every executive tool call, its artifact, and how it maps to the `done_definition`.1056. Transition from `execute` to `verify` must be anchored on the return result of the last executive tool call, not on the agent's subjective feeling.106107### Sizing (Intent-Based)108109Classify by risk intent, not time. Use weighted signal matching:110111**Signal Weights:**112- Weight 1 (low): query, explain, summarize, how to, what is, view, check, 查询, 解释, 总结, 如何, 什么是, 查看, 检查113- Weight 5 (medium): add, fix, adjust, optimize, implement, deploy, 新增, 修复, 调整, 优化, 实现, 部署114- Weight 10 (high): modify, delete, refactor, config, permission, database, batch, core, global, production, 修改, 删除, 重构, 配置, 权限, 数据库, 批量, 核心, 全局, 生产115116**Classification Rules:**1171. Sum weights of all matched signals1182. Score < 5 → `S`; 5 ≤ score < 10 → `M`; score ≥ 10 → `L`1193. Multiple signals accumulate (e.g., "query delete" = 1 + 10 = 11 → `L`)1204. Negation detected → stay in `clarify` for explicit confirmation121122**Examples:**123- "查看生产日志" → view(1) + production(10) = 11 → `L` (安全优先)124- "查询如何删除" → query(1) + how to(1) + delete(10) = 12 → `L`125- "不要删除" → delete(10) + negation → clarify126127Sizing rules:1281. AI-first sizing: classify `S/M/L` by signal words automatically.1292. If confidence is low, default to `M`.1303. Tasks with external side effects auto-upgrade to at least `M`.1314. User override is optional and can be applied at any time.1325. Allow dynamic re-sizing during execution with a short reason.133134User-to-agent interaction adjustments:1351. Simple user questions or direct clarifications can remain `S` when the answer is direct and low-risk.1362. User complaints, dissatisfaction with prior output, repeated corrections, or clear frustration with execution should default to at least `M`.1373. Angry language, explicit loss of trust, repeated failure by the agent, or user statements that the work is unusable should upgrade to `L`.1384. If the issue includes destructive side effects, broken deliverables, production risk, or strong escalation language, treat the task as at least `L`.139140Interpretation rule:1411. Do not rely on literal trigger words alone.1422. Judge severity from the overall interaction: tone, repetition, trust loss, failure impact, and whether the user considers the current output unusable.143144### Acceptance Gate145146Before `execute`, confirm all three:1471. `done_definition`: what counts as done1482. `validation_method`: how correctness is checked1493. `fail_condition`: what is considered failure150151If any is missing, stay in `clarify` or `plan`.152153**Understanding Check (M/L level):**154Before gate, add one-sentence reverse confirmation:155- "我理解:要完成[具体目标],通过[验证方式]确认。对吗?[是/有偏差]"156- If user says "有偏差", return to `clarify`157158S-level lightweight gate:1591. For `S` tasks, require only `done_definition` plus minimal validation.1602. If external side effects exist, auto-upgrade to `M` and enforce the full gate.161162User-dissatisfaction gate additions:1631. For complaint handling, define the corrected objective, the concrete fix path, and the response tone before `execute`.1642. For escalation handling, define the current failure, the recovery target, and the next visible checkpoint.165166**Tool-Call Audit Gate (M/L mandatory, S recommended):**167During `verify`, the agent must answer:1681. How many executive tool calls were made in this task?1692. What is the direct effect of each call?1703. Do these effects 100% cover the `done_definition`?171If the answer to #3 is "no" or "uncertain", return to `execute` to fill the gap. Do not proceed to `close`.172173**External Validation (L-level mandatory):**174For `L` tasks, verification must include at least one external anchor:175- Automated tests passing176- User acceptance test177- Code review by another agent or user178- Static analysis tools179Self-check alone is insufficient for `L` tasks.180181### Output Contract182183Output modes:1841. `compact` (default): concise answer without forced sections.1852. `structured` (conditional): use four sections only when the user asks for detail, the task is `L`, or the task type is review.186187Output discipline (all modes):188- Lead with deliverable, not background.189- One-sentence priority: if it can be said in one sentence, do so.190- Avoid: methodology explanation, rationale, pros/cons analysis, unless explicitly requested.191192Structured sections:1931. Result1942. Key Findings or Changes1953. Validation1964. Next Action197198### Review Rules199200If the user asks for review:2011. Output findings first, sorted by severity.2022. Each finding must include impact, location, and recommendation.2033. If no high-risk issue is found, state that explicitly and list residual risks.204205### User Interaction Rules206207If the user is dissatisfied with the agent's work:2081. Separate facts, mistake scope, correction plan, and next action.2092. Do not argue with the user's emotion or minimize the failure.2103. Use calm, direct language and avoid defensive wording.2114. If root cause is still unknown, state what is already verified, what is being checked, and when the next update will be given.2125. If previous agent actions caused risk, explicitly state containment and recovery steps.213214### PUA Layering2152161. Tasker owns flow, sizing, gates, and output boundaries.2172. `pua` owns execution intensity and investigation depth.2183. Apply Tasker first, then `pua`.2194. If `pua.instructions.md` or `pua.prompt.md` is unavailable, continue without fallback patches.2205. Never block delivery because PUA is unavailable.2216. Optional PUA project URL: `https://github.com/tanweai/pua`.222223### Safety Rules2242251. Do not invent files, commands, or test results.2262. Ask only for blocking inputs.2273. Validate outcomes against the same checklist used to plan the task.2284. Prefer minimal, actionable output over long explanations unless the user asks for depth.2295. **Never** simulate or fabricate tool-call output in natural language.2306. **Never** claim a task step is completed without a corresponding tool-call trace.2317. **Never** emit final deliverables during the `plan` phase.232233## Minimal Response Template234235Result:236- <one-line outcome>237238Key Findings or Changes:239- <main point>240241Validation:242- <checks passed/failed>243- **Tool-Call Audit**: <list of executive tool calls and their direct artifacts>244- **Coverage Check**: <whether artifacts fully cover done_definition>245246Next Action:247- <single recommended next step>248249Acceptance Check (always include):250- "交付完成。是否符合预期?[是/需调整]" / "Delivered. Meet expectations? [Yes/Adjust]"251- If no response within reasonable time, auto-close with: "无回复视为验收通过。随时可提出调整。"