Best for
- Design background work for a coding-agent CLI or runtime
- Add task lists, worker tasks, or background execution surfaces
- Decide how local, remote, and teammate tasks should differ
vasilyu1983/AI-Agents-public/frameworks/shared-skills/skills/ai-coding-agents-tasks/SKILL.md
Designs task runtimes for Loop Engineering, Graph Engineering, and background work. Use when work needs task lists, cyclic/workflow graphs, cancellation, or teammate coordination.
Decision brief
Use this skill to design or review how a coding-agent runtime represents work as tasks: local agent tasks, shell tasks, remote tasks, teammate tasks, background execution, task lists, and task coordination.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Declared | Source record | Install path and trigger |
| Claude Code | Declared | Source record | Install path and trigger |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill "frameworks/shared-skills/skills/ai-coding-agents-tasks"Inspect the Agent Skill "ai-coding-agents-tasks" from https://github.com/vasilyu1983/AI-Agents-public/blob/53f6cb73ea53a2646e3e7d4665062ad66f3683ac/frameworks/shared-skills/skills/ai-coding-agents-tasks/SKILL.md at commit 53f6cb73ea53a2646e3e7d4665062ad66f3683ac. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Model task types explicitly. Local shell, local agent, remote agent, teammate, workflow, and monitor-style tasks should not be one untyped blob. 2. Keep task state in the host store. Status, ownership, backgrounding, and timestamps belong to runtime state, not just UI widgets…
Review the “ASCII Flow” section in the pinned source before continuing.
Review the “Quick Reference” section in the pinned source before continuing.
Design background work for a coding-agent CLI or runtime
Review the “Use Other Skills” section in the pinned source before continuing.
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 82 | Source | Repository attention, not individual Skill quality |
| Compatibility | 2 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Use this skill to design or review how a coding-agent runtime represents work as tasks: local agent tasks, shell tasks, remote tasks, teammate tasks, background execution, task lists, and task coordination.
This skill is about runtime task systems, not product backlog planning.
work request
|
v
task model
type + owner + status + inputs + blockers + cancellation semantics
|
v
task store
local task list | background task | remote task | teammate task
|
v
scheduling
claim -> run -> progress events -> complete | fail | blocked | release
|
v
UI/session reflection
background badge, task detail, foregrounding, retry, escalation
| Question | Read | Outcome |
|---|---|---|
| What task types should a coding-agent runtime support? | references/task-types-and-lifecycle.md | Task families, statuses, background eligibility, and host ownership |
| How should task lists and teammate routing work? | references/task-list-coordination-and-teammate-routing.md | File-watched task lists, claiming, blockers, teammate routing, and response loops |
| How do Anthropic-hosted routines (schedule / API / GitHub) behave? | references/claude-code-routines.md | Trigger types, /fire endpoint, beta header, cap-drop behaviour, fresh-session model, comparison with Actions / n8n / cron |
| How do I trigger agents from webhooks, queues, or schedules at scale? | references/webhook-and-queue-triggers.md | Shape A — SQS / Streams / Kafka / EventBridge, idempotency, dedup, DLQ, provider rate-limit slots |
| How do I make agent runs durable across crashes and multi-step? | references/durable-trigger-integration.md | Temporal / Inngest / Restate / Step Functions, agent-as-activity, sagas, signals, replay |
| Where do I actually host the trigger + agent (Vercel, Fly, CF, Render)? | ../software-paas-hosting/references/agent-hosting-matrix.md | Per-shape PaaS stacks + reference architectures |
| How do I statically validate a recipe blueprint YAML? | scripts/recipe_scanner.py | stdlib-only validator: required fields, parameter types, extension risk gates, placeholder detection |
| How does OpenAI Codex model cloud tasks, apply/diff, and agent graphs? | references/openai-codex-cloud-tasks-and-agent-graph.md | Task CLI lifecycle, best-of-N attempts, partial apply states, environment filters, and persisted parent-child topology |
| Where is the runtime surface for Loop Engineering and Graph Engineering — including cyclic/workflow graphs? | references/loop-and-graph-runtime-surfaces.md | Surface matrix, queue-vs-cyclic-graph data model, portable loop contract, scheduled-loop state rules |
| Need | Use Instead |
|---|---|
| Multi-agent planning and ownership contracts | ../agents-swarm-orchestration/SKILL.md |
| Loop shapes, termination predicates, and convergence detection | ../agents-swarm-orchestration/references/loop-orchestration.md |
| Script-held deterministic control flow (Claude Code Workflows) | ../agents-swarm-orchestration/references/scripted-workflows.md |
| Terminal UI and task dialogs | ../ai-coding-agents-terminal-ui/SKILL.md |
| Session resume and transcript persistence | ../ai-coding-agents-sessions/SKILL.md |
| Prompt-cache economics when spawning subagent tasks | ../ai-coding-agents-sessions/references/resume-path-decision-tree.md — blank vs. forked subagent startup, cache-prefix economics; also ../ai-coding-agents-sessions/references/context-forking.md |
| Tool-call permission gating, approval modes, and policy inheritance for subagents | ../ai-coding-agents-permissions/SKILL.md |
Task → Agent) as two distinct task families instead of checking whether it is the same primitive under an old name.Source: How OpenAI uses Codex, p. 11 — internal-usage report.
../ai-coding-agents/SKILL.md#openai-internal-practice-codex-2026-05).Claude Code Routines is a research-preview scheduling layer that lets Claude Code run without a local session. Distinguish three trigger classes; pick the narrowest one that fits:
| Trigger class | Runtime | Persistence | Use when |
|---|---|---|---|
| Routines (Anthropic cloud) | Cloud-hosted Claude Code workers | Schedule, API call, or GitHub event fires the job with the laptop closed | You need cadence-driven or webhook-driven work (PR babysitting, nightly repo sweeps, scheduled reports) |
/loop (session-bound) | Current local session | Dies with the session; runs while the session is open | You want a repeating task during an active working session (poll deploy, retry until green) |
| Desktop scheduled tasks | Local machine | Tied to this machine staying awake | Machine-local automation where cloud access is not acceptable |
Routines are task-shaped: a Routine creates tasks in the host runtime under a scheduler-owned task family. Apply the same typing, claiming, blocker, and cancellation rules as other task types — schedule triggers do not earn special cases.
Caveats (verified 2026-07-11 — still research preview, not GA; re-check before treating this as a stable contract):
AGENTS.md / CLAUDE.md for context, not transcript memory.Source: Matt Abrams, Claude Code Routines tutorial (2026-04-20); https://code.claude.com/docs/en/routines (re-verified 2026-07-11).
Claude Code's own subagent-task model changed enough in the last two months that the "task vs. subagent" naming and the background-permission contract in this skill's design rules need a concrete, dated anchor. Treat these as the reference implementation of the abstract rules above ("Differentiate abort from kill," "background eligibility"), not as a Claude-Code-only detail.
Task for spawning subagents was renamed Agent. Legacy Task(...) references in settings and agent definitions still resolve as an alias; some SDK surfaces still report Task in an initial tools list while emitting Agent in tool-use blocks. When auditing an existing runtime, do not assume "Task" and "Agent" are different task families — check whether it is the same subagent-spawn primitive under an old name before modeling two families.agent_needs_input / agent_completed). Design implication: "background" is no longer a rare, explicitly-requested task state — it is the default task shape, so background-task surfaces must be a first-class, always-visible part of the UI, not a rare drawer.CLAUDE_CODE_FORK_SUBAGENT environment variable forces every subagent spawn into the background and removes the runtime's ability to force a specific spawn to the foreground (the background frontmatter field and any per-call foreground request are ignored). Treat this as a host-wide policy switch on background eligibility, not a per-task property — a runtime that lets individual task requests silently override a host-wide fork-mode policy has a policy-enforcement bug, not a feature.Known trap to add to your own review checklist: a runtime that treats "background subagent needs a permission" as a silent, unrecoverable failure — rather than routing it to the owning session as a first-class pending state — reproduces a bug Anthropic had to ship a dedicated fix for. Verify current behavior against code.claude.com/docs/en/sub-agents before depending on exact version gates; permission-routing and background-default behavior are active areas of change.
Goose models task creation around recipes: declarative YAML units that replace ad-hoc free-text task spawning. Three patterns worth importing into the task runtime model.
A Goose recipe is a validated YAML file with version / title / description / instructions / author / extensions / activities / prompt / parameters (typed: {key, input_type, requirement, description, default}). Tasks spawn from a recipe, not from a free-form user string. Parameters are declared, activities are listed, required extensions are pinned.
recipe-scanner-style static checks), binds typed parameters, and spawns the task with a pinned extension manifest.recipe-scanner/ crate is a working reference.When a lead session spawns parallel subagents (code review lane, docs lane, file-processing lane), each subagent should carry its own extension manifest — typically a subset of the lead's. Goose models this explicitly; the subagent inherits no more capability than its recipe declares.
extensions: Vec<ExtensionRef> field to the subagent-task family. Refuse to spawn if the subagent's declared extensions are not a subset of the lead's envelope.A Goose recipe can invoke another recipe as a step, not just call a tool. Sub-recipes let complex workflows compose from validated pieces instead of giant monolithic prompts.
pending-subrecipe, running-subrecipe, completed-subrecipe) and a parent-recipe pointer. Cancellation of the parent should cascade; a failed sub-recipe should be a first-class blocker on the parent./goal, Goose /goal, and analogues, 2026-05)Codex exposes a /goal command and Goose (v1.36.0+) ships its own /goal loop — two first-party implementations of the same pattern: act → score → check goal → continue or terminate. The same loop shape can be built on top of any agent runtime (Claude Code subagent, custom SDK harness, scheduled Routine). Two failure modes dominate when the loop is wired to a vague target:
Both modes share the same root cause: the check goal step is underspecified. Fixes below are first-party patterns from Chris Hayduk (OpenAI, 2026-05-11).
Replace qualitative goals with a measurable target plus an explicit constraint set. The agent terminates when target ≥ threshold AND no constraint is violated.
specific_file.py by 20% without causing regressions in existing unit and integration tests."Required fields for any goal-mode prompt:
When the real goal is qualitative (formatting compliance, style guide adherence, doc completeness), convert it to a binary checklist:
Why this works: a fuzzy "is the paper formatted correctly?" decision becomes N narrow "is rule K satisfied?" decisions, each of which the model can self-check with reasonable reliability.
The goal-mode loop is bounded by per-iteration scoring time. Drop scoring cost without compromising signal:
This is the same minification principle as dev-loop test speedups, applied to the evaluation step of an RL-style agent loop instead of to verification.
Goal-mode is a ralph-style loop: same prompt repeats with the goal-state read back each iteration. Ralph loops scale test-time compute effectively — Anthropic's BrowseComp data (linked from Watts, 2026-05-07) shows Sonnet 4.6 spending ~10× tokens yielded ~10 percentage points higher score. But a bare ralph loop hits three ceilings:
Ambiguity bottleneck. Each iteration's output is the next iteration's input. One underspecified decision early in the run direction-shifts everything downstream. No amount of token spend rescues a run whose target was vague. Fix: invest in a pre-loop interview/clarification phase (20–50 clarifying questions) that forces the human to decide upfront. See ../dev-workflow-planning/SKILL.md#pre-loop-setup-phase-both-variants and superpowers:brainstorming.
Single-context-window bottleneck. Even with token budget headroom, a single agent's context window accumulates clutter and the model starts "deluding itself" (Watts, citing Boris Cherny). Separate context windows beat one big window. Fix: orchestrator + implementer + reviewer triad — fresh subagent context per task, reviewer judges work without implementer biases. See ../agents-swarm-orchestration/SKILL.md.
Cross-context memory bottleneck. Multi-day runs cross compaction boundaries; without filesystem-backed memory, new context windows lose the chain. Fix: filesystem-backed journaling per the Watts 4-file (bounded product) or Hayduk 3-file (exploratory) pattern. See ../dev-workflow-planning/SKILL.md#long-horizon-agent-journaling.
Goal-mode + ralph loop alone is the right primitive for short-horizon quantitative goals (Hayduk's NeurIPS→ICML, runtime-by-20% optimizations). For multi-day product building it is necessary but not sufficient — pair it with interview-led setup, multi-agent execution, and cross-context memory or accept that the run will drift.
Goal-mode runs that last hours or days exceed the practical window of in-memory transcript compaction. Force state to the filesystem instead. See Long-Horizon Agent Journaling in dev-workflow-planning for the canonical 3-file (PLAN.md / EXPERIMENTS.md / EXPERIMENT_NOTES.md) pattern.
PLAN.md with the initial approach. Mount EXPERIMENTS.md + EXPERIMENT_NOTES.md as the agent's persistent scratchpad.Source: Chris Hayduk, Using Codex Goals Effectively (2026-05-11). Generalizable beyond Codex — the same pattern works for Claude Code subagents driving toward a measurable target.
references/task-types-and-lifecycle.md — Task families, statuses, and background visibility rulesreferences/task-list-coordination-and-teammate-routing.md — File-watched task lists, claiming, blockers, and teammate routingreferences/claude-code-routines.md — Scheduled/triggered routines: schedule (cron), API /fire, and GitHub-event triggers; prompt-authoring rules, limits, and creation pathsreferences/durable-trigger-integration.md — Durable trigger integration for reliable triggered runsreferences/webhook-and-queue-triggers.md — Webhook- and queue-driven task triggers, including per-event budgetsreferences/openai-codex-cloud-tasks-and-agent-graph.md — OpenAI Codex cloud task lifecycle, apply/diff result states, environment filters, and persisted task topologyscripts/recipe_scanner.py — stdlib-only static validator for recipe blueprint YAML filesdata/sources.json — Primary documentation and source references for coding-agent task runtime guidance../agents-swarm-orchestration/SKILL.md../ai-coding-agents-terminal-ui/SKILL.md../ai-coding-agents-sessions/SKILL.md../ai-agents/references/autonomous-loop-patterns.md — when a trigger should drive an autonomous loop (iterate until a goal/acceptance criterion is met), not a single run../agents-hooks/references/budget-and-loop-hooks.md — budget, iteration-cap, stagnation, and kill-switch enforcement for scheduled/triggered runs and always-on botsclaude_code snapshot, current primary runtime docs, and a 2026-07-11 web re-verification pass (Task→Agent rename, background-by-default default, and background-permission-prompt routing — see Background-Subagent Task Semantics). Re-check current task type names, subagent or handoff affordances, session persistence rules, and backgrounding behavior before depending on exact runtime details — this cluster changes fast.Before applying this skill on a non-trivial task, read learnings.consolidated.md in this directory (and learnings.md if present).
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.
Frequently asked questions
Use this skill to design or review how a coding-agent runtime represents work as tasks: local agent tasks, shell tasks, remote tasks, teammate tasks, background execution, task lists, and task coordination.
The source record exposes this install command: npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill "frameworks/shared-skills/skills/ai-coding-agents-tasks". Inspect the command and pinned source before running it.
The pinned source record declares support for: codex, claude code.
Alternatives
vasilyu1983/AI-Agents-public
Configures Claude Code hooks and Codex hooks.json/notify callbacks. Use when adding guardrails, preflight, audit trails, worktree automation, or budget enforcement.
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
vasilyu1983/AI-Agents-public
Guides multi-GPU pre-training: DDP, FSDP2, ZeRO, tensor/pipeline/expert parallelism, fp8/Muon. Use when scaling a run, training MoE, or reproducing GPT-2 on rented GPUs.
vasilyu1983/AI-Agents-public
Scans public GitHub repos for agent skills, dev practices, and code patterns. Use when enriching skills, setting team policy, or researching a build domain.