360 Secure SkillHub
360 安全技能中心

handle-big-tasks

核心功能是将单轮无法完成的大型任务拆分至多轮Agent执行,每轮完成一个独立可评审阶段,结尾通过规定状态标记(续跑询问/任务完成)衔接;配套bash/CMD循环脚本可自动应答续跑、记录执行日志,支持人工介入评审调整。适用于大型重构、按计划/路线图落地、需分阶段评审的多阶段任务;输入为任务计划或路线图,输出为各阶段交付结果与状态标记,不适用于单轮可完成的小型任务。

jhauga
jhauga
热度 7.65
最近更新 2026-10-09 09:25:10
分类:开发依赖:纯提示词 / 代码执行 / 读写文件应用场景:任务管理 / 工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add handle-big-tasks
Metadata
name
handle-big-tasks
description
Instructions for breaking large tasks across multiple agentic runs instead of one response. Use when implementing a plan file, doing a large refactor, or any multi-phase task that won't fit in a single response. Covers the CONTINUE? Y or N and TASK COMPLETE! end-of-response markers, plus bash and CMD loop scripts that answer them automatically.
argument-hint
Optional: the plan, roadmap, or task to work through phase by phase

Handle Big Tasks

Use this skill for large tasks whose work spans multiple agentic runs and responses, rather than one response to one prompt.

Each response delivers one complete phase, then hands control back with a marker that says whether more work remains. A person can answer the marker, or one of the loop scripts in the skill's scripts folder can answer it and start the next run.

When to Use This Skill

  • Implementing a plan file, roadmap, or checklist with several distinct stages
  • Large refactors, migrations, or rewrites that touch many files
  • Work that would exceed a single response if done all at once
  • The user asks to proceed "phase by phase", "step at a time", or "one part per response"
  • Any task where intermediate results should be reviewed before the next stage begins

Do not use this skill for small, self-contained requests that finish cleanly in one response. The markers add friction with no benefit there.

Prerequisites

  • A task that divides into phases with recognizable completion points
  • A phase plan, either supplied by the user or derived from the task before work starts

End-of-Response Markers

The end of every response is a status signal. One of the following two markers closes each response, unless a phase is blocked on something only a person can resolve (see Marker Rules).

A Phase Is Complete, But the Task Is Not

If a phase is complete but the task as a whole is not, the last line of the response is:

CONTINUE? Y or N

The Entire Task Is Complete

If the entire task is complete, the last line of the response is:

TASK COMPLETE!

Markers Are Machine-Parsed

The loop scripts in the scripts folder read the last line of each response to decide what happens next. Each marker must appear verbatim and unquoted as the final line of the response, alone on that line, with no trailing punctuation and no markdown wrapping: no backticks, bold, blockquote, list bullet, or code fence. The fences above only display the markers in this document.

Workflow

  1. Confirm the task is large. If the work finishes in one response, skip this skill entirely.
  2. Divide the task into phases. Each phase should be independently reviewable and leave the workspace in a usable state.
  3. State the phase plan. On the first response, list the phases so the reader knows the shape of the work and how many runs to expect.
  4. Work one phase per response. Complete that phase fully. Do not start the next phase in the same response.
  5. Report what the phase delivered. Summarize the changes, note anything deferred to a later phase, and report failures honestly.
  6. Close with the correct marker. Use CONTINUE? Y or N while phases remain, or TASK COMPLETE! once the whole task is done.
  7. Respond to the answer. On Y, begin the next phase. On N, stop and leave the remaining phases unstarted. Treat any other reply as feedback or a question about the current phase: address it, restate the phase plan if it changed, and close with the correct marker again.

Marker Rules

  • The marker is the last line of the response, alone on that line, as plain text, with nothing after it.
  • Reproduce the marker text exactly, including capitalization, the question mark, and the exclamation point.
  • Use at most one marker per response. Never both.
  • TASK COMPLETE! means the whole task is done, not just the current phase.
  • If a phase hit problems that the next run can work through, say so plainly in the summary and still close with CONTINUE? Y or N.
  • If a phase is blocked on something only a person can resolve, such as missing credentials or a decision outside the plan, explain the blocker and end the response without a marker. A person reading the session can reply directly, and a loop script stops instead of answering Y.

