Token导航 LogoToken导航TokenDH.com
研究检索权限需确认github未标认证来源可访问clear审计通过

data-scientist数据科学家

Agent Skill

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

总安装

3,560

周安装

144

GitHub Stars

76

下载量

1,117
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:data-scientist(数据科学家)
来源仓库:https://github.com/404kidwiz/claude-supercode-skills
仓库路径:skills/data-scientist
安装命令:
npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill data-scientist
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill data-scientist

简介

用于数据整理、表格分析和指标计算,辅助生成统计口径与图表准备。

  • 适合清洗字段、汇总数据、发现异常或转换分析结果为可读说明。
  • 使用时需确认数据来源、字段含义和时间范围,避免误用样本当全量事实。
  • 涉及敏感数据或导出文件时,应先确认权限和脱敏边界。
  • 安装方式:通过 npx 从 GitHub 仓库添加。

SKILL.md

Data Scientist

Purpose

Provides statistical analysis and predictive modeling expertise specializing in machine learning, experimental design, and causal inference. Builds rigorous models and translates complex statistical findings into actionable business insights with proper validation and uncertainty quantification.

When to Use

  • Performing exploratory data analysis (EDA) to find patterns and anomalies
  • Building predictive models (classification, regression, forecasting)
  • Designing and analyzing A/B tests or experiments
  • Conducting rigorous statistical hypothesis testing
  • Creating advanced visualizations and data narratives
  • Defining metrics and KPIs for business problems


Core Capabilities

Statistical Modeling

  • Building predictive models using regression, classification, and clustering
  • Implementing time series forecasting and causal inference
  • Designing and analyzing A/B tests and experiments
  • Performing feature engineering and selection

Machine Learning

  • Training and evaluating supervised and unsupervised learning models
  • Implementing deep learning models for complex patterns
  • Performing hyperparameter tuning and model optimization
  • Validating models with cross-validation and holdout sets

Data Exploration

  • Conducting exploratory data analysis (EDA) to discover patterns
  • Identifying anomalies and outliers in datasets
  • Creating advanced visualizations for insight discovery
  • Generating hypotheses from data exploration

Communication and Storytelling

  • Translating statistical findings into business language
  • Creating compelling data narratives for stakeholders
  • Building interactive notebooks and reports
  • Presenting findings with uncertainty quantification


3. Core Workflows

Workflow 1: Exploratory Data Analysis (EDA) & Cleaning

Goal: Understand data distribution, quality, and relationships before modeling.

Steps:

  1. Load and Profile Data import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt # Load data df = pd.read_csv("customer_data.csv") # Basic profiling print(df.info()) print(df.describe()) # Missing values analysis missing = df.isnull().sum() / len(df) print(missing[missing > 0].sort_values(ascending=False))
  2. Univariate Analysis (Distributions) # Numerical features num_cols = df.select_dtypes(include=[np.number]).columns for col in num_cols: plt.figure(figsize=(10, 4)) plt.subplot(1, 2, 1) sns.histplot(df[col], kde=True) plt.subplot(1, 2, 2) sns.boxplot(x=df[col]) plt.show() # Categorical features cat_cols = df.select_dtypes(exclude=[np.number]).columns for col in cat_cols: print(df[col].value_counts(normalize=True))
  3. Bivariate Analysis (Relationships) # Correlation matrix corr = df.corr() sns.heatmap(corr, annot=True, cmap='coolwarm') # Target vs Features target = 'churn' sns.boxplot(x=target, y='tenure', data=df)
  4. Data Cleaning # Impute missing values df['age'].fillna(df['age'].median(), inplace=True) df['category'].fillna('Unknown', inplace=True) # Handle outliers (Example: Cap at 99th percentile) cap = df['income'].quantile(0.99) df['income'] = np.where(df['income'] > cap, cap, df['income'])

Verification:

  • No missing values in critical columns.
  • Distributions understood (normal vs skewed).
  • Target variable balance checked.


Workflow 3: A/B Test Analysis

Goal: Analyze results of a website conversion experiment.

Steps:

  1. Define Hypothesis

