원클릭으로
wiki-cleanup
// Detect + remove low-quality pages from a wiki vault (low confidence, agent memory dumps, per-agent overflow). Default dry-run; archives every deletion; idempotent.
// Detect + remove low-quality pages from a wiki vault (low confidence, agent memory dumps, per-agent overflow). Default dry-run; archives every deletion; idempotent.
List the recurring cron tasks the orchestrator has scheduled FOR you — call before self-scheduling so you don't create duplicates that fire N× reports.
Schedule a future check-in that creates a WorkItem for you or another agent at a specific time (one-shot or bounded recurring).
Query standard operating procedures relevant to your current context or task.
Author or update a custom SOP (a reusable procedure / playbook) for your team.
Read your team's norms (operating agreements — canDelegate, escalation, rules of engagement) relevant to the current moment.
Propose or update a team norm (an operating agreement — canDelegate, escalation, rules of engagement) for your team.
| name | Wiki Cleanup |
| description | Detect + remove low-quality pages from a wiki vault (low confidence, agent memory dumps, per-agent overflow). Default dry-run; archives every deletion; idempotent. |
| version | 1.0.0 |
| category | knowledge |
| skillType | claude-skill |
| assignableRoles | ["orchestrator","team-leader"] |
Removes low-quality pages from a wiki vault. Origin: the 2026-05-27 migrate pass dumped every agent's memory.json roleKnowledge[] entries as their own wiki page (~3,277 pages across 6 project vaults). Many are stream-of-consciousness daily memory rather than team-level patterns. This skill identifies + deletes them safely.
Walks <vault>/llm-curated/**/*.md, parses each page's frontmatter, and returns the list of pages flagged by at least one cleanup rule. No filesystem mutation. Use this to eyeball what would be deleted before running apply.
bash execute.sh --vault /Users/me/proj/.crewly/wiki
bash execute.sh --vault /Users/me/proj/.crewly/wiki --min-confidence 0.4
bash execute.sh --vault /Users/me/proj/.crewly/wiki --max-per-agent 20
Output:
{
"candidates": [
{ "relPath": "llm-curated/patterns/x.md", "reasons": ["confidence 0.3 < 0.5"], ... }
],
"scannedCount": 526,
"summary": { "lowConfidence": 412, "agentMemoryDump": 380, "perAgentCapped": 18 },
"truncated": false
}
Deletes the explicit --pages list and archives each page's body + frontmatter to <vault>/.wiki-cleanup-archive.json. The migrate manifest (.migration-state.json) is deliberately left intact so that wiki-migrate --apply sees "already migrated" for the cleaned-up sourceIds and skips re-import. Touching the manifest would break that idempotence and the page would resurrect on the next bridge tick (the 2026-05-28 cleanup-then-migrate-resurrection bug).
bash execute.sh --vault /Users/me/proj/.crewly/wiki \
--apply \
--pages "llm-curated/patterns/a.md,llm-curated/patterns/b.md"
Output:
{
"deleted": ["llm-curated/patterns/a.md", "llm-curated/patterns/b.md"],
"skipped": [],
"archivePath": "/Users/me/proj/.crewly/wiki/.wiki-cleanup-archive.json",
"manifestEntriesInvalidated": 2
}
| Rule | Default | Disables via | What it catches |
|---|---|---|---|
--min-confidence FLOAT | 0.5 | --min-confidence 0 | Pages with frontmatter confidence < threshold. Migrate sets this when the classifier was uncertain — usually correlates with low-quality content. |
| (drop agent memory dumps) | ON | --no-drop-agent-memory | Pages with migrated_from: "agent/<id>/memory.json". These are verbatim daily-memory dumps, NOT team-level patterns. |
--max-per-agent INT | 0 (off) | omit flag | Keeps top-N pages per original_author (by confidence desc, original_date desc). Useful for taming pathological cases where one agent dumped 100+ entries. |
A page is a candidate if it matches any rule (union, not intersection). The per-agent cap only considers pages NOT already flagged by other rules — so a low-confidence page doesn't "use up" a cap slot.
--apply, nothing is written..wiki-cleanup-archive.json BEFORE the file is removed. Rollback = "paste body back into the path from the archive.".migration-state.json — the manifest is what makes wiki-migrate --apply idempotent. Future migrate runs see the matching sourceId + content hash and skip re-import. Page stays deleted.memory/, sop/, sop-overrides/, okr/ are NEVER scanned and NEVER deleted (even if the caller passes a frozen-folder path to --pages, apply skips it with reason: 'frozen').--pages entry that resolves outside the vault (../../etc/passwd etc) is skipped with reason: 'outside_vault'.--apply re-run on the same --pages list with already-deleted entries is a no-op (each missing file → reason: 'not_found').~/.crewly/agents/*/memory.json and <project>/.crewly/knowledge/* stay as-is. Cleanup only removes wiki pages.<project>/.crewly/wiki/llm-curated/patterns/ has 500+ entries. Run scan to see candidates, then apply with the page list you actually want gone.WikiWorkItemBridge periodically scans every vault and creates wiki_quality_cleanup WorkItems with a chunked candidate list. The agent claims the WI, reads the brief, and calls --apply with the explicit list of pages it decided to delete. See your prompt's "Bridge-auto WorkItems — DO NOT bulk-delete" rule.400 invalid_input — vaultPath missing or pages empty on apply.404 vault_missing — vaultPath does not exist on disk.400 confirm_required — apply was POSTed without confirm: true (the skill always sets this; see the underlying HTTP route for raw clients).