Agent skill
close-of-day
Install this agent skill to your Project
npx add-skill https://github.com/rcarmo/piclaw/tree/main/skel/.pi/skills/close-of-day
SKILL.md
Close of Day
A one-shot maintenance skill to:
- Run
situateand refresh daily notes for the selected chat scope.- for
web:*, this now means all web session trees (roots plus branches), not just the currently visible tab
- for
- Run a restic backup before cleanup.
- Clean up low-value timeline messages using the unified
messagestool actions. - Immediately read and follow
/workspace/.pi/skills/situate-daily-notes/SKILL.mdas a required sub-step. - Finish the daily-note summaries before reporting completion.
It is intended to be run once per day after work.
Important: close-of-day is not complete when the report is generated or the cleanup finishes. You must continue straight into the daily-notes workflow in the same task.
What it does
- Runs:
/workspace/scripts/situate.tswith--update-notes- for
web:*, transcript previews in the generated report are linearised per session tree rather than globally interleaved
- for
- optional restic backup (
/workspace/.piclaw/restic/backup.sh) before cleanup starts timelinecleanup groups: reloads, compaction, greetings, slash command chatter, command responses, one-word acks, transitions, version/build/git noise and related noise- then the
situate-daily-notesworkflow immediately afterwards
- Uses the
messagestool actions internally:search+deletefor cleanup candidate discovery/removalsearch+getfor the daily-notes summarisation work
- Defaults to dry-run for cleanup so you can review counts before deleting.
- Supports a final live-delete pass with attachment guard disabled via
--include-media.
Required chaining
After cleanup, explicitly read and follow:
/workspace/.pi/skills/situate-daily-notes/SKILL.md
Do not stop at the report. The close-of-day workflow only ends after the relevant daily note files have been updated.
Usage
bun run /workspace/.pi/skills/close-of-day/close-of-day.ts \
--days 1 \
--chat-jid web:default \
--report /workspace/exports/close-of-day.md \
--cleanup
Optional flags:
--dry-run— only report what would be deleted (default:true).--apply— perform deletions (instead of dry-run).--days <n>— how many days to include in the situation report and cleanup search window.--since <iso8601>— override window start for cleanup.--chat-jid <jid>— target chat context (defaultweb:default).--report <path>— path for the generated situation report (default/workspace/exports/close-of-day-<DATE>.md).--include-media— allow delete operations to remove messages that still have attachments.--skip-backup— skip restic backup.--backup-cmd <command>— override backup command (default/workspace/.piclaw/restic/backup.sh).--situate-only— skip cleanup.--cleanup-only— skip the situate step.
Example
# Preview cleanup impact only
bun run /workspace/.pi/skills/close-of-day/close-of-day.ts --days 1
# Do the cleanup, including attachment-bearing messages
bun run /workspace/.pi/skills/close-of-day/close-of-day.ts --days 1 --cleanup --include-media --report /workspace/exports/close-of-day-2026-03-12.md
Completion criteria
Do not report "day closed" until all of the following are done:
- situation report generated
- backup run (unless explicitly skipped)
- cleanup run
- relevant daily notes updated in the same session
For the daily-notes phase:
- follow the
situate-daily-notesskill immediately after cleanup - use the unified
messagestool to gather message ranges and context - when
web:*session trees diverged, preserve that separation in the summary instead of blending branches together - update
notes/daily/YYYY-MM-DD.md - set
summarised_untilto the last covered message timestamp
Notes
- Cleanup deletes in batches with
messagestool semantics:- default run is dry-run
- attachment-bearing threads are skipped unless
--include-mediais set - cleanup resolves the full session scope (all web session trees) so branch chats are cleaned alongside the anchor chat
- The generated close-of-day report is an intermediate artifact for the daily-notes step, not the final deliverable.
- The situate/daily-notes flow now also refreshes
notes/daily/*.agent.jsonplus rolling files undernotes/agent-memory/; those should be left consistent before the workflow is considered done. - For ad-hoc one-off cleanup groups, use
timeline-cleanupdirectly.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
autoresearch-create
Set up and run an autonomous experiment loop for any optimization target. Gathers what to optimize, then starts the loop immediately. Use when asked to "run autoresearch", "optimize X in a loop", "set up autoresearch for X", or "start experiments".
portainer-container-compare-chart
Compare two containers using native portainer tool data collection and render SVG/CSV outputs.
proxmox-guest-compare-chart
Compare two Proxmox guests using native proxmox tool data collection and render SVG/CSV outputs.
schedule
Schedule a task to run later or on a recurring basis. Prefer the schedule_task tool; fallback to IPC only if needed.
reload
Reinstall piclaw from workspace source and force-restart the running process. Use after making code changes to piclaw.
send-message
Send a message to the chat immediately without waiting for the current task to finish. Useful for acknowledging requests or sending progress updates while working.
Didn't find tool you were looking for?