Home / All Skills / Workflow & Core Tools / gemini-history-analyzer
Workflow & Core Tools · daymade/claude-code-skills

gemini-history-analyzer

Analyze Google Takeout exports of Gemini conversation history. Use when the user mentions Gemini takeout, Gemini export, Gemini history, Gemini conversation analysis, Google Takeout zip analysis, or drags a takeout zip into the project. Also use when the user asks to "analyze my Gemini data", "what did I talk to Gemini about", or wants to extract insights from Gemini chat logs.

L3 Networked · Declare domain & key scopeV1 Commit-PinnedNetwork AccessWrite FileDual-pass Audit
Author daymadeGitHub daymade/claude-code-skills ↗Stars 1385License MIT(仓库根 LICENSE 文件;GitHub API spdx MIT;Copyright (c) 2025 daymade)Commit d5c4678cb5
Control levels describe skill capabilities and suggested control measures; they do not represent quality or safety certifications, nor do they dictate usability. Usage decisions rest entirely with users and administrators. Different agent hosts apply varying constraints; do not assume hosts provide automatic protection. Third-party skill copyrights belong to their original authors. Use at your own risk.

1How It Works & Mechanism

The entire pipeline consists of an 8-step instruction set in SKILL.md plus model reading, with no scripts in the directory: extraction relies on the shell, comprehension relies on the model, and aggregation relies on a fixed report template.

gemini-history-analyzer/SKILL.md
Extract, categorize, and analyze Google Takeout ZIP exports of Gemini Apps activity. The skill handles:
glob verifies that the skill directory contains only SKILL.md (no scripts/, references/, or evals/). Downstream keyword search, categorization, and report generation are all delegated to the agent via general tools; the skill only provides methodology and discipline.

Determine the type before choosing a strategy: sample 3–5 files and use four signals—speaker tags, content format, length distribution, and file naming—to distinguish between 'meeting transcripts' and 'prompt-response' pairs, routing each to a different analytical path.

gemini-history-analyzer/SKILL.md
Before full analysis, sample 3-5 files to determine the **conversation type**:
This section outlines the divergent paths: meeting transcripts follow topic categorization, speaker analysis, decision tracking, and user profiling; prompt-response follows usage patterns, capability assessment, and interest domain mapping. This preliminary type classification avoids applying the wrong analysis framework, serving as the skill's primary structural differentiator.

The extraction phase has a clear technical justification: macOS's native unzip silently mangles Chinese filenames, making unar strictly required.

gemini-history-analyzer/SKILL.md
Google Takeout files contain Chinese/Unicode filenames. **macOS `unzip` corrupts these — always use `unar`.**
Critical Pitfalls item #1 details the exact consequence: 'files become garbled paths, many fail to extract'. This addresses a genuine toolchain pitfall (ZIP non-UTF-8 flag handling differences) rather than general advice.

Take inventory before reading: use find + sed/uniq to tally extension distributions, list all txt files, and calculate sizes by type; establish the inventory before deciding what to read.

gemini-history-analyzer/SKILL.md
find <extract-dir> -type f | sed 's/.*\.//' | sort | uniq -c | sort -rn
Step 2's three commands correspond to counting by extension, listing all txt files, and sorting by size to grab the top 30, preceding Step 3 sampling. This order ensures context is not overwhelmed before understanding overall scale.

Keyword searching is explicitly positioned as a 'first step, not the answer': context must be checked by reading 10 lines before and after hits, categorizing matches into three tiers.

gemini-history-analyzer/SKILL.md
**Read surrounding context** (10 lines before/after each match) — keyword matching alone produces massive false positives. "Investment" can mean business strategy, "option" can mean UI choice, "fund" can mean insurance feature
Hits are categorized into Definite hit, False positive, or Ambiguous, with full-text rereads reserved for definite and ambiguous cases. It includes the strict rule: 'Never stop at grep output — context verification is mandatory.' Pitfalls item #2 also notes real-world findings: financial terms hit 80%+ of files during analysis, yet all were false positives.

PII handling follows 'flag but do not transcribe': resumes, background checks, or contact lists must be noted as risk items in the report, but their content must never be copied into reports or memory.

