workflow-end
Gracefully closes workflows and resets state by syncing knowledge and running final checks.
Install
mkdir -p .claude/skills/workflow-end && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12095" && unzip -o skill.zip -d .claude/skills/workflow-end && rm skill.zipInstalls to .claude/skills/workflow-end
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
[Process] Use when you need to end the active workflow and clear state.Key capabilities
- →Clear workflow tracking state
- →Print a developer comprehension recap of workflow changes
- →Perform integration-test coverage checks
- →Synchronize knowledge graphs if `.code-graph/` exists
- →Mark the current task as completed
- →Run spec ↔ TDD-test sync gate
How it works
The skill closes the active workflow by clearing tracking, printing a recap of changes, and performing checks like integration-test coverage and spec-TDD test synchronization.
Inputs & outputs
When to use workflow-end
- →Finish a task session
- →Close current workflow
- →Reset state after completion
About this skill
<!-- PROMPT-ENHANCE:STEP-TASK-ANCHOR:END -->[BLOCKING] Execute skill steps in declared order. NEVER skip, reorder, or merge steps without explicit user approval. [BLOCKING] Before each step or sub-skill call, update task tracking: set
in_progresswhen step starts, setcompletedwhen step ends. [BLOCKING] Every completed/skipped step MUST include brief evidence or explicit skip reason. [BLOCKING] If Task tools are unavailable, create and maintain an equivalent step-by-step plan tracker with the same status transitions.
Quick Summary
Goal: Close the active workflow with evidence-backed coverage, spec-sync, graph, and baseline checks (reusing the run's own coverage and spec-sync evidence when it exists); deliver a diff-gated one-way comprehension recap unless /watzup follows and owns it, then retain per-session recovery state until explicit /clear (which alone deletes it).
Summary:
- Purpose: Penultimate closure step before
/watzup: close workflow evidence, trigger fresh detection next prompt, and explain changes without a diff reread. - Main steps (ordered): (0) outcome-gate evidence check — block on missing evidence; (1) integration-test coverage check (reuse the run's cited coverage evidence, else scan); (2) spec ↔ TDD-test sync gate (
spec-tdd-test-sync-gate) BEFORE task-completion verification (reuse a fresh in-runspec [mode=sync]result, else run it); (3) sync graph if.code-graph/exists; (4) verify owned baseline and classify unowned/ambiguous changes; (5) verify preceding tasks; (6) print diff-gated recap (what / purpose / how / why) unless/watzupfollows; (7) close only exact owned baseline and verifyclosed/deletionFailures; (8) announceWorkflow [name] completed; (9) confirm state retained until explicit/clear. - Blocking gates: missing evidence for any outcome gate (step 0) → refuse to close and name the gap; coverage gap OR unadjudicated spec-vs-code drift → MUST surface via
AskUserQuestion; NEVER silent-skip or reportcompletedwhile drift is unadjudicated. Baseline closure requires qualified, user-accepted ambiguity, or explicit N/A. - Modes and terminal behavior: recap only with a diff; recap one-way/no quiz/no block. Completion is model-driven only after all tasks, sync recorded synced-or-accepted-as-is, and baseline closure qualified, user-accepted, or N/A; per-session state is retained until explicit
/clear(which alone deletes it); no hook clearsCK_TMP_DIR/workflow/{sessionId}.jsonexceptsession-initon explicit/clear.
Workflow:
- Detect — classify scope and target artifacts.
- Execute — perform required evidence-backed steps.
- Explain — print diff-gated recap (skip only with no changes, or when
/watzupfollows and owns it). - Verify — confirm constraints, output quality, and completion evidence.
Key Rules:
- MUST ATTENTION first check evidence for every outcome gate (step 0);
review-convergedrunsreview-receipt.cjs checkand reads its JSON, or accepts a cited review report logged as areview-reportdeviation-log line. Missing evidence blocks the close. - MUST ATTENTION when the workflow produced a diff and no
/watzupoccurrence follows, print the comprehension recap (what changed / purpose / how it works / why) — NEVER fully skip it when changes exist and nothing else owns the recap. A following/watzupowns it (its Session summary); recordcovered by watzup— if that/watzupis later skipped, the recap duty stays withworkflow-end: print it at that point. - MUST ATTENTION reuse the run's own evidence for steps 1–2 only when it is cited and fresh (step 0 evidence names the report or occurrence, no source/test/spec edit since); with no such evidence — standalone
/workflow-end, or the run skipped that step — run the full check. - MUST ATTENTION the recap is one-way — NO quiz, NO teach-back, NEVER blocks. Keep it concise and complete enough to explain the workflow result without routing to another skill.
- MUST ATTENTION run the spec ↔ TDD-test sync gate (
spec-tdd-test-sync-gate) BEFORE task-completion verification when behavior-changing files are in the diff — the workflow MUST NOT report completed while a behavior-vs-spec divergence is unadjudicated; surface unsynced drift viaAskUserQuestion, never silent-close. - MUST ATTENTION close the workflow-owned baseline before announcing completion: run the bounded
workflow-baseline.cjs reportfor the recorded run ID, classify owned versus unowned changes, and reportAMBIGUOUSfor unowned paths, endpoint-only ownership, or intermediate commits. Persist the final report and resolve the recap step (printed, or skipped asno changes to explain/covered by watzup) before runningworkflow-baseline.cjs closefor that exact run; verifyclosedanddeletionFailures, preserve any parent run, and never use broad cleanup. Never replace this withgit diffattribution, claim every dirty file, restore user work, or read expired/sensitive snapshots. - MUST ATTENTION keep claims evidence-based (
file:line) with confidence >80% to act. - MUST ATTENTION keep task tracking updated as each step starts/completes.
- MUST ATTENTION define success criteria before execution and loop until observable verification passes.
- MUST ATTENTION when creating/reviewing specs or tests, name
Business Intent / Invariant Guardedor the protected business intent/invariant and ensure the test would fail if that intent breaks. - NEVER skip mandatory workflow or skill gates.
When This Runs
This skill closes workflow state. In workflows with /watzup, it runs after final verification/docs and before /watzup, which owns the recap; with no /watzup after it, print the one-way recap itself. Then retain per-session tracking until explicit /clear.
NOT for: manual mid-workflow invocation; switch via /start-workflow.
What To Do
- Outcome-gate evidence check (FIRST step, before anything else; BR-GWF-03). Read the run's
outcomeGatesfrom its Tier-2 manifest ([]→ recordN/A — no outcome gates declared). Cite evidence for every gate; a gate whosewhendoes not hold isN/Awith that reason. Missing evidence for any gate blocks the close: keep this taskin_progress, name the gate and the missing evidence, and suggest the step that produces it.review-converged: runnode .claude/hooks/lib/review-receipt.cjs check(default targetworktree) and read its JSON, not its exit code (it exits 0 when no receipt matches).ERRORblocks.CLEANpasses (nothing to review).CHANGEDwith a non-nullreviewpasses (a receipt); askipreceipt alone is not a receipt.CHANGEDwithreview: nullpasses only when the run cites the review report written by the occurrence that satisfies this gate (a step whose skill is in the gate'soutcomeGates[].satisfiedBy, e.g.workflow-review-changes,pbi --mode=revieworintegration-test --mode=review; an existing file under the project, e.g. intmp/reports/): append<that occurrence-id> · review-report · <report path>to the run's deviation logtmp/workflow-runs/<runId>/skips.mdand continue — never block or ask when a report is cited. Read the report's final status and compare its time with the run's last change-producing occurrence: when the final status is not converged/PASS, or the report predates that occurrence, the line's evidence says so (<report path> — not converged: <final status>or<report path> — stale: predates <occurrence-id>) and the close message repeats it. Neither a receipt nor a cited report → block, name the gap, and suggest running the review. When the close rests on a report, the close message states that a commit still needs the receipt (/workflow-review-changes --fix-loopmints it). On a host that cannot run the command, the cited report is the evidence, logged the same way — say so.tests-pass: cite the test command and its output; those tests cover every behaviour the run changed and ran green in this run (BR-GWF-15). Unrelated green tests are not evidence. The green run must be on the final tree: an edit to any source or test file after the cited run invalidates it, so re-run the verify (SYNC:verify-last-order) before closing. Also cite the mutation-check result (mutants killed n/n, orN/A — reason); a code-changing run with neither is missing evidence.spec-synced: cite the spec-sync diff, or a "no behavior change" statement with the diff stat.root-cause-traced: cite the root-cause trace (file:line) from the investigation report.plan-approved: cite the workflow's declared plan approval evidence, such as/plan --mode=validate, an explicit user decision, or another registry-declared approval gate.run-closed: proved by steps 4–7 of this skill; confirm at step 9.- Plan checklist rows (optional evidence input, only when a
/plan --mode=executeoccurrence ran nested in this run AND itsplan.mdcarries a## Quality Gates & Concerns Checklist; otherwise recordN/A — no plan checklistand add no gate): read that checklist and close each row the execute walk recordedPENDING-PARENT: <step> — evidence expected: …using the evidence cited for the gates above (test run, mutation result, review receipt or report). A row whose evidence is present →PASS; a row whose evidence is missing or failed →FAIL, which blocks the close like any missing gate evidence: name the row and suggest the step that produces it. A nested execute run covers one plan phase, so also scan the same checklist for rows still recordedDEFERRED-BY-PLAN: phase <n>at close: name them asunfinished plan phases: <n…>and treat them like missing gate evidence — the close is refused and surfaced viaAskUserQuestion(Option A: "Continue the remaining phases" (Recommended); Option B: "Accept as-is — I will record the
Content truncated.
When not to use it
- →For manual invocation mid-workflow
- →When there are no changes to explain in the recap
- →When the spec ↔ TDD-test sync gate is not needed
Limitations
- →Recap depth is throttled by `codingLevel`
- →Recap is one-way and never blocks
- →Workflow must not report `completed` while drift is unadjudicated
How it compares
This skill provides a structured and gated workflow closure with a developer-focused recap and explicit verification steps, unlike simply ending a task without state management or change explanation.
Compared to similar skills
workflow-end side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| workflow-end (this skill) | 0 | 3mo | Review | Intermediate |
| linear | 10 | 4mo | No flags | Beginner |
| zapier-workflows | 11 | 10mo | Review | Beginner |
| attio-skill-generator | 7 | 9mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by duc01226
View all by duc01226 →You might also like
linear
lobehub
Linear issue management guide. Use when working with Linear issues, creating issues, updating status, or adding comments. Triggers on Linear issue references (LOBE-xxx), issue tracking, or project management tasks. Requires Linear MCP tools to be available.
zapier-workflows
davila7
Manage and trigger pre-built Zapier workflows and MCP tool orchestration. Use when user mentions workflows, Zaps, automations, daily digest, research, search, lead tracking, expenses, or asks to "run" any process. Also handles Perplexity-based research and Google Sheets data tracking.
attio-skill-generator
kesslerio
Generate use-case-specific Attio workflow skills from templates. Use when creating new skills for lead qualification, deal management, customer onboarding, or custom Attio workflows.
automation-brainstorm
MacroMan5
Interactive workflow design advisor for Power Automate, n8n, Make, Zapier and other platforms. Guides users through planning automation workflows with smart questions about triggers, actions, data flow, and error handling. Uses research sub-agent to find best practices and generates detailed implementation plan. Triggers when user mentions "create workflow", "build flow", "design automation", "need ideas for", or describes workflow requirements without having a complete design.
daily-briefing
anthropics
Start your day with a prioritized sales briefing. Works standalone when you tell me your meetings and priorities, supercharged when you connect your calendar, CRM, and email. Trigger with "morning briefing", "daily brief", "what's on my plate today", "prep my day", or "start my day".
jira
davila7
Use when the user mentions Jira issues (e.g., "PROJ-123"), asks about tickets, wants to create/view/update issues, check sprint status, or manage their Jira workflow. Triggers on keywords like "jira", "issue", "ticket", "sprint", "backlog", or issue key patterns.