/workgraph:codex-scoped-cleanupfrom workgraph
Use in Codex to archive or delete native threads or retire worktrees, recovery copies, caches, and stale connections.
Ships in workgraph. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this procedure only in Codex. Work through the authorized resource owner and supported host operations.
Before cleanup, record the following in the owner's private temporary receipt:
Keep archive, permanent deletion, attachment retirement, and physical removal as distinct scopes. Require explicit human authority for permanent deletion of the exact scope. Honor tool-required action-time confirmations. Thread methods establish no Project, Session, or Chat deletion support.
Do not edit authoritative SQLite, rollout files, or raw host state. Do not bypass ownership guards by restarting shared services or killing unrelated workers. Exclude private IDs, paths, payloads, and logs from publications and shared reports.
Find owners via supported inventory and controls, not pane focus, membership, or idleness. If owner access or supported operations are unavailable, preserve resources and report the exact limit. Verify each installed operation's type support, permissions, scope, and preservation effects before mutation. Request/result controls or other-version source cannot prove installed lifecycle support. Historical transport research grants no cleanup interface or fallback authority.
Send the owner this scope, affected descendants, and required readbacks. Await existing requests and collect results through supported controls. Neither submission nor settled agent state proves completion. Create no permanent cleanup poller or scheduler.
Inventory active and archived IDs, not titles, through complete pagination with unchanged filters. Check provider/source/project/section defaults and remove unrelated search or working-directory filters. Pass opaque continuations unchanged, even after empty pages. Repeated cursors, failed pages, or missing coverage leave inventory incomplete.
Cover all affected owners and descendants, including live children and persisted children without user messages. Check for omitted ephemeral children or failed spawn links. Include parents omitted from descendant listings. Preserve parents of protected descendants or unverified subtrees, including interactive-only or incomplete listings.
Verify completion and continuation from supported history/metadata, including latest request and result. Empty summaries and idle, loaded, unloaded, archived, or old Threads prove neither completion nor sole writer ownership. Check live turns/descendants, pending operations, guards, and external process consumers. Refresh exact IDs, ownership, and working-tree state immediately before mutation. Serialize each resource's writes and stop on unexplained concurrent changes or uncertain scope, subtree, ownership, or preservation.
Remove completed, unused resources by default when retained Git history preserves required source. Verify reachability from retained branches, tags, or snapshot refs. Merged PRs preserve their merged source. Do not rely on dangling objects, expiring reflogs, or unspecified remote copies. Compare staged, unstaged, untracked, and required ignored content before checkout removal. Preserve unique source, configuration, runtime storage, and database data outside Git. Preserve needed evidence, contracts, associations, and recovery assets before container removal. Check fork-history and other consumers beyond attachments. Remove redundant recovery copies without another full backup.
Evaluate sessions individually and worktrees independently of project or owning Thread activity. Apply requested inactivity windows only when they define scope. Retire verified completed, unnecessary resources within explicit authority without age delays after handback. Recent timestamps alone prove neither continued need nor retirement eligibility. Check session events, compressed rollouts, running descendants, and exact worktree consumers. Exclude the current session and running work. Keep current, unfinished, blocked, recurring, explicitly retained, and continuing work and recovery assets, even if committed. Preserve primary, shared, and pinned checkouts during generic task cleanup.
Verify recoverable conversation state before archive. Conversation deletion does not prove checkout, GitHub object, or Cloud filesystem removal. Archive/delete can stop runtimes before persistent changes or a protected descendant's later refusal. Use supported owner release for live workers and writer conflicts. Honor owner/writer errors without changing control paths or killing workers.
Record runtime teardown, archive moves, deletion, attachments, and checkout state separately. After error, interruption, or timeout, inspect owner results and fresh state of all affected IDs and descendants before retrying. Check for partial preparation or file removal despite errors or absent notifications. Retry only remaining authorized work after changed evidence with a bounded exit condition, never confirmed successes.
Verify archive against fresh complete inventories and preflight IDs: each ID must leave active and appear archived. Reconcile descendant outcomes despite root acknowledgement or success. Use only supported owner restore for authorized recovery. Verify deletion with exact-ID reads and fresh active/archived inventories covering every affected ID. Distinguish verified absence from permission, connection, or storage failures. Verify protected resources and associations remain accessible after each batch. Report permanent deletion as irreversible unless a supported recovery path was verified beforehand. Retain receipts until verification and required recovery finish.
Before archiving, restoring, or removing worktrees or caches, read Worktree and cache cleanup unless fully loaded.
For Worktree Artifact connection changes, read Native Attachment Cleanup unless fully loaded.
Obtain fresh owner lifecycle, attachment, and filesystem readbacks separately. After verification, have the owner remove temporary payload copies, scripts, logs, and task-owned processes. Report attachment counts separately from physical disk-space changes. Measure reclaimed space by volume availability, not summed directory allocation. Distinguish source checks, owner readbacks, mutations, and model adherence. Do not require production deletion to validate these instructions.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ririnto/workgraph --plugin workgraph6 skills in this plugin
/deliveryUse in main for repository changes, branch publication, or integration./developmentUse for source work, application runs, behavior reproduction, or acceptance evidence./main-agent-contractUse in the Workgraph main-session mode when orchestrating authorized outcomes, not as a dispatched node./memory-maintenanceUse before creating, editing, merging, or deleting durable memory records or their index.