shap-explainer
SkillAI & modelsSHAP-based model explainability skill for feature attribution, summary plots, and interaction analysis.
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the shap-explainer skill
What this skill tells your AI
The instructions your AI receives, as published by a5c-ai/babysitter in library/specializations/data-science-ml/skills/shap-explainer/SKILL.md and read by ahel’s review.
Overview
SHAP-based model explainability skill for feature attribution, summary plots, interaction analysis, and model interpretation.
Capabilities
- TreeExplainer for tree-based models (XGBoost, LightGBM, Random Forest)
- DeepExplainer for neural networks
- KernelExplainer for model-agnostic explanations
- Summary, dependence, and force plots
- Interaction value computation
- Cohort-based analysis
- Waterfall and bar plots
- Expected value analysis
Target Processes
- Model Interpretability and Explainability Analysis
- Model Evaluation and Validation Framework
- A/B Testing Framework for ML Models
Tools and Libraries
- SHAP
- matplotlib
- numpy
Input Schema
{
"type": "object",
"required": ["modelPath", "dataPath", "explainerType"],
"properties": {
"modelPath": {
"type": "string",
"description": "Path to the trained model"
},
"dataPath": {
"type": "string",
"description": "Path to data for explanation"
},
"explainerType": {
"type": "string",
"enum": ["tree", "deep", "kernel", "linear", "gradient"],
"description": "Type of SHAP explainer to use"
},
"analysisConfig": {
"type": "object",
"properties": {
"numSamples": { "type": "integer" },
"backgroundSamples": { "type": "integer" },
"featureNames": { "type": "array", "items": { "type": "string" } },
"outputIndex": { "type": "integer" }
}
},
"plotConfig": {
"type": "object",
"properties": {
"plotTypes": {
"type": "array",
"items": { "type": "string", "enum": ["summary", "bar", "waterfall", "force", "dependence", "interaction"] }
},
"maxFeatures": { "type": "integer" },
"outputDir": { "type": "string" }
}
}
}
}
Output Schema
{
"type": "object",
"required": ["status", "shapValues"],
"properties": {
"status": {
"type": "string",
"enum": ["success", "error"]
},
"shapValues": {
"type": "string",
"description": "Path to SHAP values file"
},
"expectedValue": {
"type": "number"
},
"featureImportance": {
"type": "array",
"items": {
"type": "object",
"properties": {
"feature": { "type": "string" },
"importance": { "type": "number" },
"rank": { "type": "integer" }
}
}
},
"plots": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": { "type": "string" },
"path": { "type": "string" }
}
}
},
"interactions": {
"type": "object",
"description": "Top feature interactions"
}
}
}
Usage Example
{
kind: 'skill',
title: 'Generate SHAP explanations',
skill: {
name: 'shap-explainer',
context: {
modelPath: 'models/xgboost_model.pkl',
dataPath: 'data/test.csv',
explainerType: 'tree',
analysisConfig: {
numSamples: 1000,
backgroundSamples: 100
},
plotConfig: {
plotTypes: ['summary', 'bar', 'dependence'],
maxFeatures: 20,
outputDir: 'explanations/'
}
}
}
}
Signals
- GitHub stars
- 2k
- Forks
- 112
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
shap-explainer- Source
- github.com/a5c-ai/babysitter
Related picks
Skill · thedaviddias
The pick for JavaScriptmodern-javascript-patterns
Skill · wshobson
The pick for JavaScriptrseng-notebooks
Skill · fdiblen
The pick for Notebooksexecute
Skill · brycewang-stanford
The pick for Notebookspandas-dataframe-analyzer
Skill · a5c-ai
The pick for Pandasxlsx
Skill · anthropics
The pick for Pandas