Data Analysis logo

Data Analysis

Community
JinFanZheng
data-analysis

Data analysis and statistical computation. Use when user needs "数据分析/统计/计算指标/数据洞察". Supports general analysis, financial data (stocks, returns), business data (sales, users), and scientific research. Uses pandas/numpy/scikit-learn for processing. Automatically activates data-base for data acquisition.

Overview

PublisherJinFanZheng
Repositorykode-sdk-csharp
Skill namedata-analysis
Stars
80
Forks
30
Bundled files
7
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by JinFanZheng on GitHub. Read the source before you install it.

Installation

Install the Data Analysis AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/JinFanZheng/kode-sdk-csharp.git /tmp/kode-sdk-csharp
mkdir -p .claude/skills
cp -r /tmp/kode-sdk-csharp/examples/Kode.Agent.WebApiAssistant/skills/data-analysis .claude/skills/data-analysis
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Data Analysis in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Data Analysis on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Data Analysis is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Data Analysis - Statistical Computing & Insights

When to use this skill

Activate this skill when:

  • User mentions "数据分析", "统计", "计算指标", "数据洞察"
  • Need to analyze structured data (CSV, JSON, database)
  • Calculate statistics, trends, patterns
  • Financial analysis (returns, volatility, technical indicators)
  • Business analytics (sales, user behavior, KPIs)
  • Scientific data processing and hypothesis testing

Workflow

1. Get data

⚠️ IMPORTANT: File naming requirements

  • File names MUST NOT contain Chinese characters or non-ASCII characters
  • Use only English letters, numbers, underscores, and hyphens
  • Examples: data.csv, sales_report_2025.xlsx, analysis_results.json
  • ❌ Invalid: 销售数据.csv, 数据文件.xlsx, 報表.json
  • This ensures compatibility across different systems and prevents encoding issues

If data already exists:

  • Read from file (CSV, JSON, Excel)
  • Query database if available

If file names contain Chinese characters:

  • Ask the user to rename the file to English/ASCII characters
  • Or rename the file when saving it to the agent directory

If no data:

  • Automatically activate data-base skill
  • Scrape/collect required data
  • Save to structured format

2. Understand requirements

Ask the user:

  • What questions do you want to answer?
  • What metrics are important?
  • What format for results? (summary, chart, report)
  • Any specific statistical methods?

3. Analyze

General analysis:

  • Descriptive statistics (mean, median, std, percentiles)
  • Distribution analysis (histograms, box plots)
  • Correlation analysis
  • Group comparisons

Financial analysis:

  • Return calculation (simple, log, cumulative)
  • Risk metrics (volatility, VaR, Sharpe ratio)
  • Technical indicators (MA, RSI, MACD)
  • Portfolio analysis

Business analysis:

  • Trend analysis (growth rates, YoY, MoM)
  • Cohort analysis
  • Funnel analysis
  • A/B testing

Scientific analysis:

  • Hypothesis testing (t-test, chi-square, ANOVA)
  • Regression analysis
  • Time series analysis
  • Statistical significance

4. Output

Generate results in:

  • Summary statistics: Tables with key metrics
  • Charts: Save as PNG files
  • Report: Markdown with findings
  • Data: Processed CSV/JSON for further use

Python Environment

Auto-initialize virtual environment if needed, then execute:

bash
cd skills/data-analysis

if [ ! -f ".venv/bin/python" ]; then
    echo "Creating Python environment..."
    ./setup.sh
fi

.venv/bin/python your_script.py

The setup script auto-installs: pandas, numpy, scipy, scikit-learn, statsmodels, with Chinese font support.

Analysis scenarios

General data

python
import pandas as pd

# Load and summarize
df = pd.read_csv('data.csv')
summary = df.describe()
correlations = df.corr()

Financial data

python
# Calculate returns
df['return'] = df['price'].pct_change()

# Risk metrics
volatility = df['return'].std() * (252 ** 0.5)
sharpe = df['return'].mean() / df['return'].std() * (252 ** 0.5)

Business data

python
# Group by category
grouped = df.groupby('category').agg({
    'revenue': ['sum', 'mean', 'count']
})

# Growth rate
df['growth'] = df['revenue'].pct_change()

Scientific data

python
from scipy import stats

# T-test
t_stat, p_value = stats.ttest_ind(group_a, group_b)

# Regression
from sklearn.linear_model import LinearRegression
model = LinearRegression()
model.fit(X, y)

File path conventions

Temporary output (session-scoped)

Files written to the current directory will be stored in the session directory:

python
import time
from datetime import datetime

# Use timestamp for unique filenames (avoid conflicts)
timestamp = datetime.now().strftime('%Y%m%d_%H%M%S')

# Charts and temporary files
plt.savefig(f'analysis_{timestamp}.png')      # → $KODE_AGENT_DIR/analysis_20250115_143022.png
df.to_csv(f'results_{timestamp}.csv')        # → $KODE_AGENT_DIR/results_20250115_143022.csv

Always use unique filenames to avoid conflicts when running multiple analyses:

  • Use timestamps: analysis_20250115_143022.png
  • Use descriptive names + timestamps: sales_report_q1_2025.csv
  • Use random suffix for scripts: script_{random.randint(1000,9999)}.py

User data (persistent)

Use $KODE_USER_DIR for persistent user data:

python
import os
user_dir = os.getenv('KODE_USER_DIR')

# Save to user memory
memory_file = f"{user_dir}/.memory/facts/preferences.jsonl"

# Read from knowledge base
knowledge_dir = f"{user_dir}/.knowledge/docs"

Environment variables

  • KODE_AGENT_DIR: Session directory for temporary output (charts, analysis results)
  • KODE_USER_DIR: User data directory for persistent storage (memory, knowledge, config)

Best practices

  • File names MUST be ASCII-only: No Chinese or non-ASCII characters in filenames
  • Always inspect data first: df.head(), df.info(), df.describe()
  • Handle missing values: Drop or impute based on context
  • Check assumptions: Normality, independence, etc.
  • Visualize: Charts reveal patterns tables hide
  • Document findings: Explain metrics and their implications
  • Use correct paths: Temporary outputs to current dir, persistent data to $KODE_USER_DIR

Quick reference

Environment setup

This skill uses Python scripts. To set up the environment:

bash
# Navigate to the skill directory
cd apps/assistant/skills/data-analysis

# Run the setup script (creates venv and installs dependencies)
./setup.sh

# Activate the environment
source .venv/bin/activate

The setup script will:

  • Create a Python virtual environment in .venv/
  • Install required packages (pandas, numpy, scipy, scikit-learn, statsmodels)

To run Python scripts with the skill environment:

bash
# Use the virtual environment's Python
.venv/bin/python script.py

# Or activate first, then run normally
source .venv/bin/activate
python script.py

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Data Analysis AI skill do?

Data analysis and statistical computation. Use when user needs "数据分析/统计/计算指标/数据洞察". Supports general analysis, financial data (stocks, returns), business data (sales, users), and scientific research. Uses pandas/numpy/scikit-learn for processing. Automatically activates data-base for data acquisition.

Why use Data Analysis on TypingMind?

Because you install it once and use it with any model. Data Analysis is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Data Analysis in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/JinFanZheng/kode-sdk-csharp/tree/main/examples/Kode.Agent.WebApiAssistant/skills/data-analysis. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Data Analysis?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Data Analysis?

As many as you like. As long as a model supports skills, you can use Data Analysis with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Data Analysis AI skill free?

Yes. It is published on GitHub by JinFanZheng under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