双子座历史分析器
- 作者仓库星标 0
- 作者更新于 2026年8月24日 07:33
- 作者仓库 claude-code-skills
- 领域
- 人工智能
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @daymade · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- macOS
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第 1 步:解压缩 ZIP
Google Takeout 文件包含中文/Unicode 文件名。 macOS `unzip` 会损坏这些 — 始终使用 `unar`。标准结构:
第 2 步:清点并分类
在读取任何单个文件之前运行完整清单:构建一个表,其中包含:文件总数、总大小按文件类型细分(txt 计数/大小、媒体计数/大小等)日期范围(如果文件时间戳有意义)
第 3 步:采样和分类
读取分布在文件列表中的 3-5 个 txt 文件(不仅仅是前几个 — 时间戳/文件大小可能按类型聚集)。对于每个: 阅读前约 100 行以确定对话类型 识别语言(中文/英文/混合) 对主题领域进行高层次分类 注意发言者数量和模式
第四步:完整内容分析
对于每个 txt 文件,读取并提取:
第 5 步:特定领域的关键字搜索
查找特定领域(金融、法律等)中的内容时: 使用 AND/OR 逻辑设计关键字列表 — 例如,金融:`stock OR investment OR fund OR portfolio OR 股票 OR 投资 OR 基金`,还有特定领域的术语,如 `EPS`、`P/E`、`dividend`、`arbitrage` Grep 每个关键字批次的每个 txt 文件阅读周围的上下文(每次匹配之前/之后 10 行)- 单独关键字匹配产生大量误报。 “投资”可以指商业策略,“选项”可以指UI选择,“基金”可以指保险功能
第7步:生成内存文件(可选)
如果用户想要将结果保留为项目内存(如`.claude/projects/<path>/memory/`):
# Gemini History Analyzer
Extract, categorize, and analyze Google Takeout ZIP exports of Gemini Apps activity. The skill handles:
- Extraction (with Chinese/Unicode filename support)
- Content categorization and topic analysis
- User profile extraction from conversation patterns
- Domain-specific keyword search with context verification
- PII/sensitive content detection
- Structured report generation with optional memory file creation
## Quick Judgment: Meeting Transcripts vs Prompt-Response
Before full analysis, sample 3-5 files to determine the **conversation type**:
| Signal | Meeting Transcript | Prompt-Response |
|--------|-------------------|-----------------|
| Speaker labels | "张三:"、"李四:"、"Speaker 1:" | "User:"、"Assistant:"、"You:" |
| Content pattern | Discussion flow, turn-taking, small talk | Q&A, instruction→output |
| Length distribution | Variable, lots of short turns | Longer assistant responses |
| File naming | Often Chinese, meeting-style titles | English, topic-based titles |
The analysis approach differs:
- **Meeting transcripts** → topic categorization, speaker analysis, decision tracking, user profile extraction
- **Prompt-response** → usage pattern analysis, capability assessment, interest domain mapping
## Step 1: Extract the ZIP
Google Takeout files contain Chinese/Unicode filenames. **macOS `unzip` corrupts these — always use `unar`.**
```bash
# Install unar if missing
brew install unar 2>/dev/null || true
# Extract to a target directory
unar -o <output-dir> -q "<takeout-zip-path>"
```
The standard structure:
```
Takeout/
└── My Activity/
└── Gemini Apps/
├── *.txt # Conversation transcripts
├── *.html # Web-format backups (rare)
├── *.png/jpg # Images from conversations
├── *.mp3/mp4/wav # Audio/video attachments
├── *.pdf # Uploaded/shared documents
├── *.xlsx/docx # Office documents
└── *.zip # Nested archives (animation frames, etc.)
```
## Step 2: Inventory and Categorize
Run a full inventory before reading any single file:
```bash
# Count by extension
find <extract-dir> -type f | sed 's/.*\.//' | sort | uniq -c | sort -rn
# List all txt files (these are the primary content)
find <extract-dir> -name "*.txt" -type f | sort
# Get total size per type
find <extract-dir> -type f -exec du -sh {} \; | sort -rh | head -30
```
Build a table of:
- Total file count, total size
- Breakdown by file type (txt count/size, media count/size, etc.)
- Date range if file timestamps are meaningful
## Step 3: Sample and Classify
Read 3-5 txt files spread across the file list (not just the first few — timestamps/file sizes may cluster by type). For each:
1. Read the first ~100 lines to determine conversation type
2. Identify language (Chinese/English/mixed)
3. Classify topic area at a high level
4. Note speaker count and pattern
Use this sample to decide the analysis strategy for the remaining files.
## Step 4: Full Content Analysis
For each txt file, read and extract:
### 4a. Metadata
- Title (filename minus hash suffix)
- Approximate duration (from transcript timestamps)
- Speaker count and identities
- Language mix (Chinese % / English %)
### 4b. Topic Classification
Assign primary + secondary topics. Default categories (adjust based on actual content):
- Software Development
- AI/LLM Tools & Workflows
- Infrastructure/Cloud/DevOps
- Business/Strategy
- Product/Design
- Team/HR/Personnel
- Finance/Investment (this is often the target of analysis)
- Legal/Compliance
- Personal/Other
### 4c. Key Findings Per File
For each file, capture:
- Main discussion points (3-5 bullets)
- Decisions made or action items
- Notable quotes (verbatim, with context)
- Relationships mentioned (people, companies, projects)
## Step 5: Domain-Specific Keyword Search
When looking for content in a specific domain (finance, legal, etc.):
1. **Design keyword list with AND/OR logic** — e.g., finance: `stock OR investment OR fund OR portfolio OR 股票 OR 投资 OR 基金`, but also domain-specific terms like `EPS`, `P/E`, `dividend`, `arbitrage`
2. **Grep every txt file** for each keyword batch
3. **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
4. **Classify each match** as:
- Definite hit (the conversation is about this domain)
- False positive (same word, different meaning)
- Ambiguous (needs deeper reading)
5. **Re-read full files** for definite + ambiguous hits
Never stop at grep output — context verification is mandatory.
## Step 6: Generate Report
### Report Structure
```markdown
# Gemini History Analysis Report
**Source**: <zip filename>
**Date analyzed**: <today>
**Extraction size**: <N files, N MB>
## 1. Content Overview
- Total conversations: N
- Conversation type: [Meeting Transcripts | Prompt-Response | Mixed]
- Language distribution: X% Chinese, Y% English, Z% Mixed
- Date range: <earliest> to <latest>
- Media attachments: N images, N audio, N video
## 2. Topic Distribution
| Category | Count | % | Notes |
|----------|-------|---|-------|
| ... | | | |
## 3. Key Findings
(Bulleted, organized by significance)
## 4. Domain-Specific Analysis
(If user requested finance/legal/etc. keyword search)
- Matches found: N
- Confirmed relevant: N
- False positives: N (with examples of what caused them)
## 5. Notable Documents
Non-txt files worth attention: PDFs, spreadsheets, etc.
## 6. Valuable Quotes
Verbatim quotes that capture key insights
## 7. PII / Sensitive Content
(Flag if detected — do NOT include the actual PII in the report)
- File: <name>, Type: <resume/background-check/etc.>, Risk: <high/medium/low>
```
## Step 7: Memory File Generation (Optional)
If the user wants to persist findings as project memory (like `.claude/projects/<path>/memory/`):
### When to generate memory files
- User explicitly asks ("build user profile", "remember this")
- The analysis reveals reusable insights about the user's preferences, workflows, or constraints
- The project has a memory system (check for existing `memory/MEMORY.md`)
### Memory file types to offer
1. **User profile** (`user-profile.md`) — if conversations reveal user's role, preferences, personality
2. **Feedback/Workflow** (`feedback-*.md`) — if conversations reveal proven workflows, dos/don'ts
3. **Project context** (`project-*.md`) — if conversations reveal ongoing projects, decisions, constraints
### Memory writing protocol
- Follow the project's existing memory format (check other memory files for frontmatter conventions)
- Include `originSessionId` or source tag pointing back to the analysis
- Update `MEMORY.md` index with new entries
- Never duplicate what's already in memory — update existing files instead
## Step 8: Cleanup
```bash
# Remove extracted files after analysis complete (user confirms)
rm -rf <extract-dir>
```
## Critical Pitfalls (From Real Usage)
### 1. ZIP extraction: ALWAYS use `unar`
macOS `unzip` silently corrupts Chinese filenames — files become garbled paths, many fail to extract. `brew install unar` + `unar -o <dir> <zip>` handles everything correctly.
### 2. Keyword search: grep is step 1, not the answer
Keyword matching on "stock", "investment", "fund", "option", "portfolio", "trading" produced matches in 80%+ of files in a real analysis — **every single one was a false positive**. These words appear in software development contexts constantly. Always read surrounding context for every match.
### 3. Know what you're reading
Gemini Takeout txt files are NOT the original Gemini prompt-response pairs. They can be:
- Meeting transcripts exported by 飞书妙记 (Feishu Miaojii) and then uploaded to Gemini
- Manual notes copy-pasted into Gemini
- PDF/article text pasted for analysis
Read the first ~100 lines of each file before assuming its nature.
### 4. PII is likely present
Resumes, background check forms, contact lists — these routinely appear in conversation history. Flag them, do NOT include their contents in reports. If creating memory files or wiki pages, ensure PII is summarized, not copied.
### 5. Large files need triage
A 63KB transcript is a 2-hour meeting. Don't read the whole thing unless it's flagged as highly relevant. Read the first 10% + last 10% for gist; read fully only if keyword hits or topic relevance warrant it.
### 6. Parallel reads for scale
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.
章节与文件索引
按说明文件中的顺序排列。
快速判断:会议记录与即时响应
第 1 步:解压缩 ZIP
第 2 步:清点并分类
第 3 步:采样和分类
第四步:完整内容分析
文件/命令 -> unzip · unar · stock OR investment OR fund OR portfolio OR 股票 OR 投资 OR 基金 · EPS · P/E · dividend · arbitrage · .claude/projects/<path>/memory/
内容校验值 -> 5d02c21e95ea
当前原文的自动摘译,尚未人工审校。
快速判断:会议记录与即时响应
在全面分析之前,采样 3-5 个文件以确定对话类型: 信号 · 会议记录 · 快速响应 发言者标签 · “张三:”、“李四:”、“发言者 1:” · “用户:”、“助理:”、“你:” 内容模式 · 讨论流程、轮流、闲聊 · 问答、指示→输出 长度分布 · 可变,大量短轮流 · 较长的助理响应