skel/.pi/skills/timeline-cleanup/SKILL.md
Delete low-value messages from the web timeline by keyword patterns. Protects messages with user-uploaded images. Optionally vacuums the DB afterward.
npx skillsauth add rcarmo/piclaw timeline-cleanupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Delete messages from the web chat timeline that match keyword patterns, then optionally vacuum the database to reclaim space.
PICLAW_STORE/messages.db) for rows matching the given patternsweb:* chats, this includes all session trees and branches--include-media is passed/post/{id}?cascade=true HTTP APIRun cleanup by importing the helper or using the CLI.
Defaults include a throttled delete loop (1100ms delay) with retries on HTTP 429 responses to avoid server-side rate limits.
import { cleanupTimeline } from "/workspace/.pi/skills/timeline-cleanup/cleanup.ts";
const result = await cleanupTimeline({
patterns: ["reload", "compaction"],
// dryRun: true, // Preview only
// includeMedia: false, // Skip messages with attachments (default)
// vacuum: false, // Vacuum DB after (causes restart)
// beforeRowid: 99999, // Only match messages before this rowid
// chatJid: "web:default", // Target chat
// maxLength: 300, // Only match messages shorter than this
// senderFilter: "web-agent", // Only match this sender
// throttleMs: 1100, // Delay between deletes (avoid rate limits)
// retryOn429: true, // Retry if rate limited
// maxRetries: 2, // Max retries for rate limits
});
bun run /workspace/.pi/skills/timeline-cleanup/cleanup.ts \
--patterns "reload,compaction,compacting" \
--before 5000 \
--dry-run
The cleanupAll() function runs all standard pattern groups in sequence. Use it for a full housekeeping pass:
import { cleanupAll } from "/workspace/.pi/skills/timeline-cleanup/cleanup.ts";
const results = await cleanupAll({ beforeRowid: 5000, dryRun: true });
| Group | Patterns | Sender | Max length |
|---|---|---|---|
| Reloads | reload, supervisorctl restart, restart-piclaw, local-install, bun pm pack | any | 500 |
| Compaction | compaction, compacting, auto-compact | any | 500 |
| Greetings (user) | exact: hey, hello, hi, Hello?, hey there, etc. | user | 30 |
| Agent intros | Hey! ..., Hello! ..., good to see you, ready to help | agent | 300 |
| Slash commands | lines starting with / | any | 50 |
| Slash responses | Unknown command:, Current model:, Switched...model, Switching...model, Model switched, Cycle model, Cycle thinking, Thinking level, Thinking set, Supports thinking | agent | 300 |
| One-word acks | exact: yes, ok, go, done, well?, so?, etc. | any | 30 |
| Transition filler | let me check, let me look, now let me, etc. | agent | 200 |
| Version bumps | bumped version, tagged v0., bump patch | any | 300 |
| Build/lint/test | make lint, make test, bun run build, pass...0 fail | any | 300 |
| Git operations | git add, git commit -m, git push, git status | any | 200 |
| Package installs | bun install, bun add, bun update, packages installed | any | 300 |
Vacuuming requires exclusive DB access. The cleanup function can:
/tmpThis causes a brief (~5s) interruption. Only use when significant space can be reclaimed.
PICLAW_STORE — message DB parent directory (default: /workspace/.piclaw/store)PICLAW_WEB_PORT — web server port (default: 8080)PICLAW_INTERNAL_SECRET / PICLAW_WEB_INTERNAL_SECRET — internal API authclose-of-day invokes the same cleanup strategy as an end-of-day sweep.messages tool actions (search, delete) for cleanup semantics where available.documentation
Resolve Teams or SharePoint document links to canonical metadata.
development
Search the web via SearXNG and optionally convert result pages to Markdown.
development
Search via SearXNG, fetch top results, and return quick summaries plus markdown.
testing
Fetch a user's recent tweets (tweets, replies, retweets) using Playwright + Nitter fallbacks and produce compact JSON/Markdown summaries.