# Gdrive Synthesize

Synthesize durable KTX wiki pages from staged Google Drive document pulls.

- Repository: https://github.com/Kaelio/ktx (1627 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-22
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Kaelio/ktx --skill gdrive_synthesize -g -a claude-code -y`
Codex: `npx skills add Kaelio/ktx --skill gdrive_synthesize -g -a codex -y`
Cursor: `npx skills add Kaelio/ktx --skill gdrive_synthesize -g -a cursor -y`
Gemini CLI: `npx skills add Kaelio/ktx --skill gdrive_synthesize -g -a gemini-cli -y`

## Description

Synthesize durable KTX wiki pages from staged Google Drive document pulls. Load when a WorkUnit contains Google Doc raw files from `docs/**`.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Google Drive Doc Synthesis

Use this skill when a WorkUnit contains staged Google Drive content from `docs/**`.

## Role

Each WorkUnit is one Google Doc plus its metadata. Read the assigned raw files, then write a small set of durable wiki entries that capture reusable organizational knowledge. Write final memory directly; do not write candidates.

## Required Workflow

1. Read the WorkUnit notes and `rawFiles` list. Document content lives in `page.md`; `metadata.json` holds title, path, url, modified time, and Drive folder context.
2. For each assigned doc, call `read_raw_file`, or `read_raw_span` for oversized docs when the notes specify a span.
3. Search `wiki_search` for existing pages that overlap the WorkUnit topics. Prefer updating an existing page over creating a duplicate.
4. Use `context_evidence_search`, `context_evidence_read`, and `context_evidence_neighbors` when indexed document chunks would help reconcile related facts. Pass `chunkId` and `documentId` values verbatim as returned by the evidence tools.
5. Write durable business knowledge with `wiki_write`. Aim for a small number of high-quality pages per doc. Include `rawPaths` with the exact Google Drive raw files that support each page.
6. If a doc references warehouse, dbt, Looker, Metabase, or MetricFlow objects, you may verify them with `discover_data`, `entity_details`, `sql_execution`, `sl_discover`, or `sl_read_source`, but Google Drive docs are knowledge-only in v1. Do not create semantic-layer sources under the `gdrive` connection.
7. For every deleted raw path in the Eviction Set, call `eviction_list`, decide retention, then `emit_eviction_decision`. Do this even when no wiki write is needed.

## What To Capture

Capture durable, reusable company knowledge:

The rest: https://github.com/Kaelio/ktx/blob/HEAD/packages/cli/src/skills/gdrive_synthesize/SKILL.md
