long-task-control

long-task-control is a skill for Claude Code from patrick-fu/awesome-skills. It costs 41 tokens per session (1,158 once invoked), scanned A, original, MIT.

A task-control guide for recovering an agent's direction when work has drifted, stalled, repeated itself, or lacks proof of completion.

In plain words
What is it for?
Use it on long or troubled coding tasks to recheck requirements, preserve verified work, resolve review conflicts, and decide what remains.
Why use it?
It compares the original goal with actual files, checks, history, and activity so unfinished or unsupported work is identified.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the agent-orchestration plugin — 8 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/patrick-fu/awesome-skills/long-task-control
Any agent
npx skills add patrick-fu/awesome-skills --skill long-task-control
Clone the repo
git clone --depth 1 https://github.com/patrick-fu/awesome-skills

Made for: Claude Code.

Or install agent-orchestration, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for long-task-control

README.md
[![agentmods](https://agentmods.dev/badge/skills/patrick-fu/awesome-skills/long-task-control.svg)](https://agentmods.dev/skills/patrick-fu/awesome-skills/long-task-control)
Your own site
<a href="https://agentmods.dev/skills/patrick-fu/awesome-skills/long-task-control"><img src="https://agentmods.dev/badge/skills/patrick-fu/awesome-skills/long-task-control.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,158 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.01158
Opus 5 $0.00020 $0.00579
Sonnet 5 $0.00008 $0.00232
Haiku 4.5 $0.00004 $0.00116

Measured 6d ago against content hash 0e87cd13a1ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

long-task-control scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

long-task-control/SKILL.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Long Task Control

Run a control loop that preserves verified work while correcting the course. Its governing principle: constrain the process, leave the tactics free — the gates below are hard, but how the agent improvises within them is not.

Reconstruct the target on every invocation from the original request, later authorized changes, and acceptance criteria. Newer authorized changes override older intent; keep unresolved conflicts visible.

  1. Observe. Read the actual artifacts, checks, remaining work, history or rollout, and active agents — and trust these, not an agent's reported activity or self-claimed progress. Distinguish delegate liveness, observable progress, and completion: silence or elapsed time proves neither progress nor failure; active commands, dirty artifacts, and new check results are progress; only a terminal result backed by acceptance evidence is completion. Read that state from direct telemetry, and wait on defined checkpoints rather than prompting a delegate for running narration. Do not redo accepted work; optional work may be stopped once it can no longer change the outcome.

  2. Compare. At each boundary, compare artifacts and trajectory against the target: missing outcomes, unsupported completion claims, scope drift, repeated loops, or effort that no longer moves acceptance. Redo this after every major phase, not only at the end.

  3. Challenge — run an adversarial pass by default. At each major phase boundary challenge the work on two axes:

    • Design Challenger: ROI, design soundness, and gold-plating — scope creep, over-engineering, and redundant complexity the executor added on its own (加戏).
    • Drift Watchdog: alignment with the original intent, real progress since the last boundary, evidence quality, repeated work, and stale delegation.

    Finish any challenge that can change the contract, interface, or acceptance boundary before a writer begins; run only non-blocking guards concurrently. Run these as separate clean-context, read-only reviewers whenever the surface is non-trivial or the phase touched shared state; collapse to a single inline check only for a small, low-risk surface. Then give one owner the job of merging all findings: deduplicate, resolve conflicts, and classify each as actionable, boundary-only, overdesign, or false-positive. For each finding handed to a human, give its rationale with a code snippet so the call is reviewable item by item, not a bare label. Never staple reviewer outputs together as the decision, and let the agent that fixes differ from the one that reviewed.

  4. Correct. Disposition each material finding — keep, prune, repair, replan, or escalate. When the Design Challenger flags gold-plating or drift, re-decompose the remaining work into commit-sized units before continuing, so the executor cannot smuggle in unrequested scope. Before interrupting an active delegate, inspect its status, dirty diff, active processes, and generated artifacts directly, and preserve and consume recoverable work; if an execution delegate with valuable context terminates with only a plan, give it one narrower outcome and exit condition before replacement. Reuse an agent whose context still serves the target; retire stale agents and their descendant work once it has no remaining outcome. Keep the three evidence types distinct — review yields candidate findings, runtime checks yield behavioral evidence, walkthroughs recover human understanding — and never let one stand in for another. After a correction, recheck the affected surface and any broader acceptance surface it may have disturbed.

  5. Continue, and close on evidence. Resume work, but stop and replan the moment retries, polling, or agent activity produce no new acceptance evidence since the last boundary — the gate is "no new evidence," not a retry count. Interim passes review the current phase's diff; the terminal pass before closing reviews the entire cumulative diff, not just the last phase's. A typical rhythm: architecture-review + fix, then general-review + fix, once per module, then the same pair twice over the full diff at the end — adjust to the work, this is illustrative, not a fixed count. Before a turn, continuation, or handoff boundary, make every required delegated result terminal and consume it rather than assuming child-agent state will persist. Close only when that work is consumed and acceptance evidence supports completion; otherwise continue or surface the real blocker.

Read the full file on GitHub · 90 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 90 lines · 41 tokens per session scan A 0e87cd13a1ed

Subscribe to this mod's changes

long-task-control is a skill published in the GitHub repository patrick-fu/awesome-skills (57 stars, last pushed 3d ago), licensed MIT. It adds 41 tokens to every session and 1,158 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens