shap
Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias or fairness, comparing models, or implementing explainable AI. Works with tree-based models (XGBoost, LightGBM, Random Forest), deep learning (TensorFlow, PyTorch), linear models, and any black-box model.
npx skills add majiayu000/claude-skill-registry --skill scientific-shap-blurjp-imageprepmcp --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Provides guidance for computing SHAP values, creating plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing bias, comparing models, and implementing explainable AI across tree-based, deep learning, linear, and black-box models.
How it works
Guides users to select the appropriate explainer (TreeExplainer, DeepExplainer, LinearExplainer, KernelExplainer, or Explainer), compute SHAP values, and visualize results. Includes concrete code examples for training a model, creating an explainer, computing SHAP values, and generating plots. Describes core workflows: Basic explanation, Debugging, Feature Engineering, Model Comparison, Fairness analysis, and Production Deployment, with steps that cover training, explainer creation, SHAP value computation, and plotting. Provides references for explainers, plots, workflows, and theory, plus integration tips for notebooks and MLflow.
When to use it
Triggered when users ask about explaining model predictions, generating SHAP plots, debugging, bias analysis, model comparison, or implementing explainable AI, including needs for feature interactions and interpretation dashboards.
What it can touch
Mentions tools and environments: shap Python API, shap.TreeExplainer, shap.DeepExplainer, shap.LinearExplainer, shap.KernelExplainer, shap.plots.*, and production/service patterns including caching, API endpoints, and MLflow integration.
Caveats
Notes include selecting the correct explainer for model type, ensuring sufficient background data, avoiding misinterpretation of probabilities versus log-odds, handling plot rendering issues, and performance considerations for large datasets. No outcomes are promised beyond the steps and workflows described.
# SHAP (SHapley Additive exPlanations) ## Overview SHAP is a unified approach to explain machine learning model outputs using Shapley values from cooperative game theory. This skill provides comprehensive guidance for: - Computing SHAP values for any model type - Creating visualizations to understand feature importance - Debugging and validating model behavior - Analyzing fairness and bias - Implementing explainable AI in production SHAP works with all model types: tree-based models (XGBoost, LightGBM, CatBoost, Random Forest), deep learning models (TensorFlow, PyTorch, Keras), linear models, and black-box models. ## When to Use This Skill **Trigger this skill when users ask about**: - "Explain which features are most important in my model" - "Generate SHAP plots" (waterfall, beeswarm, bar, scatter, force, heatmap, etc.) - "Why did my model make this prediction?" - "Calculate SHAP values for my model" - "Visualize feature importance using SHAP" - "Debug my model's behavior" or "validate my model" - "Check my model for bias" or "analyze fairness" - "Compare feature importance across models" - "Implement explainable AI" or "add explanations to my model" - "Understand feature interact
- Overview
- When to Use This Skill
- Quick Start Guide
- Step 1: Select the Right Explainer
- Step 2: Compute SHAP Values
- Step 3: Visualize Results
- Core Workflows
- Workflow 1: Basic Model Explanation
- Workflow 2: Model Debugging
- Workflow 3: Feature Engineering
- Workflow 4: Model Comparison
- Workflow 5: Fairness and Bias Analysis
- Workflow 6: Production Deployment
- Key Concepts
Basic installation uv pip install shap With visualization dependencies uv pip install shap matplotlib Latest version uv pip install -U shap
What does the shap skill do?
Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias or fairness, comparing models, or implementing explainable AI. Works with tree-based models (XGBoost, LightGBM, Random Forest), deep learning (TensorFlow, PyTorch), linear models, and any black-box model.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill scientific-shap-blurjp-imageprepmcp --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
