A Claude Code skill that guarantees correct SageMaker Python SDK v3 code every time.
A Claude Code skill that guarantees correct SageMaker Python SDK v3 code every time. Covers classical ML (XGBoost, SKLearn, PyTorch), LLM inference (DJL/vLLM), LLM fine-tuning (QLoRA/LoRA/Trainium), HyperPod inference, Model Monitor, and SageMaker Pipelines.
Verified against SDK v3.8.0 source code using CodeGraph analysis.
- Generates correct
ModelTrainer-based launchers (never v2 estimators) - Writes training scripts with proper paths, argparse types, and metric logging
- Produces inference hooks (
model_fn,input_fn,predict_fn,output_fn) - Scaffolds full training projects with README and run commands
- Provides SageMaker Pipelines patterns for multi-step workflows
- Deploys LLMs with DJL LMI / vLLM using the Core API pattern
- Deploys models on HyperPod clusters (JumpStart, custom, autoscaling)
- Sets up Model Monitor (Data Quality, Model Quality, Bias, Explainability)
- Fine-tunes LLMs with QLoRA, LoRA, and AWS training recipes (GPU + Trainium)
Guardrails it enforces on every output:
ModelTraineronly — never v2 estimatorsoutput_data_config=OutputDataConfig(s3_output_path=...)— neveroutput_path=entry_script=— neverentry_point=logs=True(boolean) — neverlogs='All'- Model saved to
/opt/ml/model/always - LLM deployments use Core API — NOT ModelBuilder with DJL/vLLM
- All imports use v3 paths — never
sagemaker.model,sagemaker.workflow,sagemaker.processing
ln -s /path/to/sagemaker-python-sdk-v3-skill ~/.claude/skills/sagemaker-sdk-v3mkdir -p .claude/skills
ln -s /path/to/sagemaker-python-sdk-v3-skill .claude/skills/sagemaker-sdk-v3Invoke with /sagemaker-sdk-v3 in Claude Code, optionally with arguments:
/sagemaker-sdk-v3 xgboost train
/sagemaker-sdk-v3 sklearn deploy
/sagemaker-sdk-v3 pytorch scaffold
/sagemaker-sdk-v3 pipeline
/sagemaker-sdk-v3 llm deploy
/sagemaker-sdk-v3 llm train
/sagemaker-sdk-v3 hyperpod
/sagemaker-sdk-v3 monitor
Or just describe what you need:
- "Write a SageMaker training job launcher for XGBoost"
- "Deploy Llama 3.1 8B on SageMaker with vLLM"
- "Build a SageMaker Pipeline with preprocessing and training steps"
- "Fine-tune Llama with QLoRA on SageMaker"
- "Set up Model Monitor for my endpoint"
- Python <= 3.13 (SDK v3 is not compatible with Python 3.14+)
- AWS credentials configured (
aws configureor IAM role)
pip install sagemaker boto3For HyperPod:
pip install sagemaker-hyperpodsagemaker-python-sdk-v3-skill/
├── SKILL.md # Main skill: guardrails, routing, architecture
├── README.md # This file
├── references/
│ ├── api-reference.md # SDK v3 imports, class signatures, gotchas
│ ├── training-patterns.md # Framework-specific launcher patterns
│ ├── inference-patterns.md # model_fn/input_fn/predict_fn patterns
│ ├── pipeline-patterns.md # SageMaker Pipelines patterns
│ ├── llm-inference-patterns.md # LLM deployment: DJL/vLLM, Core API, CUDA compat
│ ├── llm-training-patterns.md # LLM fine-tuning: QLoRA, LoRA, Trainium, recipes
│ ├── hyperpod-inference-patterns.md # HyperPod: JumpStart, custom models, autoscaling
│ └── model-monitor-patterns.md # All 4 monitor types, baselines, schedules, bugs
└── templates/
├── launcher.py # Canonical SDK v3 launcher
├── train_xgboost.py # XGBoost training script
├── train_sklearn.py # SKLearn training script
├── train_pytorch.py # PyTorch training script
└── inference.py # Multi-framework inference script