- H0: Conversion Rate B <= Conversion Rate A - H1: Conversion Rate B > Conversion Rate A - Alpha: 0.05

  1. Load and Aggregate Data # data: ['user_id', 'group', 'converted'] results = df.groupby('group')['converted'].agg(['count', 'sum', 'mean']) results.columns = ['n_users', 'conversions', 'conversion_rate'] print(results)
  2. Statistical Test (Proportions Z-test) from statsmodels.stats.proportion import proportions_ztest control = results.loc['A'] treatment = results.loc['B'] count = np.array([treatment['conversions'], control['conversions']]) nobs = np.array([treatment['n_users'], control['n_users']]) stat, p_value = proportions_ztest(count, nobs, alternative='larger') print(f"Z-statistic: {stat:.4f}") print(f"P-value: {p_value:.4f}")
  3. Confidence Intervals from statsmodels.stats.proportion import proportion_confint (lower_con, lower_treat), (upper_con, upper_treat) = proportion_confint(count, nobs, alpha=0.05) print(f"Control CI: [{lower_con:.4f}, {upper_con:.4f}]") print(f"Treatment CI: [{lower_treat:.4f}, {upper_treat:.4f}]")
  4. Conclusion

- If p-value < 0.05: Reject H0. Variation B is statistically significantly better. - Check practical significance (Lift magnitude).



Workflow 5: Causal Inference (Propensity Score Matching)

Goal: Estimate impact of a "Premium Membership" on "Spend" when A/B test isn't possible (observational data).

Steps:

  1. Problem Setup

- Treatment: Premium Member (1) vs Free (0) - Outcome: Annual Spend ($) - Confounders: Age, Income, Location, Tenure (Factors affecting both membership and spend)

  1. Calculate Propensity Scores from sklearn.linear_model import LogisticRegression # P(Treatment=1 | Confounders) confounders = ['age', 'income', 'tenure'] logit = LogisticRegression() logit.fit(df[confounders], df['is_premium']) df['propensity_score'] = logit.predict_proba(df[confounders])[:, 1] # Check overlap (Common Support) sns.histplot(data=df, x='propensity_score', hue='is_premium', element='step')
  2. Matching (Nearest Neighbor) from sklearn.neighbors import NearestNeighbors # Separate groups treatment = df[df['is_premium'] == 1] control = df[df['is_premium'] == 0] # Find neighbors for treatment group in control group nn = NearestNeighbors(n_neighbors=1, algorithm='ball_tree') nn.fit(control[['propensity_score']]) distances, indices = nn.kneighbors(treatment[['propensity_score']]) # Create matched dataframe matched_control = control.iloc[indices.flatten()] # Compare outcomes ate = treatment['spend'].mean() - matched_control['spend'].mean() print(f"Average Treatment Effect (ATE): ${ate:.2f}")
  3. Validation (Balance Check)

- Check if confounders are balanced after matching (e.g., Mean Age of Treatment vs Matched Control should be similar). - abs(mean_diff) / pooled_std < 0.1 (Standardized Mean Difference).



5. Anti-Patterns & Gotchas

❌ Anti-Pattern 1: Data Leakage

What it looks like:

  • Scaling/Standardizing the entire dataset *before* train/test split.
  • Using future information (e.g., "next_month_churn") as a feature.
  • Including target-derived features (e.g., mean target encoding) calculated on the whole set.

Why it fails:

  • Model performance is artificially inflated during training/validation.
  • Fails completely in production on new, unseen data.

Correct approach:

  • Split FIRST, then transform.
  • Fit scalers/encoders ONLY on X_train, then transform X_test.
  • Use Pipeline objects to ensure safety.

❌ Anti-Pattern 2: P-Hacking (Data Dredging)

What it looks like:

  • Testing 50 different hypotheses or subgroups.
  • Reporting only the one result with p < 0.05.
  • Stopping an A/B test exactly when significance is reached (peeking).

Why it fails:

  • High probability of False Positives (Type I error).
  • Findings are random noise, not reproducible effects.

Correct approach:

  • Pre-register hypotheses.
  • Apply Bonferroni correction or False Discovery Rate (FDR) control for multiple comparisons.
  • Determine sample size *before* the experiment and stick to it.

❌ Anti-Pattern 3: Ignoring Imbalanced Classes

What it looks like:

  • Training a fraud detection model on data with 0.1% fraud.
  • Reporting 99.9% Accuracy as "Success".

Why it fails:

  • The model simply predicts "No Fraud" for everyone.
  • Fails to detect the actual class of interest.

Correct approach:

  • Use appropriate metrics: Precision-Recall AUC, F1-Score.
  • Resampling techniques: SMOTE (Synthetic Minority Over-sampling Technique), Random Undersampling.
  • Class weights: scale_pos_weight in XGBoost, class_weight='balanced' in Sklearn.


7. Quality Checklist

Methodology & Rigor:

  • Hypothesis defined clearly *before* analysis.
  • Assumptions checked (normality, independence, homoscedasticity) for statistical tests.
  • Train/Test/Validation split performed correctly (no leakage).
  • Imbalanced classes handled appropriate (metrics, resampling).
  • Cross-validation used for model assessment.

