
Description
shap is an agent skill for explaining and auditing machine-learning predictions with SHAP. It describes how a fitted model maps inputs to outputs. The skill works from the modern shap.Explanation interface, makes the explained output and the background distribution explicit, and checks every explanation before anyone interprets it. It covers choosing explainers and maskers, computing and validating feature attributions, and plotting them. It is aligned with SHAP 0.52.0, released on 28 May 2026, which requires Python 3.12 or newer. The maintained examples were checked on Python 3.12 with NumPy 2.5.3, pandas 3.0.6, scikit-learn 1.9.1 and matplotlib 3.11.2. Native tests cover several explainer types, and XGBoost 3.4.1 smoke checks cover raw, probability, loss and interaction outputs. The skill sets firm operating rules. It explains a fixed, evaluated model and does not use SHAP as a substitute for predictive validation. Explanations should use held-out rows, and background rows should come from an appropriate reference population.…
Highlights
- Feature attributions with shap.Explanation
- Explainer and masker selection
- Additivity checks against model output
- Held-out rows and reference backgrounds
- Warns against untrusted model files
Ratings & Reviews
No ratings yet
Be the first to rate shap.
People also visit

pytorch-patterns
PyTorch deep learning patterns and best practices for building robust
shap FAQ
What does SHAP explain?
How a fitted, evaluated model maps its inputs to outputs, as feature attributions.
Does SHAP show causality?
No. The skill says it does not establish causality, fairness, recourse or scientific mechanism.
What must I check before trusting an explanation?
Additivity against the explained output, with input shape, preprocessing, model version and row order verified.
Which SHAP version?
SHAP 0.52.0, released on 28 May 2026, which requires Python 3.12 or newer.
Are untrusted model files safe to load?
No. The skill warns that pickle, joblib, model and explainer files can execute code when loaded.
How do I install it?
Run npx skills add https://github.com/k-dense-ai/scientific-agent-skills --skill shap.
What are the best shap alternatives?
Popular alternatives to shap include pytorch-patterns, aeon and esm. See all shap alternatives

