一键导入
task-persist
Manage task persistence across /clear sessions — disable/enable auto-restore, list prior sessions, inspect tasks from a specific session
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Manage task persistence across /clear sessions — disable/enable auto-restore, list prior sessions, inspect tasks from a specific session
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Resolve ambiguous user prompts by choosing whether to answer now, answer with assumptions, ask 1–2 high-value clarification questions, replan, or stop. Use when the best response depends on hidden intent, audience, scope, constraints, risk, output format, or desired depth.
Analyzes an approved plan and decomposes it into a dependency-ordered task graph via a two-phase TaskCreate and TaskUpdate pass. Detects linear DEPENDS ON chains (shared worktree), identifies independent work streams (parallelized), and executes the full worktree-isolated run. Also handles Branch B (learnings from session context). **AUTOMATICALLY INVOKE** only when: - The PostToolUse(ExitPlanMode) hook has injected its schedule-tasks nudge in this turn (i.e., the user just approved a plan), AND the user has not signaled they want to defer execution. - /schedule-plan-tasks is invoked explicitly. - The user explicitly says "schedule tasks", "execute the plan", "decompose plan into tasks" — only when a plan exists at ~/.claude/plans/*.md AND ExitPlanMode has already been approved in this session. **DO NOT auto-invoke** while plan mode is active, while review-plan is iterating, or before the user has approved ExitPlanMode. **References:** JIT-loaded from `${CLAUDE_SKILL_DIR}/references/`
Headless `claude -p` test harness V2 — runs a fixture's literal prompt through real Claude sessions (k replicas in parallel), grades each replica on five string views plus structured tool-call / tool-result / run-health / LLM-judge condition families, then quorum-aggregates row verdicts. Use when an LLM-driven prompt needs behavioral verification beyond contract-string parser tests.
Universal plan review: senior-engineer directive + deterministic count-based severity rule. AUTOMATICALLY INVOKE when: - MANDATORY_PRE_EXIT_PLAN directive applies (before ExitPlanMode) - User says "review plan", "check plan", "plan ready?" - Any plan file needs review NOT for: Code review of existing files (use /gas-suite:gas-review or /review-fix)
Compare an agent or skill prompt against its test harness skill for phase-model, skip-condition, and wiring consistency. Reports mismatches and identifies which file is authoritative.
TDD-based prompt migration — given a target agent/skill prompt and a remediation list from prompt-audit, writes failing tests first, then updates the prompt to make them pass, and commits both in a single atomic commit.
| name | task-persist |
| description | Manage task persistence across /clear sessions — disable/enable auto-restore, list prior sessions, inspect tasks from a specific session |
| argument-hint | [disable|enable|list|show] [session-id] |
| allowed-tools | Read, Bash |
Manage the task-persist plugin, which auto-restores pending tasks from the prior session when /clear creates a new session.
When /clear fires, a SessionStart hook reads pending tasks from the most recent prior session and emits additionalContext instructing Claude to recreate them via TaskCreate/TaskUpdate. Because TaskCreate and TaskUpdate are pre-allowed in permissions.allow, restore happens with no user prompt.
/task-persist disable
Touches ~/.claude/tasks-snapshots/.disabled. The next /clear will not restore tasks. list/show still work while disabled.
/task-persist enable
Removes the .disabled flag to resume auto-restore.
/task-persist list
Lists recent session directories for the current repo from ~/.claude/tasks/ with pending-task counts and timestamps.
/task-persist show
/task-persist show <session-id>
Pretty-prints tasks from a specific prior session (default: most recent session with tasks).
For disable:
mkdir -p ~/.claude/tasks-snapshots
touch ~/.claude/tasks-snapshots/.disabled
echo "Task-persist disabled. Next /clear will not restore tasks."
For enable:
rm -f ~/.claude/tasks-snapshots/.disabled
echo "Task-persist enabled."
For list:
_GIT_ROOT=$(git -C "$PWD" rev-parse --show-toplevel 2>/dev/null || printf '%s' "$PWD")
TASKS_DIR="$HOME/.claude/tasks"
if [ ! -d "$TASKS_DIR" ]; then
echo "No task sessions found."
exit 0
fi
echo "Recent sessions (newest first):"
echo ""
for dir in $(ls -td "$TASKS_DIR"/*/ 2>/dev/null | head -20); do
dir="${dir%/}"
proj_file="$dir/.git-root"
[ ! -f "$proj_file" ] && continue
[ "$(cat "$proj_file")" != "$_GIT_ROOT" ] && continue
sid=$(basename "$dir")
json_count=$(ls "$dir"/*.json 2>/dev/null | wc -l | tr -d ' ')
pending=0
for f in "$dir"/*.json; do
[ -f "$f" ] || continue
status=$(jq -r '.status // ""' "$f" 2>/dev/null)
case "$status" in pending|in_progress|blocked) pending=$((pending + 1)) ;; esac
done
mtime=$(stat -f "%Sm" -t "%Y-%m-%d %H:%M" "$dir" 2>/dev/null || stat -c "%y" "$dir" 2>/dev/null | cut -d. -f1)
echo " $sid | $json_count tasks ($pending pending) | $mtime"
done
For show [session-id]:
_GIT_ROOT=$(git -C "$PWD" rev-parse --show-toplevel 2>/dev/null || printf '%s' "$PWD")
TASKS_DIR="$HOME/.claude/tasks"
TARGET_SID="${ARG}"
if [ -z "$TARGET_SID" ]; then
# Default: most recent session with *.json files for this repo
for dir in $(ls -td "$TASKS_DIR"/*/ 2>/dev/null); do
dir="${dir%/}"
proj_file="$dir/.git-root"
[ ! -f "$proj_file" ] && continue
[ "$(cat "$proj_file")" != "$_GIT_ROOT" ] && continue
json_files=("$dir"/*.json)
if [ ${#json_files[@]} -gt 0 ] && [ -f "${json_files[0]}" ]; then
TARGET_SID=$(basename "$dir")
break
fi
done
fi
[ -z "$TARGET_SID" ] && echo "No task sessions found for this repo." && exit 0
TARGET_DIR="$TASKS_DIR/$TARGET_SID"
if [ ! -d "$TARGET_DIR" ]; then
echo "Session not found: $TARGET_SID"
exit 1
fi
echo "Tasks for session: $TARGET_SID"
echo ""
for f in "$TARGET_DIR"/*.json; do
jq '.' "$f" 2>/dev/null
echo ""
done
Note on uninstall: Removing this plugin does not revert the
TaskCreateandTaskUpdateentries added topermissions.allowin~/.claude/settings.json. To remove them manually, edit that file and delete the two entries frompermissions.allow.