Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Guru Cleanup Task Resources?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/castbox-guru-cleanup-task-resources)
---
name: guru-cleanup-task-resources
description: Clean sealed Guru-owned resources or explicitly selected manual and machine-handoff targets.
---
# Guru Cleanup Task Resources
Before substantive output, read `.trellis/spec/workflow/clear-technical-writing.md`
in full and apply it within this entry's existing scope. Until that read succeeds,
use only short progress messages or concrete missing-dependency diagnostics.
State the current action or missing item; make no unverified claim. If the file
cannot be read, pause substantive output, then read it and resume the same
request when available. No additional approval is needed for that recovery.
Read `.trellis/spec/workflow/workflow-contract.md#interaction-budget` before
any confirmation, choice or clarification. This Skill retains its own action
plan, confirmation boundary and execution/recovery contract.
Current Task archive verification uses stable identity/generation and actual
public Closure together with committed Finish summary/target ancestry, never
Task development status. Keep exact sealed/manual resource selection and
current cleanup confirmation unchanged. Failed cleanup preserves completed
Task and delivered facts; original business trees and provider resources are
not implied cleanup targets.
## Public invocation and JSON carriers
For `normal`, `select_explicit_cleanup_targets`, and `machine_handoff`, pass
`--input` and `--semantic-result` as paths to separate regular UTF-8 files.
Each file contains one JSON object and must not itself be a symlink.
This command does not read inline JSON or stdin, including the `-` shorthand.
Absolute paths are accepted. Relative paths resolve first from `--root`
(the current directory when omitted), then from this package.
After completing this profile's semantic review and any required deletion
confirmation, invoke the installed public wrapper from a retained checkout
outside the selected deletion set:
```bash
bash .trellis/guru-team/skills/packages/guru-cleanup-task-resources/scripts/invoke.sh \
--root . --input /path/to/cleanup-input.json \
--semantic-result /path/to/cleanup-semantic.json --json
```
Add `--confirmed-cleanup` only under the deletion-confirmation boundary below.
The file paths above are placeholders for caller-authored input and judgment;
package examples describe their shapes and do not supply current results.
Normal Cleanup consumes only ResourceSealRefDTO and resolves Guru-owned
incarnations from the common-dir ledger. It preserves caller-owned and unknown
resources. Missing terminal ownership returns `manual_cleanup_required` with
call-local live candidates; it does not reconstruct or persist ownership.
For that route, the exact common-dir Finish result identifies the archived
task and summary in its target commit; the retained invocation checkout may
still be behind that commit.
`select_explicit_cleanup_targets` first accepts an empty
`selected_candidate_ids` list with the exact terminal Finish identity and
returns the live candidates. Its next call accepts only selected candidate IDs
from that result.
Machine handoff has a separate profile.
For #454, the former public `manual` profile and `manual_selection_required`
exit are retired without aliases. Callers replace `selected_targets` with
`selected_candidate_ids` from the current `manual_cleanup_required` output.
The changed input, semantic-result and aggregate-output schema IDs are 3.0;
the unchanged normal and machine-handoff output shapes retain their IDs.
Invoke from a retained checkout of the same Git common-dir that is outside
the selected deletion set (`--root` may name that checkout). After Finish in a
linked task worktree, first move the Cleanup invocation to the retained
checkout. If none is available, stop for manual disposition; do not attempt
to remove the invoking checkout.
Every deletion checks exact Git ref/HEAD and registered worktree state again.
An absent resource converges through the same ledger resolution. Normal cleanup
removes linked worktrees, then local branches, then remote branches under exact
HEAD checks. A moved or dirty target blocks the affected action. The shared
ledger resolves the complete Guru-owned pending set only after deletion.
Caller-owned retained resources are never included in normal deletion. An exact
common-dir result receipt lets the same Finish seal input recover the same
`cleaned` output after successful deletion and lost output; an unrelated stale
inventory still blocks.
Candidate IDs bind repository common-dir, resource kind/ref, registered checkout
path where applicable, and live HEAD. The AI reviews the selected IDs and
rediscovers every resource, requiring the same repository, identity, HEAD,
registered worktree state, clean worktree and current non-use. It then shows
an exact deletion plan naming each selected branch, worktree path or remote ref,
and gets a fresh confirmation in the current dialogue before invoking deletion.
Unselected candidates remain untouched. A stale candidate, dirty worktree or
current resource returns `blocked`. A retained caller-owned resource can be
selected explicitly, but normal Cleanup never deletes it. Selection does not
assign Guru ownership or create historical ownership. Current branch bindings
in the Git common-dir block deletion even if the invoking checkout contains
only an older archived task generation. Machine handoff reads a released source inventory and resolves only
its Guru-owned pending local resources. Both require independent deletion
confirmation and can reread a recorded result after output loss. The active
#434 workflow invokes normal Cleanup after Finish; this package does not
choose the global consumer route.
Read `.trellis/spec/workflow/companion-scripts.md#intermediate-command-stdout-10` for receipts and `result` projection.
Only the declared public invocation emits a formal exit; follow its consumer and positive-exit conditions.
Files in this skill
SKILL.md1.4 KB
commands.json1.1 KB
examples/public-blocked-output.json22 B
examples/public-invocation-error.json104 B
examples/public-output.json22 B
examples/public-remaining-resources-output.json193 B
examples/self-authoring.json47 B
interface.json6.6 KB
schemas/public-blocked-output.schema.json227 B
schemas/public-cleaned-output.schema.json227 B
schemas/public-input.schema.json908 B
schemas/public-output.schema.json774 B
schemas/public-remaining-resources-output.schema.json542 B