Analyze
Overview
The analysis skill provides two modes for generating PM insights from structured sources:
| Mode |
Purpose |
Output |
--data |
Python-based analysis of CSV/Excel files (retention, funnel, segmentation) |
outputs/insights/data-analysis-YYYY-MM-DD.md |
--kb |
Knowledge Base gap analysis (pain points, missing articles, AI opportunities) |
outputs/insights/kb-gaps-YYYY-MM-DD.md |
When to Use
--data Mode
- User provides CSV, Excel, or structured data files
- User asks for "analysis", "insights", "metrics", "trends", or "charts"
- Data exists in
inputs/data/ folder
- User wants to understand product performance
--kb Mode
- Have KB article exports to analyze
- Want to understand what users struggle with most
- Exploring AI assistant opportunities
- Planning documentation improvements
Mode: --data
Process
Step 1: Choose Analysis Method
Your goal is to provide the most accurate analysis. Autonomously select the best method based on the data and the user's query.
- Examine the data source and the user's query.
- If the data is simple (e.g., < 500 rows, clear headers) and the query is a straightforward aggregation (counting, sorting, grouping), you may perform the analysis directly via LLM calculation.
- Else (i.e., the analysis requires complex calculations, statistics, visualizations, or the data is large/complex), you must generate and execute a Python script to ensure accuracy.
- When in doubt, default to using a Python script.
- Announce which method you are choosing and why before proceeding with the analysis.
Step 2: Execute Analysis
IF Direct LLM Calculation was chosen:
- Read the content of the data file.
- Perform the requested calculations directly.
- Proceed to Step 3, ensuring all findings and claims are based on your direct calculations.
IF Python Script Execution was chosen:
- Exploratory Data Analysis (EDA): Write and execute a Python script to get basic info.
import pandas as pd
# Load data, print shape, dtypes, head, describe, isnull, etc.
- Data Dictionary: Create a markdown table for the data dictionary. Ask the user to clarify any unknown column meanings before proceeding.
- Analysis Plan: Propose an analysis plan to the user.
- Execution & Visualization: Upon approval, write and execute the Python script to perform the analysis and generate any required visualizations (e.g., charts saved to
outputs/insights/).
- Proceed to Step 3, ensuring all findings and claims are based on the Python script's output.
Step 3: Generate Output
Write to outputs/insights/data-analysis-YYYY-MM-DD.md. The output must be structured as follows and must include the analysis_method field in the YAML frontmatter.
---
generated: YYYY-MM-DD HH:MM
skill: analyze --data
analysis_method: "Direct LLM Calculation" # or "Python Script Execution"
sources:
- inputs/data/filename.csv (modified: YYYY-MM-DD)
downstream: []
---
# Data Analysis: [Dataset Name]
## Analysis Method
This analysis was performed via **[Direct LLM Calculation / Python Script Execution]**.
## Dataset Overview
| Attribute | Value |
|-----------|-------|
| Rows | N |
| Columns | N |
| Date range | [if applicable] |
## Data Dictionary
| Column | Type | Example Values | Meaning |
|--------|------|----------------|---------|
| ... | ... | ... | Explicit/Unknown |
## Key Metrics
| Metric | Value | Source |
|--------|-------|--------|
| [Metric name] | [Number] | [Direct Calculation / Python output] |
## Findings
1. **[Finding]** - Evidence: [Direct Calculation / Python output]
## Hypotheses (require validation)
1. **[Hypothesis]** - Based on: [observation]
## Visualizations
- [Chart description]: outputs/insights/[filename].png
## Sources Used
- [file paths]
## Claims Ledger
| Claim | Type | Source |
|-------|------|--------|
| [Metric] | Evidence | [Direct Calculation / Python output] |
| [Trend interpretation] | Hypothesis | [Based on metric X] |
Mode: --kb
Process
Step 1: Gather Sources
Read files in:
inputs/knowledge_base/ - KB article exports
outputs/insights/voc-synthesis-*.md - VOC insights (if available, for correlation)
Step 2: Analyze Article Coverage
For each KB article (or category), note:
- Topic / Category
- Article count
- Last updated date
- Estimated complexity (simple how-to vs. complex troubleshooting)
Step 3: Identify Gaps
Look for:
- High-volume topics - Many articles = users struggle here
- Outdated articles - Not updated in 6+ months
- Missing topics - VOC mentions issues with no KB coverage
- Complex troubleshooting - Multi-step processes that could be simplified
Step 4: Assess AI Opportunities
For each gap, evaluate:
| Opportunity Type |
Criteria |
Risk Level |
| Better search/IA |
Hard to find articles |
Low |
| Guided resolution |
Multi-step process |
Low-Medium |
| AI-assisted |
Can be automated with citations |
Medium |
| DO NOT automate |
Compliance, billing, trust-sensitive |
High |
Step 5: Generate Output
Write to outputs/insights/kb-gaps-YYYY-MM-DD.md:
---
generated: YYYY-MM-DD HH:MM
skill: analyze --kb
sources:
- inputs/knowledge_base/*.md
- outputs/insights/voc-synthesis-*.md (if used)
downstream:
- outputs/roadmap/Qx-YYYY-charters.md
---
# KB Gap Analysis: [Date]
## Executive Summary
[2-3 sentences: What's the state of KB? Where are the biggest gaps?]
## Coverage Overview
| Category | Article Count | Last Updated | Complexity | Gap Score |
|----------|---------------|--------------|------------|-----------|
| [Category 1] | N | YYYY-MM-DD | Simple/Complex | High/Med/Low |
## High-Volume Topics
*Categories with most articles (signal: users struggle here)*
| Topic | Article Count | Sample Titles | VOC Correlation |
|-------|---------------|---------------|-----------------|
| [Topic] | N | [title1, title2] | [Yes/No/Unknown] |
## Missing / Outdated Articles
| Gap | Type | Evidence | Priority |
|-----|------|----------|----------|
| [Topic with no article] | Missing | VOC mentions in [file] | High |
| [Article X] | Outdated | Last updated [date] | Medium |
## AI Opportunity Assessment
### Safe to Automate (Low Risk)
| Opportunity | Type | Rationale |
|-------------|------|-----------|
| [Better search for X] | Search/IA | Articles exist but hard to find |
| [Guided wizard for Y] | Guided resolution | Clear steps, no judgment needed |
### Automate with Caution (Medium Risk)
| Opportunity | Type | Guardrails Needed |
|-------------|------|-------------------|
| [AI assist for Z] | AI-assisted | Must cite source article, human review |
### DO NOT Automate (High Risk)
| Topic | Reason |
|-------|--------|
| [Billing disputes] | Financial, requires human judgment |
| [Data deletion] | Compliance, irreversible |
| [Access control] | Trust/security sensitive |
## Recommendations
1. **[Recommendation]** - Evidence: [source]
## Sources Used
- [file paths]
## Claims Ledger
| Claim | Type | Source |
|-------|------|--------|
| [High volume in X] | Evidence | [article count] |
| [Users struggle with Y] | Evidence | [VOC file] |
Quick Reference
--data Mode
| Action |
Command |
| Load CSV |
pd.read_csv('inputs/data/file.csv') |
| Load Excel |
pd.read_excel('inputs/data/file.xlsx') |
| Save chart |
plt.savefig('outputs/insights/output.png') |
| Check nulls |
df.isnull().sum() |
--kb Mode
| Risk Level |
Examples |
Action |
| Low |
Search improvements, FAQ bots |
Safe to build |
| Medium |
Troubleshooting assistants |
Build with guardrails |
| High |
Billing, compliance, security |
Human only |
Common Mistakes
--data Mode
- Assuming column meanings: "user_id probably means..." -> Ask user to confirm
- Stating implications as facts: "Users are churning because..." -> Label as hypothesis
- Using sample data for conclusions: "Based on 10 rows..." -> Ensure representative data
- Ignoring missing data: 50% nulls in key column -> Report this prominently
- No data dictionary: Jumping to analysis -> Always document columns first
--kb Mode
- Counting wrong: "Many articles" -> Exact count: "47 articles"
- Missing VOC correlation: KB analysis in isolation -> Cross-reference with VOC
- Underestimating risk: "AI can handle billing" -> Compliance topics need humans
- No priorities: "Everything is a gap" -> Rank by impact
- Stale analysis: Using old VOC -> Check VOC synthesis date
Verification Checklist
--data
--kb
Output Locations
| Mode |
Primary Output |
History |
--data |
outputs/insights/data-analysis-YYYY-MM-DD.md |
history/analyze/data/ |
--kb |
outputs/insights/kb-gaps-YYYY-MM-DD.md |
history/analyze/kb/ |
Evidence Tracking
| Claim |
Type |
Source |
| [Metric] |
Evidence |
[Python output] |
| [Trend interpretation] |
Hypothesis |
[Based on metric X] |
| [Column meaning] |
Evidence/Unknown |
[User confirmed / Not stated] |
| [47 articles on X] |
Evidence |
[KB export count] |
| [Users complain about Y] |
Evidence |
[VOC file:line] |
| [Safe to automate Z] |
Assumption |
[no compliance concern identified] |
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: analyze-23description: Unified analysis skill - Python data analysis (--data) or KB gap identification (--kb) Use when this capability is needed.4---56# Analyze78## Overview910The analysis skill provides two modes for generating PM insights from structured sources:1112| Mode | Purpose | Output |13|------|---------|--------|14| `--data` | Python-based analysis of CSV/Excel files (retention, funnel, segmentation) | `outputs/insights/data-analysis-YYYY-MM-DD.md` |15| `--kb` | Knowledge Base gap analysis (pain points, missing articles, AI opportunities) | `outputs/insights/kb-gaps-YYYY-MM-DD.md` |1617## When to Use1819### --data Mode20- User provides CSV, Excel, or structured data files21- User asks for "analysis", "insights", "metrics", "trends", or "charts"22- Data exists in `inputs/data/` folder23- User wants to understand product performance2425### --kb Mode26- Have KB article exports to analyze27- Want to understand what users struggle with most28- Exploring AI assistant opportunities29- Planning documentation improvements3031---3233## Mode: --data3435### Process3637**Step 1: Choose Analysis Method**3839Your goal is to provide the most accurate analysis. Autonomously select the best method based on the data and the user's query.40411. **Examine the data source and the user's query.**422. **If** the data is simple (e.g., < 500 rows, clear headers) and the query is a straightforward aggregation (counting, sorting, grouping), you may perform the analysis **directly via LLM calculation**.433. **Else** (i.e., the analysis requires complex calculations, statistics, visualizations, or the data is large/complex), you **must** generate and execute a **Python script** to ensure accuracy.444. **When in doubt, default to using a Python script.**455. Announce which method you are choosing and why before proceeding with the analysis.4647**Step 2: Execute Analysis**4849---50***IF `Direct LLM Calculation` was chosen:***51521. Read the content of the data file.532. Perform the requested calculations directly.543. Proceed to **Step 3**, ensuring all findings and claims are based on your direct calculations.5556---57***IF `Python Script Execution` was chosen:***58591. **Exploratory Data Analysis (EDA):** Write and execute a Python script to get basic info.60 ```python61 import pandas as pd62 # Load data, print shape, dtypes, head, describe, isnull, etc.63 ```642. **Data Dictionary:** Create a markdown table for the data dictionary. Ask the user to clarify any unknown column meanings before proceeding.653. **Analysis Plan:** Propose an analysis plan to the user.664. **Execution & Visualization:** Upon approval, write and execute the Python script to perform the analysis and generate any required visualizations (e.g., charts saved to `outputs/insights/`).675. Proceed to **Step 3**, ensuring all findings and claims are based on the Python script's output.6869---7071**Step 3: Generate Output**7273Write to `outputs/insights/data-analysis-YYYY-MM-DD.md`. The output must be structured as follows and must include the `analysis_method` field in the YAML frontmatter.7475```markdown76---77generated: YYYY-MM-DD HH:MM78skill: analyze --data79analysis_method: "Direct LLM Calculation" # or "Python Script Execution"80sources:81 - inputs/data/filename.csv (modified: YYYY-MM-DD)82downstream: []83---8485# Data Analysis: [Dataset Name]8687## Analysis Method88This analysis was performed via **[Direct LLM Calculation / Python Script Execution]**.8990## Dataset Overview91| Attribute | Value |92|-----------|-------|93| Rows | N |94| Columns | N |95| Date range | [if applicable] |9697## Data Dictionary98| Column | Type | Example Values | Meaning |99|--------|------|----------------|---------|100| ... | ... | ... | Explicit/Unknown |101102## Key Metrics103| Metric | Value | Source |104|--------|-------|--------|105| [Metric name] | [Number] | [Direct Calculation / Python output] |106107## Findings1081. **[Finding]** - Evidence: [Direct Calculation / Python output]109110## Hypotheses (require validation)1111. **[Hypothesis]** - Based on: [observation]112113## Visualizations114- [Chart description]: outputs/insights/[filename].png115116## Sources Used117- [file paths]118119## Claims Ledger120| Claim | Type | Source |121|-------|------|--------|122| [Metric] | Evidence | [Direct Calculation / Python output] |123| [Trend interpretation] | Hypothesis | [Based on metric X] |124```125126---127128## Mode: --kb129130### Process131132**Step 1: Gather Sources**133134Read files in:135- `inputs/knowledge_base/` - KB article exports136- `outputs/insights/voc-synthesis-*.md` - VOC insights (if available, for correlation)137138**Step 2: Analyze Article Coverage**139140For each KB article (or category), note:141- Topic / Category142- Article count143- Last updated date144- Estimated complexity (simple how-to vs. complex troubleshooting)145146**Step 3: Identify Gaps**147148Look for:1491. **High-volume topics** - Many articles = users struggle here1502. **Outdated articles** - Not updated in 6+ months1513. **Missing topics** - VOC mentions issues with no KB coverage1524. **Complex troubleshooting** - Multi-step processes that could be simplified153154**Step 4: Assess AI Opportunities**155156For each gap, evaluate:157158| Opportunity Type | Criteria | Risk Level |159|------------------|----------|------------|160| Better search/IA | Hard to find articles | Low |161| Guided resolution | Multi-step process | Low-Medium |162| AI-assisted | Can be automated with citations | Medium |163| **DO NOT automate** | Compliance, billing, trust-sensitive | High |164165**Step 5: Generate Output**166167Write to `outputs/insights/kb-gaps-YYYY-MM-DD.md`:168169```markdown170---171generated: YYYY-MM-DD HH:MM172skill: analyze --kb173sources:174 - inputs/knowledge_base/*.md175 - outputs/insights/voc-synthesis-*.md (if used)176downstream:177 - outputs/roadmap/Qx-YYYY-charters.md178---179180# KB Gap Analysis: [Date]181182## Executive Summary183[2-3 sentences: What's the state of KB? Where are the biggest gaps?]184185## Coverage Overview186187| Category | Article Count | Last Updated | Complexity | Gap Score |188|----------|---------------|--------------|------------|-----------|189| [Category 1] | N | YYYY-MM-DD | Simple/Complex | High/Med/Low |190191## High-Volume Topics192*Categories with most articles (signal: users struggle here)*193194| Topic | Article Count | Sample Titles | VOC Correlation |195|-------|---------------|---------------|-----------------|196| [Topic] | N | [title1, title2] | [Yes/No/Unknown] |197198## Missing / Outdated Articles199200| Gap | Type | Evidence | Priority |201|-----|------|----------|----------|202| [Topic with no article] | Missing | VOC mentions in [file] | High |203| [Article X] | Outdated | Last updated [date] | Medium |204205## AI Opportunity Assessment206207### Safe to Automate (Low Risk)208| Opportunity | Type | Rationale |209|-------------|------|-----------|210| [Better search for X] | Search/IA | Articles exist but hard to find |211| [Guided wizard for Y] | Guided resolution | Clear steps, no judgment needed |212213### Automate with Caution (Medium Risk)214| Opportunity | Type | Guardrails Needed |215|-------------|------|-------------------|216| [AI assist for Z] | AI-assisted | Must cite source article, human review |217218### DO NOT Automate (High Risk)219| Topic | Reason |220|-------|--------|221| [Billing disputes] | Financial, requires human judgment |222| [Data deletion] | Compliance, irreversible |223| [Access control] | Trust/security sensitive |224225## Recommendations2261. **[Recommendation]** - Evidence: [source]227228## Sources Used229- [file paths]230231## Claims Ledger232| Claim | Type | Source |233|-------|------|--------|234| [High volume in X] | Evidence | [article count] |235| [Users struggle with Y] | Evidence | [VOC file] |236```237238---239240## Quick Reference241242### --data Mode243244| Action | Command |245|--------|---------|246| Load CSV | `pd.read_csv('inputs/data/file.csv')` |247| Load Excel | `pd.read_excel('inputs/data/file.xlsx')` |248| Save chart | `plt.savefig('outputs/insights/output.png')` |249| Check nulls | `df.isnull().sum()` |250251### --kb Mode252253| Risk Level | Examples | Action |254|------------|----------|--------|255| Low | Search improvements, FAQ bots | Safe to build |256| Medium | Troubleshooting assistants | Build with guardrails |257| High | Billing, compliance, security | Human only |258259---260261## Common Mistakes262263### --data Mode264- **Assuming column meanings:** "user_id probably means..." -> Ask user to confirm265- **Stating implications as facts:** "Users are churning because..." -> Label as hypothesis266- **Using sample data for conclusions:** "Based on 10 rows..." -> Ensure representative data267- **Ignoring missing data:** 50% nulls in key column -> Report this prominently268- **No data dictionary:** Jumping to analysis -> Always document columns first269270### --kb Mode271- **Counting wrong:** "Many articles" -> Exact count: "47 articles"272- **Missing VOC correlation:** KB analysis in isolation -> Cross-reference with VOC273- **Underestimating risk:** "AI can handle billing" -> Compliance topics need humans274- **No priorities:** "Everything is a gap" -> Rank by impact275- **Stale analysis:** Using old VOC -> Check VOC synthesis date276277---278279## Verification Checklist280281### --data282- [ ] Data dictionary created with all columns283- [ ] Unknown meanings explicitly marked284- [ ] User confirmed column semantics before analysis285- [ ] Metrics separated from hypotheses286- [ ] Missing data reported287- [ ] Charts saved to outputs/insights/288- [ ] All code executed successfully289- [ ] Metadata header complete290- [ ] Copied to history, tracker updated291292### --kb293- [ ] All KB files read294- [ ] Article counts accurate295- [ ] Outdated articles identified (6+ months)296- [ ] VOC correlation checked (if available)297- [ ] AI opportunities categorized by risk298- [ ] DO NOT automate list includes compliance/billing/trust topics299- [ ] Recommendations backed by evidence300- [ ] Metadata header complete301- [ ] Copied to history, tracker updated302303---304305## Output Locations306307| Mode | Primary Output | History |308|------|---------------|---------|309| `--data` | `outputs/insights/data-analysis-YYYY-MM-DD.md` | `history/analyze/data/` |310| `--kb` | `outputs/insights/kb-gaps-YYYY-MM-DD.md` | `history/analyze/kb/` |311312---313314## Evidence Tracking315316| Claim | Type | Source |317|-------|------|--------|318| [Metric] | Evidence | [Python output] |319| [Trend interpretation] | Hypothesis | [Based on metric X] |320| [Column meaning] | Evidence/Unknown | [User confirmed / Not stated] |321| [47 articles on X] | Evidence | [KB export count] |322| [Users complain about Y] | Evidence | [VOC file:line] |323| [Safe to automate Z] | Assumption | [no compliance concern identified] |324325---326> Converted and distributed by [TomeVault](https://tomevault.io/claim/nuggetswise) — claim your Tome and manage your conversions.327<!-- tomevault:4.0:skill_md:2026-04-14 -->