shap

shap is a skill for Claude Code from agentlas-ai/agentlas-desktop. It costs 46 tokens per session (3,108 once invoked), scanned A, a copy of shap, Apache-2.0.

A toolkit for explaining the predictions of fitted machine-learning models by estimating how each input feature contributed to an output. SHAP explanations describe model behaviour for individual rows or across a dataset; they do not prove that a feature caused the result.

In plain words
What is it for?
Use it to compute feature attributions, explain individual predictions, summarise overall feature influence, handle models with multiple outputs, and create explanation charts.
Why use it?
It makes complex model outputs easier to inspect and helps find unexpected reliance on particular inputs. It also encourages checking explanations against the exact model output before interpreting them.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to compute feature attributions, explain individual predictions, summarise overall feature influence, handle models with multiple outputs, and create explanation charts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentlas-ai/agentlas-desktop/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 agentlas-ai/agentlas-desktop --skill shap
Clone the repo
git clone --depth 1 https://github.com/agentlas-ai/agentlas-desktop

Made for: Claude Code.

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 shap

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentlas-ai/agentlas-desktop/shap/github.svg)](https://agentmods.dev/skills/agentlas-ai/agentlas-desktop/shap)
Your own site
<a href="https://agentmods.dev/skills/agentlas-ai/agentlas-desktop/shap"><img src="https://agentmods.dev/badge/skills/agentlas-ai/agentlas-desktop/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 shap

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentlas-ai/agentlas-desktop/shap"><img src="https://agentmods.dev/badge/skills/agentlas-ai/agentlas-desktop/shap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,108 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.
Origin 100% copy Near-identical to another mod 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.00046 $0.03108
Opus 5.5 $0.00018 $0.01243
Sonnet 5.5 $0.00009 $0.00622
Haiku 4.5 $0.00005 $0.00311

Measured 1mo ago against content hash 6e1e3a128848, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/tabular_report.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

This is a copy

100% identical to shap — 28 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/agentlas-science-skills/skills/shap/SKILL.md · 300 lines

How it starts

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

SHAP

Use SHAP to describe how a fitted predictive model maps inputs to outputs. Work from the modern shap.Explanation API, make the explained output and background distribution explicit, and validate every explanation before interpreting it.

This skill is aligned with SHAP 0.52.0 (released 2026-05-28). That release requires Python 3.12 or newer.

Operating Rules

  1. Explain a fixed, evaluated model; do not use SHAP as a substitute for predictive validation.
  2. Use held-out or clearly labeled analysis rows for explanations. Choose background rows only from an appropriate training or reference population.
  3. State the explained output: regression value, raw margin, probability, log loss, logit, or another model method.
  4. Keep explanations as shap.Explanation objects. Call explainer(X); use .shap_values(X) only when maintaining legacy code.
  5. For multi-output models, select one output before using tabular plots: explanation[..., output_index].
  6. Check base_values + values.sum(...) against the exact model output being explained.
  7. Treat SHAP as a description of model behavior under a masking/background choice. It does not establish causality, fairness, recourse, or scientific mechanism.
  8. Never silence an additivity failure until input shape, preprocessing, model version, output space, and row ordering have been checked.
  9. Do not load untrusted pickle, joblib, model, or explainer artifacts; those formats can execute code during deserialization.

Install

Create an isolated environment and pin the documented release:

uv venv --python 3.12
source .venv/bin/activate
uv pip install "shap[plots]==0.52.0"

shap[plots] installs the plotting dependencies. Add the fitted model's package at a version compatible with the project. For older Python compatibility, read references/migration.md instead of silently installing a different SHAP release.

Confirm the environment before debugging an API mismatch:

import platform
import shap

print("Python:", platform.python_version())
print("SHAP:", shap.__version__)

Read the full file on GitHub · 300 lines

Files

What ships with it

9 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. 1mo ago First seen · 300 lines · 46 tokens per session scan A 6e1e3a128848

Subscribe to this mod's changes

shap is a skill published in the GitHub repository agentlas-ai/agentlas-desktop (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 46 tokens to every session and 3,108 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to shap, differing in 28 lines, and is treated as a copy.

Related

Other skills, from other repositories

ai-sdk

Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI…

browseros-ai/BrowserOS · 155 tokens

cyrene-original-voice

A writing-style calibration that changes responses to match the voice of the character 昔涟 when certain conversation situations are detected. It supplies tone rules and example responses.

Playa-0v0/Cyrene-Agent · 45 tokens

electron-expert

Expert in Electron framework, desktop app development, IPC, and cross-platform packaging. Use when the user mentions desktop, Node.js, cross platform, Windows, macOS, or Linux, or when the task involves Electron Architecture, Process Types, IPC Communication, or App Lifecycle.

personamanagmentlayer/pcl · 59 tokens

ai-deployment-patterns

Guides expert-level ai deployment patterns implementation: ai-ml and devops decision frameworks, production-ready patterns, and concrete templates for ai deployment patterns workflows. Use when the user asks about ai deployment patterns, ai deployment patterns configuration, or ai-ml best practices for ai projects. Do…

FerroxLabs/wayland · 87 tokens

ai-prompt-crafter

Advanced prompting techniques for any AI model covering system prompts, chain-of-thought reasoning, few-shot examples, structured output formats, context management, multi-turn conversation strategies, and a reusable prompt template library. Use when the user asks about ai prompt crafter, related techniques, best…

FerroxLabs/wayland · 93 tokens

ai-readiness-evaluation

Organizational AI readiness assessment evaluating data quality, team capabilities, infrastructure, governance, and use case prioritization to produce an actionable readiness scorecard. Use when the user asks about ai readiness evaluation, related techniques, best practices, or needs guidance in this domain. Do NOT use…

FerroxLabs/wayland · 80 tokens