accuracy-improvement-l…
Use when an existing model's results are disappointing and the user wants higher accuracy - 'accuracy is still too low', 'improve/boost the model', 'why is it…
Use when turning a trained model into something usable (an app, an inference function, a demo) or adding explainability. Selects the RIGHT interpretability method per problem: Grad-CAM for CNN image classification, predicted boxes for detection, mask overlays for segmentation,
$ npx -y skills add mxslr/mlcraft --skill deployment-explainability --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/deployment-explainabilityContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when turning a trained model into something usable (an app, an inference function, a demo) or adding explainability. Selects the RIGHT interpretability method per problem: Grad-CAM for CNN image classification, predicted boxes for detection, mask overlays for segmentation,
name: deployment-explainability description: "Use when turning a trained model into something usable (an app, an inference function, a demo) or adding explainability. Selects the RIGHT interpretability method per problem: Grad-CAM for CNN image classification, predicted boxes for detection, mask overlays for segmentation, embedding neighbors for face recognition, SHAP for tabular, attributions or attention for text, feature and temporal importance for time-series. Also covers preprocessing parity between training and inference, calibrated scores, out-of-distribution guardrails, and decision-support framing for high-stakes domains. Triggers on 'deploy', 'inference', 'Grad-CAM', 'SHAP', 'saliency', 'explainability', 'feature importance', 'build an app', 'gradio', 'streamlit'."
The raw input a user uploads MUST pass through exactly the same pipeline as training (resize, crop, enhancement like CLAHE, normalization). Package it as one shared function reused by both training and inference. A mismatch produces confident but wrong predictions.
Grad-CAM is only for convolutional image classifiers. It is not meaningful for detection, embeddings, tabular, or text. Choose by problem:
| Model or task | Explainability | Notes | |---|---|---| | CNN image classification | Grad-CAM, Grad-CAM++, Score-CAM | heatmap over the regions that drove the predicted class. Good for medical scans and single-object classification. | | Vision Transformer classification | attention rollout, attention maps | more natural than Grad-CAM for pure ViTs. | | Object detection (faces, vehicles, objects) | draw predicted boxes with class and confidence; optional D-RISE saliency | Grad-CAM is not standard for detectors. The boxes are the explanation. | | Segmentation | overlay the predicted mask on the image, plus per-class confidence | | | Face recognition or verification | nearest-neighbor example faces, embedding similarity score, t-SNE or UMAP of embeddings | Grad-CAM is not meaningful for metric-learning embeddings. | | Tabular | SHAP (global summary and per-prediction), permutation importance | the standard for stakeholder trust. | | Text or NLP | Integrated Gradients, token attributions, attention, SHAP for text | highlight the tokens that drove the decision. | | LLM or RAG output | show the retrieved sources and the rationale; token logprobs for confidence | grounding is the explanation. | | Time-series | feature and lag importance, temporal attention, SHAP on features | which past steps drove the forecast. |
Caption any saliency honestly: it shows where the model looked, not a ground-truth region.
A research-first AI/ML research-engineer workflow for Claude Code
Use when an existing model's results are disappointing and the user wants higher accuracy - 'accuracy is still too low', 'improve/boost the model', 'why is it…
Use BEFORE training any model, to build correct train/val/test splits and hunt data leakage - the #1 cause of fake-high accuracy. Covers group/patient/subject…
Use as the FIRST step of any ML task, before choosing a model, to inspect and understand the actual dataset. Works for a LOCAL dataset (Claude reads the files…
Use for 3D and point cloud tasks: point cloud classification, 3D semantic or instance segmentation, 3D object detection from LiDAR, and depth or mesh analysis,…
Use for anomaly, outlier, and novelty detection across data types: industrial or visual defect detection, time-series or sensor anomalies and predictive…
Use for audio and speech tasks: speech recognition (speech to text, ASR, transcription), audio or sound classification and tagging, keyword spotting, speaker…