/aitask-fold
Identify and merge related tasks into a single task, then optionally execute it. This skill provides the same folding capability as /aitask-explore but as a standalone skill — no codebase exploration required.
Usage:
/aitask-fold # Interactive: discover and fold related tasks
/aitask-fold 106,108,112 # Explicit: fold specific tasks by ID
Note: Must be run from the project root directory. See Skills overview for details.
Codex CLI note: When continuing from this skill into implementation, in Codex wrappers, after implementation, most of the times you will need to explicitly tell the agent to continue the workflow because
request_user_inputis only available in plan mode. Example prompts:Good, now finish the workfloworGood, now continue.
Step-by-Step
- Profile selection — Same profile system as
/aitask-pick - Task discovery — In interactive mode, lists all eligible tasks (
Ready/Editingstatus, not a child task, no children of their own), identifies related groups by shared labels and semantic similarity, and presents them for multi-select. In explicit mode, validates the provided task IDs and skips discovery - Primary task selection — Choose which task survives as the primary. All other tasks’ content is merged into it. The originals are set to
Foldedstatus (with afolded_intoreference to the primary) and deleted after the primary task is archived - Content merging — Non-primary task descriptions are appended under
## Merged from t<N>headers. Thefolded_tasksfrontmatter field tracks which tasks were folded in (appends to existing if present) - Optional handoff — Continue directly to implementation (via the standard
/aitask-pickskill) or save the merged task for later
Key Capabilities
- Two invocation modes — Interactive discovery for finding related tasks, or explicit task IDs for quick folding when you already know what to merge
- Graceful validation — Invalid or ineligible tasks are warned and skipped rather than aborting. The skill only aborts if fewer than 2 valid tasks remain
- Append-safe — If the primary task already has
folded_tasksfrom a previous fold, new IDs are appended rather than replacing - Same cleanup mechanism — Uses the same
folded_tasksfrontmatter field as/aitask-explore. Post-implementation cleanup (deletion of folded task files) is handled by the shared task-workflow Step 9
Profile key: explore_auto_continue — Reuses the same key as /aitask-explore. Set to true to skip the “continue to implementation or save” prompt.
Workflows
For a full workflow guide, see Task Consolidation.