Searches and navigates Google Drive to find files, list folders, and rank results by relevance. Activates when the user wants to find a file in Drive, browse folders, search for documents, or asks 'where's that spreadsheet?' Handles search query formulation, file type detection, folder traversal, and relevance scoring.
From founder-osnpx claudepluginhub thecloudtips/founder-os --plugin founder-osThis skill uses the workspace's default tool permissions.
references/file-type-handling.mdreferences/search-strategies.mdDesigns and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Search and navigate Google Drive to find files, traverse folder hierarchies, and rank results for relevance. This skill powers /founder-os:drive:search (find files by query) and /founder-os:drive:organize (folder-level browsing and restructuring), providing the search and traversal primitives that other skills and commands consume.
Execute searches against Google Drive using the gws CLI (Drive) tools. The pipeline follows a fixed sequence to maximize recall while keeping result sets manageable.
Pipeline stages:
Complete all variants before scoring. If gws CLI is unavailable for Drive, report status clearly and halt the pipeline -- Drive is the required source for this skill.
Generate 2-3 query variants from the user's original input to maximize recall. Google Drive uses simple keyword matching, not semantic search, so different phrasings surface different results.
Variant generation rules:
Constraints:
Consult ${CLAUDE_PLUGIN_ROOT}/skills/drive/drive-navigation/references/search-strategies.md for detailed query variant examples, file-type filtering patterns, and search-within-folder techniques.
Filter search results to supported file types and apply type-specific content extraction.
Supported types:
scanned: true and score keyword density as 0.Skip silently: images, videos, ZIP archives, and any other binary format. Do not log warnings or mention skipped files unless the user explicitly asked for a file that was skipped.
Apply content truncation rules: 3000-character cap per file for extraction, 500-character cap for previews.
Consult ${CLAUDE_PLUGIN_ROOT}/skills/drive/drive-navigation/references/file-type-handling.md for detailed parsing patterns, extraction logic per type, and truncation rules.
Score each result on three factors. Total score range: 0-100.
Count how many of the user's key terms (nouns, verbs, adjectives extracted from the original query) appear in the result's filename and content combined.
| Match ratio | Score |
|---|---|
| All key terms present | 35-40 |
| Most key terms (>70%) | 25-34 |
| Some key terms (40-70%) | 15-24 |
| Few key terms (<40%) | 5-14 |
| No key terms | 0-4 |
Exact phrase matches (three or more consecutive key terms in order) earn a 5-point bonus within this factor, capped at 40.
Key term extraction: Strip stop words, keep proper nouns regardless of part of speech, keep numbers and dates, treat hyphenated compounds as single terms.
Measure how closely the filename matches the user's query intent. Filenames in Drive are intentionally descriptive, so strong filename matches indicate high relevance.
| Match level | Score |
|---|---|
| Filename contains the exact query phrase | 28-30 |
| Filename contains most query keywords | 20-27 |
| Filename contains some query keywords | 10-19 |
| Filename is tangentially related | 3-9 |
| Filename has no relationship to query | 0-2 |
Score based on the file's last modified date.
| Age | Score |
|---|---|
| Modified within last 7 days | 28-30 |
| Modified within last 30 days | 20-27 |
| Modified within last 90 days | 12-19 |
| Modified within last 365 days | 5-11 |
| Older than 365 days | 0-4 |
Composite score: Sum all three factors. Rank results by composite score descending.
Consult ${CLAUDE_PLUGIN_ROOT}/skills/drive/drive-navigation/references/search-strategies.md for scoring formula pseudocode, worked examples with score breakdowns, and edge case adjustments.
Navigate Drive folder hierarchies to list contents and build breadcrumb paths.
Traversal approach:
My Drive > Projects > Client A > Proposals. Use the file's parents metadata to walk up the hierarchy.Folder content display format:
Folder: My Drive > Projects > Client A
Last modified: 2026-03-01
Contents (12 items):
[Folder] Proposals (5 files, modified 2026-02-28)
[Folder] Contracts (3 files, modified 2026-01-15)
[Doc] Project Brief.gdoc (modified 2026-03-01)
[Sheet] Budget Tracker.gsheet (modified 2026-02-20)
[PDF] Signed Agreement.pdf (modified 2025-12-10)
[Doc] Meeting Notes 2026-02.gdoc (modified 2026-02-15)
Group subfolders first, then files. Sort each group by last modified date descending.
Scoped search: When a user requests a search within a specific folder, pass the folder ID as a parent filter to the Drive search call. Indicate the search scope in the output: search_scope: "Projects > Client A".
After collecting results from all query variants, merge and deduplicate before scoring.
Deduplication rules:
Ranking: After scoring, sort by composite score descending. Break ties by recency (more recently modified file wins). Assign rank numbers 1 through N.
Generate a 500-character preview of each file's content for display in search results.
Preview rules:
**bold**, # headings, [links](url), and other markup."[No preview available]".When Drive activity is logged to the [FOS] Activity Log Notion database, populate the Company relation if the file path or filename matches a known client from [FOS] Companies. Populate Company relation when the Drive file belongs to a known client folder or filename contains a client name.
Detection rules:
Handle gws CLI (Drive) unavailability clearly and without crashing.
drive_status: "unavailable" in the output. Inform the user that the gws CLI (gws drive) is not connected and suggest checking the MCP configuration.Return search results in this format for consumption by commands and other skills:
search_results:
query_original: [user's search input]
query_variants: [list of 2-3 variants used]
drive_status: "available" | "unavailable"
search_scope: "all" | [folder breadcrumb path]
total_results: [count]
results:
- rank: 1
score: [0-100]
source: "drive"
title: [filename]
url: [Drive URL]
content_type: "doc" | "sheet" | "pdf" | "text" | "slides" | "markdown"
last_modified: [ISO date]
preview: [up to 500 chars]
breadcrumb: [folder path, e.g., "My Drive > Projects > Client A"]
file_id: [Drive file ID]
score_breakdown:
keyword_density: [0-40]
title_match: [0-30]
recency: [0-30]
For folder traversal operations, return a folder listing format instead:
folder_listing:
folder_name: [name]
breadcrumb: [full path]
last_modified: [ISO date]
total_items: [count]
subfolders: [list with name, item_count, last_modified]
files: [list with name, content_type, last_modified, file_id, url]