npx claudepluginhub levifig/loaf --plugin loafWant just this skill?
Then install: npx claudepluginhub u/[userId]/[slug]
Reviews and cleans up agent artifacts in .agents/ — sessions, specs, plans, drafts, councils, and reports. Provides hygiene recommendations, archives completed work, and ensures extracted knowledge is preserved. Use when the user asks "clean up", "review sessions", "review artifacts", or "tidy up .agents/."
This skill uses the workspace's default tool permissions.
templates/report.mdtemplates/session.mdCleanup
Review ALL agent artifacts in .agents/ and provide hygiene recommendations.
Contents
- Sessions
- Specs
- Plans
- Drafts
- Councils
- Reports
- Summary Table
- Archival Process
- Where Knowledge Belongs
CRITICAL: Review EVERY file, not samples or averages.
Never reference .agents/ files in output docs outside .agents/.
After user confirmation, auto-move archived artifacts and update .agents/ links.
Archived artifacts are retained indefinitely.
1. Sessions
For EACH session file in .agents/sessions/ and .agents/sessions/archive/:
A. Read and Summarize
- Title, status, Linear issue (query Linear for current status), dates, current state
B. Check for Issues
- References missing files? → Stale
- Linear issue closed? → Ready for archive
- Status "completed" but not archived? → Ready for archive
- File in archive but status not
archived? → Fix status - Archived missing
archived_atorarchived_by? → Add metadata - >7 days since last update with no activity? → Review for staleness
C. Check for Extraction Needs
- Contains
lessons_learned? → Extract to relevant docs - Contains unrecorded
decisions? → Suggest ADR creation - Contains
remaining_work/next_steps/technical_debt? → Check if tracked - CHANGELOG draft present but not integrated? → Flag for integration
D. Present Per Session
Summary (2-3 lines), issues found, extraction recommendations. Recommendation: Extract & Archive / Archive / Keep
2. Specs
For EACH spec file in .agents/specs/ and .agents/specs/archive/:
Check for Issues
- Status
completebut not in archive/? → Ready for archive - Status
implementingbut no active session or tasks? → Stale - Status
draftingwith no activity >14 days? → Review for staleness - Status
approvedbut never started? → Flag for prioritization - References tasks or sessions that don't exist? → Stale references
- Frontmatter missing required fields (id, title, status)? → Fix metadata
Present Per Spec
ID, title, status, appetite, task count (from TASKS.json if available). Recommendation: Archive / Keep / Flag for review
3. Plans
For EACH plan file in .agents/plans/:
Check for Issues
- Linked session is archived or doesn't exist? → Orphaned — delete
- Linked session is complete? → Ready for cleanup
- >14 days old with no linked active session? → Stale — delete
- No session link at all? → Orphaned — delete
Plans are ephemeral — they exist to support a session. When the session is archived, the plan should be deleted (not archived). The decisions and outcomes live in the session file and git history.
Present Per Plan
Filename, linked session, session status, age. Recommendation: Delete / Keep
4. Drafts
For EACH file in .agents/drafts/:
Check for Issues
- Content was used to create a spec? → Served its purpose — archive or delete
- >30 days old with no related spec or active work? → Stale — review for deletion
- Contains unique research or analysis not captured elsewhere? → Keep or extract
- Duplicates information in an existing spec or ADR? → Delete
Drafts include brainstorms, research documents, and exploratory notes. They feed into specs and decisions but are not themselves durable artifacts.
Present Per Draft
Filename, age, related specs (if any), size. Recommendation: Delete / Keep / Extract & Delete
5. Councils
For EACH council file in .agents/councils/ and archive:
- Topic, date, linked session, decision outcome
- Flag: orphaned (no session), >14 days old, decision should be ADR
- Archive only after session summary captures outcome
6. Reports
For EACH file in .agents/reports/ and archive.
Report frontmatter follows report template.
Archive prerequisites: processed, linked session archived, archived_at + archived_by set.
7. Summary Table
SESSIONS (N total):
Ready for archive: N (list)
Need extraction: N (list)
Keep active: N
SPECS (N total):
Complete (archive): N (list)
Active: N
Stale: N
PLANS (N total):
Orphaned (delete): N (list)
Active: N
DRAFTS (N total):
Stale (review): N (list)
Active: N
COUNCILS (N total): ...
REPORTS (N total): ...
8. Archival Process
Never auto-archive or auto-delete. For each flagged artifact:
- Show checklist with specific items to extract or verify
- Ask user: "Archive" / "Delete" / "Keep"
- If extracting, perform extractions first
- For sessions: set status
archived,archived_at,archived_by, move to archive/ - For specs: move to archive/, update TASKS.json if tracked
- For plans: delete (not archive — ephemeral)
- For drafts: delete or archive based on user preference
- Auto-update
.agents/references after moves
9. Where Knowledge Belongs
| Information Type | Destination |
|---|---|
| Work tracking | Linear issues / TASKS.json |
| Implementation details | Git commits |
| Architectural decisions | docs/decisions/ADR-XXX-*.md |
| API contracts | docs/api/ |
| Remaining work | Linear backlog / TASKS.json |
| User-facing changes | CHANGELOG.md |
| Council outcomes | Session summary → archive |
| Report conclusions | Session summary → archive |
| Spec decisions | Spec file → .agents/specs/ |
| Archived artifacts | .agents/<type>/archive/ |
Similar Skills
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.