Loop Scripts

The scripts in the scripts folder drive the GitHub Copilot CLI through a plan file and answer Y after each phase, so nobody has to wait at the keyboard between runs.

Script Shell
scripts/loop-copilot.sh bash (Linux, macOS, WSL, Git Bash)
scripts/loop-copilot.bat Windows CMD

Both take the same arguments, <plan-file> [interval-minutes], and run from the project folder Copilot should work in. For a skill installed in the project's .github/skills folder:

.github/skills/handle-big-tasks/scripts/loop-copilot.sh docs/migration-plan.md 15
.github\skills\handle-big-tasks\scripts\loop-copilot.bat docs\migration-plan.md 15

Each loop:

  1. Starts a new session with a fixed session ID and a prompt that names the plan file and asks for this skill and its markers.
  2. When a response ends with CONTINUE? Y or N, waits the interval (default 10 minutes), then answers Y in the same session.
  3. Exits with code 0 when a response ends with TASK COMPLETE!. Exits with code 1 when copilot fails, a response ends without a marker, or the safety cap of runs is reached. Exits with code 2 when it cannot start.
  4. Prints each response and appends everything, with a timestamped separator for each run, to <plan-file>.loop.log next to the plan file. When it stops early, it prints the copilot --resume command that picks the session up by hand.
Variable Purpose
LOOP_MAX_ITERATIONS Safety cap on runs (default 50)
LOOP_COPILOT_ARGS Extra copilot flags separated by spaces, for example --model <model> or --allow-tool=write
  • A run started with -p cannot stop for tool approval. Grant what the plan needs through LOOP_COPILOT_ARGS, such as --allow-tool=write and --allow-tool=shell(git:*), and reserve --allow-all-tools for workspaces you trust.
  • Keep the plan file inside the project folder, or add its folder with --add-dir, so the agent can read it.
  • The scripts pin the session ID instead of using --continue, which resumes the most recent Copilot CLI session wherever it was started.

Example

The user, or a loop script, asks:

Implement the migration plan in docs/migration-plan.md

First response:

Phase plan: (1) add the new config loader, (2) port call sites, (3) remove the legacy loader.

Phase 1 complete: added the new config loader and its tests. Call sites still use the
legacy loader and move in phase 2.

CONTINUE? Y or N

After Y, the second response:

Phase 2 complete: ported all call sites to the new loader. Legacy loader removal remains.

CONTINUE? Y or N

After Y, the third response:

Phase 3 complete: removed the legacy loader and its tests. Every phase of the migration
plan is done.

TASK COMPLETE!

Troubleshooting

Issue Solution
Unsure whether the task is large Estimate the phases. Two or more reviewable phases means use this skill.
Phase boundaries are unclear Split at points where the work is verifiable and the workspace is left usable.
A phase ran long and only partly finished Report exactly what landed and what did not, then close with CONTINUE? Y or N.
Tempted to finish two phases at once Do not. One phase per response keeps review points intact.
Task finished early, before the planned final phase Close with TASK COMPLETE! and explain why the remaining phases were unnecessary.
Another active agent or instruction says never to pause for confirmation Follow the user's most specific request. If the user asked to work phase by phase, use the markers. Otherwise, skip this skill and keep working.
The session was reset, compacted, or resumed partway through the task Re-read the phase plan or the document it came from, check the workspace for what already landed, restate the remaining phases, then resume at the next unfinished phase.
A loop script stopped because the last line was neither marker Read the last response in <plan-file>.loop.log. It usually hit a blocker, wrapped the marker in formatting, or added text after it. Fix the cause, then resume with the printed command or start the loop again.
Every phase reports that a tool was denied Grant the permissions the plan needs, as described in Loop Scripts, then start the loop again.