data-analysis
БесплатноБез исполняемых скриптовНе проверенAnalyze spreadsheet data, generate insights, and create visualizations. Use when a user asks to analyze data, explore a dataset, find trends, generate…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Data Analysis
Overview
Analyze tabular data from CSV, Excel, or other structured formats. Generate summary statistics, discover patterns, answer specific questions, and produce visualizations. Uses Python with pandas for data manipulation and matplotlib/seaborn for charts.
Instructions
When a user asks you to analyze data, follow this process:
Step 1: Verify dependencies
Ensure required Python packages are available (pandas 3.x needs Python 3.11+; on older pandas 2.x use 'ME' only from 2.2 on):
python3 -c "import pandas; import matplotlib; import seaborn; print('All packages available')" 2>/dev/null || \
pip install pandas matplotlib seaborn openpyxl
# For reproducible, supply-chain-safe installs, pin exact versions in requirements.txt
# (e.g. pandas==3.0.6) and install with `pip install -r requirements.txt`.
Step 2: Load and inspect the data
Read the file and understand its structure:
import pandas as pd
# Load the data (auto-detect format)
df = pd.read_csv("data.csv") # For CSV
# df = pd.read_excel("data.xlsx") # For Excel
# df = pd.read_json("data.json") # For JSON
# Initial inspection
print(f"Shape: {df.shape[0]} rows x {df.shape[1]} columns")
print(f"\nColumns: {list(df.columns)}")
print(f"\nData types:\n{df.dtypes}")
print(f"\nFirst 5 rows:\n{df.head()}")
print(f"\nMissing values:\n{df.isnull().sum()}")
Report the dataset structure to the user before proceeding:
- Number of rows and columns
- Column names and data types
- Missing value counts
- Any obvious data quality issues
Step 3: Generate summary statistics
# Numeric summary
print(df.describe())
# Categorical summary (pandas 3 stores text as the "str" dtype, so "object" alone misses it)
for col in df.select_dtypes(include=['object', 'string']).columns:
print(f"\n{col} - unique values: {df[col].nunique()}")
print(df[col].value_counts().head(10))
# Correlations between numeric columns
print(df.select_dtypes(include='number').corr())
Step 4: Answer specific questions or explore patterns
Based on the user's request, perform targeted analysis:
Filtering and aggregation:
# Group by category and compute stats
summary = df.groupby('category').agg(
count=('id', 'count'),
avg_value=('value', 'mean'),
total=('value', 'sum')
).sort_values('total', ascending=False)
Time series analysis:
df['date'] = pd.to_datetime(df['date'])
# 'ME' = month end; the old 'M' alias raises an error in pandas 3
monthly = df.resample('ME', on='date').agg({'revenue': 'sum', 'orders': 'count'})
Outlier detection:
Q1 = df['value'].quantile(0.25)
Q3 = df['value'].quantile(0.75)
IQR = Q3 - Q1
outliers = df[(df['value'] < Q1 - 1.5*IQR) | (df['value'] > Q3 + 1.5*IQR)]
print(f"Found {len(outliers)} outliers")
Step 5: Create visualizations
Save charts as image files:
import matplotlib.pyplot as plt
import seaborn as sns
plt.style.use('seaborn-v0_8-darkgrid')
fig, ax = plt.subplots(figsize=(10, 6))
# Bar chart
df.groupby('category')['revenue'].sum().plot(kind='bar', ax=ax)
ax.set_title('Revenue by Category')
ax.set_ylabel('Revenue ($)')
plt.tight_layout()
plt.savefig('chart_revenue_by_category.png', dpi=150)
plt.close()
# Line chart for trends
fig, ax = plt.subplots(figsize=(10, 6))
monthly['revenue'].plot(ax=ax)
ax.set_title('Monthly Revenue Trend')
plt.tight_layout()
plt.savefig('chart_monthly_trend.png', dpi=150)
plt.close()
# Correlation heatmap
fig, ax = plt.subplots(figsize=(8, 6))
sns.heatmap(df.select_dtypes(include='number').corr(), annot=True, cmap='coolwarm', ax=ax)
plt.tight_layout()
plt.savefig('chart_correlation.png', dpi=150)
plt.close()
Step 6: Present findings
Summarize the analysis with:
- Key statistics (totals, averages, medians)
- Notable patterns or trends discovered
- Outliers or anomalies
- Visualizations with descriptions
- Actionable insights or recommendations
Examples
Example 1: Analyze sales data
User request: "Analyze this sales CSV and tell me what's trending"
Actions:
- Load
sales.csvand inspect (columns: date, product, category, quantity, price, region) - Compute total revenue (quantity * price), group by month
- Identify top products and categories by revenue
- Detect growth trends by comparing recent months to prior months
- Create a monthly revenue trend line chart and a category breakdown bar chart
Output: "Sales totaled $2.4M over 12 months. Revenue grew 15% quarter-over-quarter. Electronics is the top category (42% of revenue). The Southwest region underperforms at 8% of total sales despite covering 20% of stores. See the attached charts for trends."
Example 2: Compare two datasets
User request: "Compare last year's performance to this year"
Actions:
- Load both CSV files
- Align on common columns (date, metric)
- Compute year-over-year changes for key metrics
- Highlight improvements and re
Установить data-analysis в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл data-analysis?
Analyze spreadsheet data, generate insights, and create visualizations. Use when a user asks to analyze data, explore a dataset, find trends, generate statistics, create charts from CSV or Excel data, summarize data, or answer questions about tabular data.
Как установить скилл data-analysis?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл data-analysis запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic