Skip to content

Guide · Agent skill

How to use the SageMaker Production Defaults agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

This guide explains what the SageMaker Production Defaults agent skill does, how to install it for Claude and how to ask an agent to use it. It is for engineers who want an AWS SageMaker endpoint that scales with traffic, raises CloudWatch alarms and can be found and cleaned up later. You do not need prior experience with agent skills to follow it.

SageMaker Production Endpoint Defaultshuggingface/skills · Apache-2.0

Quick start

  1. 1Check prerequisites. Confirm you have Python 3 with boto3 and botocore, AWS credentials with the needed permissions, a container image URI, an IAM execution role ARN and an S3 bucket for model artifacts.
  2. 2Install the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
  3. 3Package and upload the model. For vLLM models, package the pinned model snapshot as a model.tar.gz artifact and upload it to your S3 bucket.
  4. 4Ask the agent to deploy. Give a natural request that names the model, instance type and region, so the agent loads the skill.
  5. 5Run the deployment script. The agent runs deploy.py, deploy_ic.py or deploy_async.py, which waits for InService and creates autoscaling and alarms.
  6. 6Smoke-test the endpoint. Send one real request and scan the CloudWatch logs for worker-crash markers before accepting the deployment.
  7. 7Tear down when finished. Run teardown.py or the teardown command printed at the end of deployment to stop ongoing charges.

What the skill makes the agent do

An agent skill is a folder of instructions and scripts that an AI agent loads when a task matches the skill's description. This one applies when an agent is about to create a SageMaker endpoint, which is a hosted server that runs an AI model. Instead of writing a bare create call, the agent runs ready-made Python scripts.

The scripts create the model, endpoint config, endpoint, autoscaling target and policy, and CloudWatch alarms as one unit. Every resource gets a consistent tag set that includes CreatedBy=agentic-deploy-skills so it can be found later for cleanup. Autoscaling is set to target tracking on invocations per instance, and data capture to S3 stays off unless you turn it on.

  • deploy.py: real-time endpoints
  • deploy_ic.py: real-time endpoints that scale to zero instances using inference components
  • deploy_async.py: async endpoints, which also scale to zero
  • invoke_endpoint.py: sends a test request to a real-time endpoint
  • teardown.py: removes resources created by the skill

How to install the skill

Download the skill ZIP from this page and unzip it. For a personal install, place the skill folder in ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder. The folder must include SKILL.md and the scripts/ directory.

In the Claude apps you can instead upload the ZIP under Settings → Capabilities → Skills. If an installed copy has no scripts/ directory, the skill notes say to fetch the scripts from the source repository rather than rewriting them from the description.

How to trigger the skill with natural requests

You do not need to name the skill. The agent loads it when you ask for a SageMaker endpoint deployment, or when it is about to write code that calls create_endpoint. Good requests state the model, the container image, the IAM role and the region, or say that those are already chosen by other steps in your workflow.

The skill is meant to be the final step in a deployment workflow. Image selection, IAM checks and region discovery should happen first, because the skill expects their results as inputs.

  • Deploy the model at s3://your-bucket/qwen3-medical/model.tar.gz as a SageMaker real-time endpoint on ml.g5.xlarge with autoscaling and alarms.
  • Create an async SageMaker endpoint that scales to zero for my batch jobs.
  • Set up a real-time endpoint for bge-large-en-v1.5 on ml.c6i.2xlarge in my region.

Run a deployment step by step

For a text-generation model served with vLLM, the skill expects a model.tar.gz artifact that you have packaged and uploaded to a bucket you control. SageMaker extracts it to /opt/ml/model, so the endpoint does not fetch repository code at runtime. The example below uses placeholder values for the image URI, role ARN, bucket and region.

The script creates resources in order, waits up to 30 minutes for InService, reports failure reasons, registers autoscaling and alarms, and prints the teardown command. It writes a JSON summary with the endpoint, config and model names to stdout for later scripts.

  • Image URI and AMI version come from the image-selection step.
  • Role ARN comes from the IAM preflight check.
  • Region comes from the AWS context discovery step.
  • TEI embedding models do not need the --inference-ami-version flag, which is vLLM-specific.
