codex-scoped-cleanup
Use in Codex when archiving or deleting native threads, or retiring worktrees, recovery copies, caches, and stale connections.
Skill by ririnto
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ririnto-codex-scoped-cleanup
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/codex-scoped-cleanup
What's inside
- Skill name
codex-scoped-cleanup- Description
- Use in Codex when archiving or deleting native threads, or retiring worktrees, recovery copies, caches, and stale connections.
- License
- MIT
- Instructions
- 80 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- app-server.md · references/
- native-attachments.md · references/
SKILL.md (first lines)
# Codex Scoped Cleanup Apply this procedure only in Codex and within the current cleanup authority. Route cleanup through the authorized resource owner using supported host operations. ## Authority And Native Lifecycle Record the selected resources, their owners, permitted operations, preservation requirements, and protected resources before cleanup. Treat archive authority, permanent-delete authority, attachment retirement, and physical removal as separate scopes. Require explicit human authority for permanent deletion of the exact affected scope. Preserve any action-time confirmation required by the selected tool, even when broader cleanup is already authorized. Do not infer Project, Session, or Chat deletion support from a Thread method. Before cleanup inventory or lifecycle changes, read [Owner-mediated resource lifecycle](references/app-server.md) unless already loaded completely. Use supported owner-controlled operations rather than editing authoritative SQLite, rollout files, or raw host state. Do not restart shared services or terminate unrelated workers to evade ownership guards. When an owner or supported operation is unavailable, preserve affected resources and report the exact limitation. Keep temporary private identities, paths, payloads, and logs out of published instructions and shared reports. ## Git Preservation Default to removing completed, unused resources when retained Git history preserves every required source change. Verify reachability from a retained branch, tag, or snapshot ref. A merged PR establishes preservation of its merged source changes. Do not rely solely on dangling objects, expiring reflogs, or an unspecified remote copy. Compare staged, unstaged, untracked, and required ignored content before removing a physical checkout. Preserve unique source, configuration, runtime storage, and database data outside Git. Preserve resources required for current work or continuation, even when their source is committed. Remove redundant recovery copies without creating another complete backup. ## Scoped Activity Evaluate each session or worktree independently. The parent project's recent activity does not prove that a particular worktree remains in use. Use the requested inactivity window when inactivity defines the cleanup scope. Retire verified completed, unnecessary resources within explicit authority without adding an age delay after completed handback. Do not treat recent timestamps alone as proof that a resource remains needed or is eligible for retirement. Include session events, compressed rollouts, running descendants, and exact worktree consumers when checking activity. Exclude the current session and running work. Read the latest request and result before treating an idle session as completed. Preserve unfinished, blocked, recurring, and explicitly retained work, including its continuation and recovery assets. Inspect affected descendants and every resource owner before changing a parent container. Stop when scope, descendant coverage, ownership, or preservation remains uncertain. Completed, unused Git-backed worktrees and recovery copies need no additional age delay. Preserve primary, shared, and pinned checkouts during generic task cleanup. ## Worktrees And Caches Have the authorized owner use supported worktree lifecycle tools or Git's worktree commands rather than direct directory deletion. Refresh ownership and working-tree state before removal. Do not force removal to bypass unique dirty or untracked content. Check exact process arguments, working directories, open handles, and active containers for the selected scope. Remove only isolated, unused, reproducible cache or build leaves. Preserve active shared caches and dependencies needed by current executions. Before deleting a quarantined cache, verify its inode, owner, and device. Adjust owned directory permissions only within the selected cache. Removing a child also requires write permission on its parent. Preserve hard-linked file contents and permissions shared with other checkouts. ## Thread Worktree Artifacts Before changing Worktree Artifact connections, read [Native Attachment Cleanup](references/native-attachments.md) unless already loaded completely. Treat physical checkout deletion and Thread attachment removal as separate operations. Have the authorized owner use supported archiving for physical retirement that requires retained recovery state. Have the owner use supported attachment removal for verified stale connections. Remove dangling active connections after verifying their paths are absent and their payloads contain no recovery state. Remove archived connections only after verifying preserved required content and no continued-use requirement. An archived checkout's absence alone does not establish that its connection is obsolete. Do not use the owning Thread's activity as a substitute for worktree-specific evidence. ## Acceptance Obtain the owner's fresh lifecycle, attachment, and filesystem readbacks as separate evidence. Verify removed connections through the owner's supported listing and confirm protected connections remain. Check that selected paths and temporary quarantine directories are absent after physical cleanup. Have the owner remove temporary payload copies, scripts, logs, and task-owned processes after verification. Report attachment counts separately from physical disk-space changes. Use measured volume availability rather than summing directory allocation as reclaimed space. Report source checks, owner-mediated readbacks, actual mutations, and model adherence as distinct evidence. Do not require production deletion to validate cleanup instructions.
From ririnto/workgraph, MIT.
More from ririnto/workgraph
- 0.569score
development
ririnto
Use when implementing, refactoring, debugging, or reviewing source code or maintained code examples.
SkillAFreshness: AClaude Code +9 - 0.569score
subagent-context
ririnto
Use when executing a bounded task as a Workgraph dispatch node.
SkillAFreshness: AClaude Code +9 - 0.565score
instruction-authoring
ririnto
Use when creating, editing, or reviewing SKILL.md, repository guidance files, role contracts, agent prompts, hook instructions, or supporting instruction…
SkillAFreshness: AClaude Code +9 - 0.564score
delivery
ririnto
Use in the main session for repository changes or authorized branch publication and integration.
SkillAFreshness: AClaude Code +9 - 0.564score
verification
ririnto
Use when running an application, reproducing reported behavior, or gathering acceptance evidence.
SkillAFreshness: AClaude Code +9 - 0.564score
workflow
ririnto
Use in Claude Code main sessions for dependent stages, expected follow-up phases, or explicit Workflow requests.
SkillAFreshness: AClaude Code +9 - 0.564score
writing
ririnto
Use when drafting, editing, or reviewing prose, Markdown documentation, or instruction text.
SkillAFreshness: AClaude Code +9 - 0.564score
main-agent-contract
ririnto
Use in the Workgraph main-session mode when orchestrating authorized outcomes, not as a dispatched node.
SkillAFreshness: AClaude Code +9 - 0.561score
astra-dual-review
ririnto
Use for an explicit cross-host review and adjudication request, ending with verified issue handoffs before implementation.
SkillAFreshness: AClaude Code +9 - 0.559score
principle-preserve-behavior
ririnto
Use when inlining values, restructuring control flow, or changing an expression's form where observable behavior must survive.
SkillAFreshness: AClaude Code +9 - 0.558score
principle-production-interfaces
ririnto
Use when adding helpers or abstractions, changing production code for tests, or deciding what tests may observe.
SkillAFreshness: AClaude Code +9 - 0.558score
memory-maintenance
ririnto
Use before creating, editing, merging, or deleting durable memory records or their index.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 5
- Last commit (this folder)
- Oct 10, 2026 (19 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ririnto/workgraph
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ririnto
- 0.569score
development
ririnto
Use when implementing, refactoring, debugging, or reviewing source code or maintained code examples.
SkillAFreshness: AClaude Code +9 - 0.569score
subagent-context
ririnto
Use when executing a bounded task as a Workgraph dispatch node.
SkillAFreshness: AClaude Code +9 - 0.565score
instruction-authoring
ririnto
Use when creating, editing, or reviewing SKILL.md, repository guidance files, role contracts, agent prompts, hook instructions, or supporting instruction…
SkillAFreshness: AClaude Code +9 - 0.564score
delivery
ririnto
Use in the main session for repository changes or authorized branch publication and integration.
SkillAFreshness: AClaude Code +9 - 0.564score
verification
ririnto
Use when running an application, reproducing reported behavior, or gathering acceptance evidence.
SkillAFreshness: AClaude Code +9 - 0.564score
workflow
ririnto
Use in Claude Code main sessions for dependent stages, expected follow-up phases, or explicit Workflow requests.
SkillAFreshness: AClaude Code +9
Cite this page
codex-scoped-cleanup skill. Agent Mart. https://agentmart.dev/skills/ririnto-codex-scoped-cleanup (last updated 2026-10-24)