SHAP
Skill75 starsChanged 4 months agoMITView on GitHub
SHAP (SHapley Additive exPlanations) is a unified, game-theoretic framework for local feature attribution. Treating a model's input features as players in a coalition game, SHAP assigns each feature its Shapley value — the average marginal contribution of that feature to the prediction across all possible feature subsets. Shapley values are the unique attributions satisfying local accuracy, missingness, and consistency, so the prediction decomposes additively into a baseline plus one Shapley value per feature, giving a per-prediction explanation that is theoretically grounded and model-agnostic.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- BrightGold70/skillstheir own version, first seen Nov 8, 2026
- MarieLynneBlock/arcanum-artifextheir own version, first seen Nov 1, 2026
- davidanthonyn/claude-skillstheir own version, first seen Oct 20, 2026
- patoangolano/bio-stacktheir own version, first seen Oct 15, 2026
- Luooops/skillstheir own version, first seen Oct 13, 2026
- wu-yc/LabClawtheir own version, first seen Oct 8, 2026
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- wu-yc/LabClaw★ 1.1ksame name
- LeonChaoX/qinyan-academic-skills★ 910same name
- qinyan-ai/qinyan-academic-skills★ 80same name
- MarieLynneBlock/arcanum-artifex★ 4same name
- JunMA98/Computer-science-claude-skills★ 3same name
- BrightGold70/skills★ 1same name
- Luooops/skills★ 1same name
- uppifyagency/boilerplate-saas-2026★ 1same name
- yf8578/claude-skills-collection★ 1same name
- zh123012/claude-skills★ 1same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository52 other files it gives its agents.
- ablation-plannerSkill
- analyze-resultsSkill
- arxivSkill
- auto-claimSkill
- auto-experimentSkill
- auto-iteration-loopSkill
- autoSkill
- verify-pick-alternativesSkill
- auto-verifySkill
- data-ruleSkill
- experiment-auditSkill
- experiment-planSkill
- experiment-queueSkill
- finetune-hyperparameter-sweepSkill
- imageSkill
- multiple-choice-evaluationSkill
- experiment-tipsSkill
- steering-block-selectionSkill
- steering-coefficient-tuningSkill
- hypothesis-batchSkill
- idea-creatorSkill
- impact-checkSkill
- mechanic-db-searchSkill
- mechanism-auditSkill
- mechanism-behavior-discoverySkill
- mechanism-exploreSkill
- causal-attributionSkill
- CircuitSkill
- Feature Dictionary LearningSkill
- gradient-detectionSkill
- Magnitude AnalysisSkill
- Multi-Modal InterpretabilitySkill
- Neural Feature LearningSkill
- ProbingSkill
- Representation and Parameter AnalysisSkill
- mechanism-skillsSkill
- Vocabulary ProjectionSkill
- mguideSkill
- mhistorySkill
- monitor-experimentSkill
- msearchSkill
- next-roundSkill
- notifySkill
- novelty-checkSkill
- paper-figureSkill
- research-litSkill
- research-refine-pipelineSkill
- research-refineSkill
- research-reviewSkill
- result-to-claimSkill
- run-experimentSkill
- training-checkSkill
The file
Files
Advantage
SHAP unifies several previously ad-hoc attribution methods (LIME, DeepLIFT, Layer-wise Relevance Propagation, classic Shapley value methods such as Shapley regression and Shapley sampling) under one axiomatic framework, so attributions from different model families can be compared on the same scale. The decomposition is local — it explains a single prediction — yet averaging the absolute Shapley values over a dataset yields a global feature-importance ranking that inherits the same axiomatic foundation, supporting both per-instance debugging and dataset-level summaries. For tree ensembles, an exact polynomial-time estimator removes the usual exponential cost, making SHAP the de-facto standard for explaining XGBoost / LightGBM / CatBoost / scikit-learn tree models.
Limitation
Computing exact Shapley values for an arbitrary model is exponential in the number of features, so practical use relies on estimators (KernelSHAP, sampling, deep- or gradient-based variants) whose accuracy depends on the number of samples / coalitions and on assumptions about how "missing" features should be modelled (typically marginal- vs conditional-expectation). The values themselves are correlational — they describe how the model uses features, not whether those features are causally related to the outcome — and additive decomposition can obscure strong feature interactions, which require interaction-aware Shapley extensions to surface.
Submethods
The toolkit comprises two forms — per-sample estimators that compute Shapley values one input at a time, and amortized explainers that learn to predict them in a single forward pass:
- Foundational and Estimator-based SHAP: The reference SHAP library covers the full taxonomy of Shapley estimators — model-agnostic (KernelSHAP), exact tree-specific (TreeSHAP), deep-learning (DeepExplainer / GradientExplainer for TensorFlow, Keras, PyTorch), and linear models — together with the standard plotting suite (waterfall, beeswarm, force, dependence) and interaction extensions. It is the right starting point for explaining any single model and serves as the reference implementation against which downstream methods are compared. You can find a demo for this method in ./foundational-and-estimator-based-shap. This demo shows shap: Use this skill when working with SHAP (SHapley Additive exPlanations) to explain machine learning model predictions, compute feature importance, generate SHAP values for tree ensembles (XGBoost, LightGBM, CatBoost, scikit-learn), deep learning models (TensorFlow, Keras, PyTorch), NLP transformers, or any model-agnostic function.
- Amortized SHAP (FastSHAP): FastSHAP trains an auxiliary explainer network with a KernelSHAP-inspired objective so that, at inference time, a single forward pass through the explainer produces Shapley values for any input — turning per-sample optimization into amortized prediction. This makes Shapley-style attributions tractable in real-time settings (interactive UIs, streaming pipelines, image/superpixel explanations) and at data scales where running KernelSHAP per sample is prohibitive. You can find a demo for this method in ./amortized-shap. This demo shows fastshap: Use this skill when you need to train amortized Shapley value explainers using FastSHAP, generate real-time local feature importance explanations for machine learning models (tabular or image), train surrogate models for feature masking, or understand how FastSHAP's KernelSHAP-inspired training objective works with PyTorch.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