python scripts/deploy.py --model-name qwen3-medical --image-uri "$IMAGE_URI" --inference-ami-version "$AMI" --role-arn "$ROLE_ARN" --model-s3-uri "s3://<your-model-bucket>/qwen3-medical/model.tar.gz" --instance-type ml.g5.xlarge --region "$REGION" --env SM_VLLM_MODEL=/opt/ml/model --env SM_VLLM_HOST=0.0.0.0 --env SM_VLLM_TRUST_REMOTE_CODE=false --env SM_VLLM_MAX_MODEL_LEN=4096

Test the endpoint before you trust it

InService only means the container answered its ping check. In MMS-based containers the front end can answer pings while the Python worker crash-loops, so the skill requires two checks before it reports success. First, send one real request. For real-time endpoints, use invoke_endpoint.py and require an HTTP 200 with a sensible body. For async endpoints, upload one input to S3, invoke the endpoint, and poll the output location.

Second, scan the endpoint logs for worker-crash messages such as Worker died, Load model failed or ImportError. Inference-component deployments log to a different group, and deploy_ic.py scans that group automatically while it waits.

  • If the log scan finds a match, the skill is meant to show the actual traceback from CloudWatch rather than the InService status.
  • If a diagnostic call is denied, for example logs:FilterLogEvents, the skill says so in one line and carries on with the checks it can run.
python3 scripts/invoke_endpoint.py --endpoint-name <endpoint-name> --payload '{"inputs": "Hello"}' --region "$REGION"

Safety notes and tips

The scripts create billable AWS resources. Endpoints, CloudWatch alarms and optional data capture to S3 all incur ongoing charges, so run teardown.py when you are finished. Only run the skill in an AWS account where you have permission to create SageMaker, IAM, CloudWatch, Application Auto Scaling and tagging resources.

The skill runs scripts and uses the network to call AWS APIs. Review the scripts before running them in a shared account. Keep SM_VLLM_TRUST_REMOTE_CODE=false unless a specific model architecture requires custom code you have reviewed. Loading weights from the Hub at runtime is an explicit exception and can take 5 to 15 or more minutes after startup.

  • Use a Hugging Face token only for gated models loaded from the Hub.
  • Keep the minimum capacity at 1 for a warm endpoint, or accept cold-start delay if you need scale to zero.
  • Enable data capture only when you need request logs, because it adds S3 storage costs.

What people use it for

  • Deploying a vLLM text-generation model to a real-time SageMaker endpoint with autoscaling and alarms.
  • Serving an embedding model such as bge-large-en-v1.5 with TEI on a CPU instance.
  • Running a real-time endpoint that scales to zero between batches using inference components.
  • Setting up an async endpoint for long-running requests that can also scale to zero.

Frequently asked questions

Is the SageMaker Production Defaults skill free to use?

The skill is licensed under Apache-2.0. The skill itself is free, but the endpoints, CloudWatch alarms and any optional S3 data capture it creates are billable AWS resources that incur ongoing charges.

What do I need to install this agent skill?

You need Python 3 with boto3 and botocore, an AWS account with credentials and permissions for SageMaker, IAM pass-role, CloudWatch, Application Auto Scaling and tagging, a container image URI, an IAM execution role ARN and an S3 bucket for model artifacts. A Hugging Face token is optional and only needed for gated models.

Where do I put the skill so Claude can use it?

Unzip the downloaded ZIP into ~/.claude/skills/ for a personal install, or into a project's .claude/skills/ folder for one project. In the Claude apps, you can upload the ZIP under Settings → Capabilities → Skills.

Why does the skill not just call create_endpoint?

A bare create_endpoint call makes an endpoint with no autoscaling or alarms, which the skill treats as a demo rather than a deployment. The scripts create the model, endpoint config, scaling rules, alarms and tags together so the endpoint can scale, report failures and be cleaned up later.

My endpoint shows InService but returns errors. What should I check?

InService only means the container answered its ping. Run invoke_endpoint.py with a minimal payload and scan the CloudWatch log group /aws/sagemaker/Endpoints/<endpoint-name> for messages such as Worker died or Load model failed. Inference-component deployments use /aws/sagemaker/InferenceComponents/<component-name> instead.

Does this skill work outside AWS SageMaker?

No. The skill is specific to AWS SageMaker APIs, so it does not cover non-SageMaker deployments. Users without an AWS account or the required SageMaker, IAM and CloudWatch permissions should not use it.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you deploy vLLM or embedding models to AWS SageMaker and want a repeatable setup with autoscaling, alarms, tags and a smoke test before you report success. Pick something else if you have no AWS account or permission to create billable resources, want a free one-click test, or are deploying outside SageMaker.

Download the skill