원클릭으로
janitor
Nightly system janitor sweep. Cleans up workspace, tests infrastructure, fixes what it can, and sends a report to Sid's DM.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Nightly system janitor sweep. Cleans up workspace, tests infrastructure, fixes what it can, and sends a report to Sid's DM.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
OpenAI Codex CLI wrapper — three modes. Code review: independent diff review via codex review with pass/fail gate. Challenge: adversarial mode that tries to break your code. Consult: ask codex anything with session continuity for follow-ups. The "200 IQ autistic developer" second opinion. Use when asked to "codex review", "codex challenge", "ask codex", "second opinion", or "consult codex". (gstack) Voice triggers (speech-to-text aliases): "code x", "code ex", "get another opinion".
Set up gbrain for this coding agent: install the CLI, initialize a local PGLite or Supabase brain, register MCP, capture per-remote trust policy. One command from zero to "gbrain is running, and this agent can call it." Use when: "setup gbrain", "connect gbrain", "start gbrain", "install gbrain", "configure gbrain for this machine". (gstack)
Codify the most recent successful /scrape flow into a permanent browser-skill on disk. Future /scrape calls with the same intent run the codified script in ~200ms instead of re-driving the page. Walks back through the conversation, synthesizes script.ts + script.test.ts + fixture, runs the test in a temp dir, and asks before committing. Use when asked to "skillify", "codify", "save this scrape", or "make this permanent". (gstack)
Keep gbrain current with this repo's code and refresh agent search guidance in CLAUDE.md. Wraps the gstack-gbrain-sync orchestrator with state probing, native code-surface registration, capability checks, and a verdict block. Re-runnable, idempotent. Use when: "sync gbrain", "refresh gbrain", "re-index this repo", "gbrain search isn't finding things". (gstack)
Auto Review closeout. Codex review is the default when no engine is set and is the recommended reviewer.
CEO/founder-mode plan review. Rethink the problem, find the 10-star product, challenge premises, expand scope when it creates a better product. Four modes: SCOPE EXPANSION (dream big), SELECTIVE EXPANSION (hold scope + cherry-pick), HOLD SCOPE (maximum rigor), SCOPE REDUCTION (strip to essentials). Use when asked to review a plan, challenge this, CEO review, poke holes, think bigger, or expand scope.
| name | janitor |
| version | 1.0.0 |
| description | Nightly system janitor sweep. Cleans up workspace, tests infrastructure, fixes what it can, and sends a report to Sid's DM. |
| triggers | ["janitor sweep","system cleanup","nightly maintenance"] |
| created_by | self-improvement |
| mutating | true |
Nightly automated maintenance run. Clean up, test, fix, report.
Every night at 2:30 AM ET via cron. Runs in isolated session.
/tmp/ that belong to Cosmo workflows (depth-thumbnail, test outputs, etc.) older than 48htest-*.js, debug-*.js, tmp-*) — list them, delete if >7 days old~/.openclaw/logs/ and content-engine logs. If any log file >10MB, truncate keeping last 1000 linesmemory/ for files >30 days old that are just heartbeat-state noise. Don't delete daily notes, but flag if any are >50KB (bloated)reports/ directories older than 14 days~/.openclaw/workspace/ and flag if >1GBopenclaw cron list and verify all jobs show ok status. Flag any error or stale jobs.pgrep -f cron-daemon). If dead, restart it and note in report.~/.openclaw/credentials/supabase-env.sh and test a simple query (SELECT 1). Report pass/fail.source ~/.gbrain/env.sh && gbrain doctor. Report any issues.~/.openclaw/workspace/ and ~/Documents/wiki/ for uncommitted changes. Auto-commit workspace changes with message "janitor: nightly auto-commit". Then push the backup to GitHub: git -C ~/.openclaw/workspace push origin main. If the push fails (diverged, auth, or no network), report it loudly — a silent push failure means the off-machine backup is going stale. The workspace repo tracks origin/main at github.com/sidneyswift/cosmo.op whoami to verify auth is healthy.skills/*/SKILL.md for empty or malformed filesPRAGMA integrity_check on content-engine drafts.dbPRAGMA integrity_check on db/sessions.dbnode_modules/ exists and npm ls --depth=0 has no missing deps.pid files pointing to dead processes, clean upCompile all findings into a report and send to Sid's DM:
🧹 *Janitor Sweep — {date}*
*Cleanup:*
• {n} temp files removed ({size} freed)
• {n} stale scripts cleaned
• Workspace size: {size}
*Infrastructure:*
• ✅/❌ Cron daemon: {status}
• ✅/❌ Content engine: {status}
• ✅/❌ Supabase: {status}
• ✅/❌ GBrain: {status}
• ✅/❌ Brain sync: {status}
• ✅/❌ Git repos: {status}
• ✅/❌ 1Password: {status}
*Bugs Found & Fixed:*
• {list of issues found and actions taken}
*Bugs Found (manual fix needed):*
• {list of issues that need Sid's attention}
Save report to reports/janitor/{YYYY-MM-DD}.md as well.