gemini-history-analyzer/SKILL.md
- File: <name>, Type: <resume/background-check/etc.>, Risk: <high/medium/low>
Report Section 7 is structured around providing only file, type, and risk level, annotated with '(Flag if detected — do NOT include the actual PII in the report)'. Pitfalls item #4 reiterates: 'Resumes, background check forms, contact lists — these routinely appear in conversation history. Flag them, do NOT include their contents in reports.'

Hierarchical reading for large files and parallel reading for massive sets preserve the context budget: read only the first and last 10% of single large files, and dispatch parallel sub-agents in batches of 10–15 for 100+ files.

gemini-history-analyzer/SKILL.md
For 100+ files, spawn parallel sub-agents to read and summarize in batches (10-15 files each). Merge results. One agent reading all files sequentially will exhaust context.
Pitfalls item #5 provides a practical rule of thumb: 'A 63KB transcript is a 2-hour meeting. Don't read the whole thing unless it's flagged as highly relevant.' Together, they form a concrete scale-to-reading decision rule.

Output is standardized into a 7-section report (Overview, Topic Distribution, Key Findings, Domain-Specific Analysis, Notable Documents, High-Value Quotes, PII Risk), with an optional final memory file.

gemini-history-analyzer/SKILL.md
# Gemini History Analysis Report
Section 4 explicitly incorporates 'False positives: N (with examples of what caused them)', baking Step 5's verification discipline directly into the final artifact structure.

Optional memory file artifacts adhere to a strict protocol: follow existing project memory formats, include originSessionId for provenance, update the MEMORY.md index, and avoid duplicating existing content.

gemini-history-analyzer/SKILL.md
- Include `originSessionId` or source tag pointing back to the analysis
Step 7 restricts triggers (explicit user request, reusable insights discovered, or existing project memory system present) and requires checking frontmatter conventions of other memory files first, explicitly controlling long-term memory side effects.

Final cleanup requires user confirmation: rm -rf on the extraction directory is performed only after analysis is complete.

gemini-history-analyzer/SKILL.md
# Remove extracted files after analysis complete (user confirms)
The comments explicitly mandate user confirmation before executing rm -rf <extract-dir> (Step 8). This ensures privacy hygiene by not leaving unzipped private history copies behind, explaining why a destructive command is retained.

2Core Capabilities

01Unpack Google Takeout Gemini Apps exports (including Chinese/Unicode filenames)
02Take inventory before detailed reading: extension distribution, txt inventory, and size-sorted tabulation
03Classify conversation type (meeting transcripts vs. prompt-response) and dynamically switch analysis frameworks
04Topic categorization and proportion metrics (including domain-specific deep dives)
05Context-verified keyword search (including false-positive classification and root-cause analysis)
06PII/sensitive content detection with 'flag only, do not transcribe' reporting
07Fixed 7-section analytical report generation + verbatim quote extraction
08Optional memory file generation for user profiling, feedback, and project context (with index updates and provenance tracking)

3External Dependencies