Code & Reproducibility:

  • Code stored in git with requirements.txt or environment.yml.
  • Random seeds set for reproducibility (random_state=42).
  • Hardcoded paths replaced with relative paths or config variables.
  • Complex logic wrapped in functions/classes with docstrings.

Interpretation & Communication:

  • Results interpreted in business terms (e.g., "Revenue lift" vs "Log-loss decrease").
  • Confidence intervals provided for estimates.
  • "Black box" models explained using SHAP or LIME if needed.
  • Caveats and limitations explicitly stated.

Performance:

  • EDA performed on sampled data if dataset > 10GB.
  • Vectorized operations used (pandas/numpy) instead of loops.
  • Query optimized (filtering early, selecting only needed columns).

Examples

Example 1: A/B Test Analysis for Feature Launch

Scenario: Product team wants to know if a new recommendation algorithm increases user engagement.

Analysis Approach:

  1. Experimental Design: Random assignment (50/50), minimum sample size calculation
  2. Data Collection: Tracked click-through rate, time on page, conversion
  3. Statistical Testing: Two-sample t-test with bootstrapped confidence intervals
  4. Results: Significant improvement in CTR (p < 0.01), 12% lift

Key Analysis:

# Bootstrap confidence interval for difference in means
from scipy import stats
diff = treatment_means - control_means
ci = np.percentile(bootstrap_diffs, [2.5, 97.5])

Outcome: Feature launched with 95% probability of positive impact

Example 2: Time Series Forecasting for Demand Planning

Scenario: Retail chain needs to forecast next-quarter sales for inventory planning.

Modeling Approach:

  1. Exploratory Analysis: Identified trends, seasonality (weekly, holiday)
  2. Feature Engineering: Promotions, weather, economic indicators
  3. Model Selection: Compared ARIMA, Prophet, and gradient boosting
  4. Validation: Walk-forward validation on last 12 months

Results:

ModelMAPE90% CI Width
ARIMA12.3%±15%
Prophet9.8%±12%
XGBoost7.2%±9%

Deliverable: Production model with automated retraining pipeline

Example 3: Causal Attribution Analysis

Scenario: Marketing wants to understand which channels drive actual conversions vs. appear correlated.

Causal Methods:

  1. Propensity Score Matching: Match users with similar characteristics
  2. Difference-in-Differences: Compare changes before/after campaigns
  3. Instrumental Variables: Address selection bias in observational data

Key Findings:

  • TV ads: 3.2x ROAS (strongest attribution)
  • Social media: 1.1x ROAS (attribution unclear)
  • Email: 5.8x ROAS (highest efficiency)

Best Practices

Experimental Design

  • Randomization: Ensure true random assignment to treatment/control
  • Sample Size Calculation: Power analysis before starting experiments
  • Multiple Testing: Adjust significance levels when testing multiple hypotheses
  • Control Variables: Include relevant covariates to reduce variance
  • Duration Planning: Run experiments long enough for stable results

Model Development

  • Feature Engineering: Create interpretable, predictive features
  • Cross-Validation: Use time-aware splits for time series data
  • Model Interpretability: Use SHAP/LIME to explain predictions
  • Validation Metrics: Choose metrics aligned with business objectives
  • Overfitting Prevention: Regularization, early stopping, held-out data

Statistical Rigor

  • Uncertainty Quantification: Always report confidence intervals
  • Significance Interpretation: P-value is not effect size
  • Assumption Checking: Validate statistical test assumptions
  • Sensitivity Analysis: Test robustness to modeling choices
  • Pre-registration: Document analysis plan before seeing results

Communication and Impact

  • Business Translation: Convert statistical terms to business impact
  • Actionable Recommendations: Tie findings to specific decisions
  • Visual Storytelling: Create compelling narratives from data
  • Stakeholder Communication: Tailor level of technical detail
  • Documentation: Maintain reproducible analysis records

Ethical Data Science

  • Fairness Considerations: Check for bias across protected groups
  • Privacy Protection: Anonymize sensitive data appropriately
  • Transparency: Document data sources and methodology
  • Responsible AI: Consider societal impact of models
  • Data Quality: Acknowledge limitations and potential biases

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

30.06%
按下载量换算336

OpenCode

21.63%
按下载量换算242

Cursor

18.06%
按下载量换算202

Codex

13.44%
按下载量换算150

Gemini CLI

8.66%
按下载量换算97

Antigravity

3.43%
按下载量换算38

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills