alterlab-shap

alterlab-shap is a skill for Claude Code from AlterLab-IEU/AlterLab-Academic-Skills. It costs 115 tokens per session (4,203 once invoked), scanned A, original, MIT.

A method for explaining individual machine-learning predictions by estimating how much each input feature contributed. It also produces charts showing which features matter across one prediction or an entire dataset.

In plain words
What is it for?
Use it to calculate feature contributions, create importance and prediction-explanation plots, debug models, compare feature effects, and examine fairness across model outputs.
Why use it?
It helps answer why a model made a particular decision and reveals unexpected behavior, bias, or weak inputs. This makes black-box predictions easier to inspect and validate.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the alterlab-data-science plugin — 22 skills shipped together

Good fit Use it to calculate feature contributions, create importance and prediction-explanation plots, debug models, compare feature effects, and examine fairness across model outputs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alterlab-ieu/alterlab-academic-skills/alterlab-shap
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AlterLab-IEU/AlterLab-Academic-Skills --skill alterlab-shap
Clone the repo
git clone --depth 1 https://github.com/AlterLab-IEU/AlterLab-Academic-Skills

Made for: Claude Code.

Or install alterlab-data-science, the plugin that ships this one along with the rest of its 22 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for alterlab-shap

README.md
[![agentmods](https://agentmods.dev/badge/skills/alterlab-ieu/alterlab-academic-skills/alterlab-shap/github.svg)](https://agentmods.dev/skills/alterlab-ieu/alterlab-academic-skills/alterlab-shap)
Your own site
<a href="https://agentmods.dev/skills/alterlab-ieu/alterlab-academic-skills/alterlab-shap"><img src="https://agentmods.dev/badge/skills/alterlab-ieu/alterlab-academic-skills/alterlab-shap/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for alterlab-shap

Your own site · 80×15
<a href="https://agentmods.dev/skills/alterlab-ieu/alterlab-academic-skills/alterlab-shap"><img src="https://agentmods.dev/badge/skills/alterlab-ieu/alterlab-academic-skills/alterlab-shap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,203 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00115 $0.04203
Opus 5.5 $0.00046 $0.01681
Sonnet 5.5 $0.00023 $0.00841
Haiku 4.5 $0.00012 $0.00420

Measured yesterday against content hash 0f0fb8994c03, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

alterlab-shap scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/data-science/alterlab-shap/SKILL.md · 468 lines

How it starts

The opening of the file, as written. The whole thing — 468 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 interactions"
  • "Create model interpretation dashboard"

Does NOT Trigger

Scenario Use Instead
Profiling a raw dataset (distributions, missingness, correlations) before any model exists alterlab-eda
Building, cross-validating, or tuning the model itself alterlab-scikit-learn
Estimating the causal effect of an intervention (SHAP describes model associations, not causes) alterlab-causal-inference

Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-eda) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.

Read the full file on GitHub · 468 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +2 lines 0f0fb8994c03
  2. 1mo ago Changed · +9 lines 36b349edb223
  3. 2mo ago First seen · 457 lines · 115 tokens per session scan A 31294d96c336

Subscribe to this mod's changes

alterlab-shap is a skill published in the GitHub repository AlterLab-IEU/AlterLab-Academic-Skills (85 stars, last pushed yesterday), licensed MIT. It adds 115 tokens to every session and 4,203 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

alterlab-shap compared with skills from other repositories

alterlab-shap next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
alterlab-shapAlterLab-IEU/AlterLab-Academic-SkillsSkill85yesterdayMITA115Claude Code
r-spss-syntax-architectNero1688/claude-academic-skillsSkill1315d agoMITA535Claude Code, Codex
multi-source-data-integratorNero1688/claude-academic-skillsSkill1315d agoMITA685Claude Code, Codex
llm-engineering-expertpersonamanagmentlayer/pclSkill4411d agoApache-2.0A92Claude Code
partner-anthropicfrankxai/claude-skills-librarySkill47yesterdayMITA69Claude Code
partner-googlefrankxai/claude-skills-librarySkill47yesterdayMITA77Claude Code
q1-journal-reviewerNero1688/claude-academic-skillsSkill1315d agoMITA353Claude Code, Codex