the9ball/.dotfiles/task-continuity-cleanup
Claude Code and agent skill by the9ball/.dotfiles
- community
Checking that the SKILL.md file is still in the repository.
List and permanently delete stale Markdown memo files directly under explicitly selected `.task-continuity` directories using filesystem modification times only. Use only when the user explicitly asks to inspect, clean up, prune, or delete old task-continuity memo files. Never invoke for ordinary task-continuity maintenance, merely because memos are old, or on a schedule.
Install
npx vskill@latest install the9ball/.dotfiles/task-continuity-cleanupSKILL.md
The same SKILL.md was published earlier as the9ball/.dotfiles/task-continuity-cleanup.
Task Continuity Cleanup
Treat task-continuity memos as disposable working-state caches. Remove stale memos only through an explicit, previewed cleanup operation.
When changing candidate selection or deletion semantics, read references/design-rationale.md first. Do not load it during routine cleanup.
Resolve the cleanup scope
Accept zero or more user-selected paths and a staleness threshold in days. Use 30 days by default. When no path is selected, use the current Git root, or the current working directory when no Git root exists. Require the threshold to be a finite, non-negative number; reject an invalid or negative value.
For each selected path:
- Resolve it to an absolute path.
- If its final component is
.task-continuity, use it directly. Otherwise
append .task-continuity and resolve again.
- Require the resulting directory's final component to equal
.task-continuity exactly.
- Require the resulting directory to exist. Report a missing directory as a
selected-path error, never as an empty or already-clean result.
- Reject a symbolic link, reparse point, junction, or non-directory target.
Never search recursively for other .task-continuity directories. Multiple explicitly selected directories are allowed.
Build a metadata-only preview
Determine the cutoff in UTC. A file is stale only when its filesystem modification time is strictly earlier than now - threshold; do not round to calendar dates.
Inspect only direct children matching *.md. Do not recurse, follow links, or read file contents or frontmatter. Require each candidate to be a regular file and not a symbolic link or reparse point. Collect only its absolute path, modification time, and size. Preserve the full-precision machine timestamp captured during preview, such as filesystem ticks or nanoseconds, for later comparison. Never reconstruct that value from human-readable display text.
TASK_CONTINUITY_BOUND_MEMO_PATH, when present in hook context, is model-visible context rather than a process environment variable. During mixed-version rollout, accept TASK_CONTINUITY_ACTIVE_MEMO_PATH only as a legacy alias when the bound-path label is absent. These labels provide a memo path only; they do not indicate lifecycle status or approval. Normalize absolute paths before comparison; if both labels are present and differ, fail closed and do not continue cleanup. Exclude the exact normalized bound file from the preview. If a helper command performs enumeration, pass the exclusion path to it explicitly. Do not infer a replacement exclusion when both labels are absent.
Do not read or write any task-continuity session registry. Legacy status fields, stale references, ownership records, and fixture installations are outside this skill's scope.
Show the selected directories, threshold, cutoff, candidate count, and a list containing path, size, UTC modification time, and local modification time with an explicit UTC offset. Display formatting must not replace the preserved machine timestamp. If there are no candidates, report that no cleanup is needed and stop.
Obtain deletion approval
Ask the user to approve the exact previewed candidate set before deleting anything. Approval applies only to the displayed candidates. Re-preview after the user changes the directories, threshold, or candidate set.
A .allow-write marker authorizes task-continuity runtime writes; it never authorizes cleanup or deletion.
Delete approved candidates
Immediately before deleting each approved path, inspect its metadata again. Delete it only when all of the following remain true:
- It is the same direct child of the approved
.task-continuitydirectory. - It still matches
*.md. - It is still a regular non-symbolic, non-reparse-point file.
- Its full-precision machine modification time and size exactly match the
values captured for the approved preview.
- Its modification time is still strictly older than the cutoff.
- It is not the normalized current-session memo exclusion.
Classify a candidate whose metadata changed as skipped_changed; do not read it to decide whether deletion is safe. Permanently delete eligible files without moving them to trash or an archive.
Never delete .allow-write, .gitignore, directories, non-Markdown files, or files outside the exact approved directories. Do not modify registries even when they continue to reference deleted memos.
Report deleted, skipped, and failed paths separately. Include the error for each failure and do not claim full success after a partial failure.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinglink-targets/agents/skills/task-continuity-cleanup/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/the9ball/.dotfiles/task-continuity-cleanup)