KindDependency / Endpoint
cliunar(解包 Takeout ZIP,处理中文文件名)
packageHomebrew(仅在 unar 缺失时安装;命令带 2>/dev/null || true 容错)
clifind / sed / sort / uniq / du(清单与统计)
cligrep(领域关键词检索,随后必须人工回读上下文)
clirm(分析完成后清理解包目录,需用户确认)
api宿主 sub-agent 能力(100+ 文件时并行批处理)

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Declare allowed domains and key scope
For Administrators
Least privilege keys, retain request logs
Evidence & Triggers (File Paths & Excerpts)
  • 网络端点: Declared external network access: The only potential outbound network action is brew install unar—executed only if unar is missing to pull the third-party package via Homebrew; SKILL.md uses 2>/
  • 本地工作目录: File read/write and artifact output: <output-dir>/**: All Takeout contents extracted via unar (txt transcripts, images, audio/video, PDF/Office documents, nested zip files)
Audit Notes: Based on unified classification: This skill contains zero scripts (only SKILL.md in directory), and all operational behaviors are local file operations—extraction, find/grep/du statistics, text reading, optional memory writing, and conditional rm -rf. It performs no credential reading (does not access cookies, API keys, or environment variables, requires no accounts, and takes user-provided ZIP files as input), calls no external APIs, has no tracking, and uses no third-party mirrors. It is not graded Green because the full pipeline runs real shell commands (including rm -rf and conditional brew install unar third-party package installation) on highly private personal history data. This matches the evaluation standard of local-conversation-history (Blue) in the same repository—which likewise involves reading local private history without scripts or external network access.

5Second-Pass Verification

  • [ok] 是否真的没有脚本(避免凭 description 臆测) — glob 结果:仅 SKILL.md。所有「处理」都是写在文档里让 agent 用通用 shell/工具执行的命令,非自带可执行文件。scripts_executed = []。
  • [discrepancy] spawn 命中是否等于进程创建 — 〔第二遍标注:扫描器误报,已澄清〕SKILL.md 原文为『spawn parallel sub-agents to read and summarize in batches』,指宿主的 sub-agent 能力;全文件无 child_process / subprocess / exec / eval。
  • [ok] brew install 是否被夸大成依赖 — 命令为 brew install unar 2>/dev/null || true,位于『Install unar if missing』注释下,失败被吞掉;SKILL.md 未把它列为前置条件(前置条件段落只说要 macOS 与 Takeout zip)。已在 external_deps 与 network_calls 中标为条件性、尽力而为。
  • [discrepancy] rm -rf 的危险性是否被如实标注 — 〔第二遍标注:第一遍低估,已加强〕Step 8 的清理命令确为 rm -rf <extract-dir>,作用是删除解包出来的整棵目录树。命令上方注释写了『(user confirms)』,但这是文档级约束、无技术强制;已在 file_writes 与 verdict.risks 中单列,并指出它同时是隐私卫生措施(不留私人历史副本)——两个动机都要讲,避免读者只看到「破坏性」。
  • [ok] PII 保护是否只是声明 — 报告第 7 节模板字段(File / Type / Risk)本身就是「不含内容」的结构;Pitfalls 4 条再次强调 do NOT include their contents;memory 段落要求 PII 摘要而非复制。三处一致,属可执行的结构性约束。
  • [ok] 关键词检索纪律是否与实测证据一致 — Step 5 的四步(设计词表 → grep 全部文件 → 回读前后 10 行 → 三分类后全文重读)与 Pitfalls 2 的实测结论(80%+ 命中全为假阳性)互相印证,报告第 4 节要求列出假阳性条数与原因——方法、证据、交付物三者闭环。
  • [ok] memory 写入是否有副作用管理 — Step 7 限定三个触发条件、要求遵循项目既有 frontmatter 约定、要带 originSessionId 溯源、要更新 MEMORY.md 索引、且『Never duplicate what's already in memory — update existing files instead』。副作用有明确协议。
  • [ok] 元数据(license/stars/last_push) — 取自同 repo 同 commit 的池内既有值(MIT、1385★、2026-09-09T12:33:29Z);本次未联网复核 gh。

6Verdict & Scenarios

  • Determines conversation type before analyzing, preventing framework mismatches.
  • Strict anti-false-positive discipline enforced directly in final deliverables.
  • Privacy-first design: PII records only file, type, and risk without transcriptions; memory stores summaries only.
  • Context-efficient strategy (first/last 10% sampling + batched parallel sub-agents) reliably handles massive exports.
  • Derived from real-world edge cases with concrete symptoms and numbers for direct reusability.
  • Best for: Ideal for individual users who just completed a Google Takeout export and want to review a year's worth of Gemini interactions. Also fits research-oriented workflows needing to locate domain-specific content (finance, legal, HR) across extensive conversation archives—the keyword search, context verification, and false-positive logging solve the issue of irrelevant grep hits. Especially convenient when a structured, deliverable 7-section analysis report is required.
    Not for: Not suitable for workflows aiming to automatically reorganize or reorder conversation logs (analyzes only, does not restructure); unsuitable for environments where passing private histories to model contexts is unacceptable (lacks local anonymization); unsuitable where deterministic statistical metrics are required (categorization and proportions rely on model inference and are non-reproducible); unsuitable for non-Google Takeout chat export formats; and not intended for users seeking one-click conclusions without human judgment, as context re-reads and manual false-positive triage make it intentionally thorough.
    Install Agent-Ready
    ① Verified Mirror 2026-09-15
    Option A · Direct DownloadDownload gemini-history-analyzer.tar.gz
    sha256: 16d58ad7768cadfe…
    Option B · Copy Guide for Agent
    install.json
    Agents automatically download and verify mirrors from this JSON guide.
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit d5c4678cb5.