skills/golem-powers/google-drive-archive/SKILL.md
Archive heavy research outputs (transcripts, audio, video, audits, plans) to Brain Drive as forever-storage. Use when about to write >100KB / media to docs.local/, when user says 'archive this' / 'save to Drive' / 'this should be in Brain Drive', or after digesting a large artifact into BrainLayer. Enforces the source-of-truth hierarchy: Brain Drive (forever) → docs.local/ (latest cache) → BrainLayer (searchable index).
npx skillsauth add etanhey/golems google-drive-archiveInstall 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.
Pattern: Brain Drive holds forever.
docs.local/holds latest only. BrainLayer indexes both. A_DRIVE-LEDGER.mdperdocs.local/subdir maps local → Drive.
This skill is for putting things INTO Drive. To query Drive content via Gemini, use /braindrive. To research the web with Drive sources, use /gemini-research.
┌──────────────────────────────────────────────────────────────┐
│ BRAIN DRIVE │
│ ──────────── │
│ • Forever storage (free up to 15GB; user has the quota) │
│ • All versions, heavy assets, raw research outputs │
│ • Path: Brain Drive/06_ARCHIVE/<area>/<topic>/<date>/... │
│ • Source of truth — if it's only in docs.local/, it isn't │
│ durable │
└──────────────────────────────────────────────────────────────┘
▲
│ upload + update ledger
│
┌──────────────────────────────────────────────────────────────┐
│ docs.local/ (git-ignored) │
│ ─────────── │
│ • Local cache — only the LATEST versions │
│ • Lightweight markdown only (no >100KB media) │
│ • Per-dir `_DRIVE-LEDGER.md` lists every Drive copy + URL │
│ • Safe to delete: contents are recoverable from Drive │
└──────────────────────────────────────────────────────────────┘
▲
│ brain_digest extracts entities/relations
│
┌──────────────────────────────────────────────────────────────┐
│ BRAINLAYER │
│ ────────── │
│ • Searchable index over text content (transcripts, docs) │
│ • Chunks link back to Drive URLs │
│ • Use brain_search before brain_store — dedupe the index │
└──────────────────────────────────────────────────────────────┘
One-line rule: Heavy or forever → Drive + ledger entry + (if textual) brain_digest. Local copies are caches, not archives.
Invoke this skill when:
docs.local/research/, docs.local/audits/, or docs.local/plans/ — especially if it contains transcripts, audio, video, or large logs.brain_digest'd into BrainLayer and the raw file is a candidate for archival (BrainLayer indexes it; Drive holds the original).rm -rf /tmp/<heavy-stuff> — if any of it is forever-knowledge, route it through this skill first.Skip this skill when:
docs.local/ (no need to upload markdown notes).Ask: "Will future-Etan or another agent want to re-read this raw artifact a month from now?"
| Answer | Action |
|---|---|
| Yes (transcripts, audits, plans, research outputs, media) | Forever → continue to step 2. |
| No (intermediate processing files, throwaway logs, regeneratable derivatives) | Skip. Just delete after use. Note the choice in commit message or BrainLayer. |
| Mixed (e.g. audio.wav keep, audio-16k.wav derivative skip) | Upload only the originals. Document which derivatives are regeneratable + how. |
Default convention (matches Brain Drive/06_ARCHIVE/repos/union-2026-04/ precedent):
Brain Drive/06_ARCHIVE/<area>/<topic>/<date-or-tag>/<artifact-folder>/
| <area> | When |
|---|---|
| research | Web research, deep research, video gems, audits-as-research |
| audits | Code audits, security reviews, compliance reports |
| plans | Multi-phase plans (large-plan outputs), architecture proposals |
| repos | Whole-repo snapshots (e.g. before a destructive refactor) |
| voice | Voice session transcripts + audio |
Use mcp__google-drive__search to find existing parent folders before creating new ones — match precedent if one exists.
mcp__google-drive__createFolder(name=<level>, parent=<parent-id>)
Capture the returned folder ID at every level. You will need them in the ledger.
mcp__google-drive__uploadFile(localPath=<absolute>, parentFolderId=<id>)
id, link, and size from each upload return.For every transcript.txt, report.md, audit.md, plan.md you upload:
mcp__brainlayer__brain_digest(content=<file content>)
Capture the returned chunk_id. This makes the full text searchable — gem extractions and structured chunks cover the highlights, but brain_digest is what catches phrases the gem extractor missed.
For files >150KB, an inner agent with brain_digest loaded can do this in the background (large content blows up the orchestrator's context).
Path: docs.local/<area>/<topic>/_DRIVE-LEDGER.md
# Drive Ledger — <topic>
> Source of truth for these artifacts is Brain Drive. Local files are caches.
| File | Local path | Drive folder | Drive ID | Drive URL | Size | BrainLayer chunk | Uploaded |
|---|---|---|---|---|---|---|---|
| transcript.txt | docs.local/.../transcript.txt | <folder-id> | <file-id> | <link> | 30KB | brainbar-... | 2026-04-25 13:01 |
| audio.wav | (deleted from /tmp after upload) | <folder-id> | <file-id> | <link> | 312MB | n/a | 2026-04-25 13:08 |
## Skipped (regeneratable derivatives)
- `audio-16k.wav` — 16kHz mono downsample of `audio.wav` for whisper-cli. Regenerate via `ffmpeg -i audio.wav -ar 16000 -ac 1 audio-16k.wav`.
The ledger is what lets a future agent answer "where is the original?" without spelunking through Drive.
Only after:
mcp__google-drive__listFolder confirms the file is present and sized correctly.Markdown notes <100KB stay in docs.local/ (they're the latest cache). Heavy media (>10MB audio/video) can be deleted locally — Drive is the canonical copy.
brain_store(
content="Archived <topic> to Brain Drive at <path>. Rationale: <why forever>. Skipped: <derivatives + how to regenerate>.",
tags=["google-drive-archive", "<area>", "<topic>", "milestone"],
importance=6-8
)
Skip for routine archives (one transcript, one report). Store for unusual decisions: large batches, format choices, retention policy edges.
| Anti-pattern | Why it's wrong | Do instead |
|---|---|---|
| Saving 1.5GB transcripts to docs.local/ and committing | Bloats the working dir, hits git ignore edges, no durable copy | Drive + ledger; docs.local/ keeps the markdown summary only |
| rm -rf /tmp/extract/ without checking forever-value | Loses raw audio/video that's expensive to regenerate (yt-dlp re-downloads, whisper re-runs) | This skill: route through "ephemeral or forever?" decision first |
| brain_digest a transcript but NOT upload to Drive | BrainLayer has the index but the raw file is gone — citations break, full text unrecoverable | Upload to Drive AND brain_digest. Both. |
| Upload to Drive but skip the ledger | Drive becomes a junk drawer; future agents can't find the URL | Always update _DRIVE-LEDGER.md |
| Re-uploading something that's already in Drive | Wastes quota, confuses search | mcp__google-drive__search first; match existing folder if precedent exists |
| Committing _DRIVE-LEDGER.md to git | Ledger is a per-machine cache; the source of truth is Drive | Keep in docs.local/ (which is git-ignored) |
/research-lifecycle — when condensing/archiving stale research files, use this skill to push originals to Drive before deleting locally./qa-video — video gems and QA processing produce transcripts, frames, and heavy media; this skill is where they land long-term. The qa-video gems output is in /tmp/ by default; route to Drive on completion./large-plan — when a plan completes, archive the full plan folder to Brain Drive/06_ARCHIVE/plans/<name>-<date>/.docs.local/ for >100KB files lacking ledger entries and prompt to archive.mcp__google-drive__* — search, createFolder, uploadFile, listFolder. The braindrive MCP is already authenticated; for auth drift run nlm login switch <profile> && mcp__google-drive__refresh_auth (this is the repo's established remediation, used by skills/golem-powers/_shared/research/verify-account.sh). authGetStatus is a status check, not a fix.mcp__brainlayer__brain_digest — for textual content >2KB.mcp__brainlayer__brain_store — for decisions about archives.mcp__brainlayer__brain_search — to find existing chunks before re-digesting.## Archived: <topic>
- Drive: Brain Drive/06_ARCHIVE/<path> (folder ID: <id>)
- Files: N text + M media (X MB / Y GB total)
- BrainLayer chunks: <chunk_id_1>, <chunk_id_2>
- Ledger: docs.local/<area>/<topic>/_DRIVE-LEDGER.md
- Local cleanup: deleted /tmp/<...> (X GB freed) | retained markdown (<size>)
- Skipped derivatives: <list> (regenerate via <command>)
Keep it ≤10 lines. Detail goes in the ledger.
tools
The human-eval UX contract for Phoenix views: turn-by-turn scrollable replay (not a scorecard), hide-but-copyable IDs, collapsed thinking, identity chips, tool filters, tiny frozen starter datasets, mark-wrong-in-thread, mobile-first. Use when: building or reviewing ANY Phoenix/eval view, annotation UI, session replay, or human-grading surface. Triggers: phoenix view, eval UI, annotation view, session replay, human eval UX, grading interface. NOT for: Phoenix data pipelines/ingest (capture scripts have their own specs).
tools
macOS systems specialist — AppKit NSPanel architecture, launchd services, socket activation, MCP bridge resilience, syspolicyd, and high-frequency SwiftUI dashboards. Use when building menu-bar apps, LaunchAgents, debugging syspolicyd/Gatekeeper/TCC, resilient UDS/MCP bridges, or SwiftUI dashboards at 10Hz+.
development
Bulk LLM-judging protocol for fleet-dispatched verdict runs (KG cluster, eval harness). Use when: dispatching or running judge workers (J1/J2/RT), planning bulk-apply from verdict JSONL, or triaging evidence_degraded outputs. Triggers: judge fleet, bulk judge, R3 verdicts, kg-judge, RT gate, evidence_degraded. NOT for: single-item code review, Phoenix view UX (use phoenix-human-view), or non-judge eval pipelines.
development
Quiet-down protocol for sprint close: when the fleet wraps, delete ALL polling crons and monitors, send ONE final dashboard + ONE message, then go SILENT. Use when: fleet wraps, all workers done, overnight queue exhausted, sprint close, Etan asleep/away with nothing approved left. Triggers: fleet wrap, wrap the fleet, stand down, going quiet, sprint close. NOT for: mid-sprint monitoring (keep your loops), spawning a successor (use /session-handoff first).