DevOps & CloudOfficial · huggingface

Hf Cloud Aws Context Discovery skill for Claude

Discover the user's local AWS context (active profile, region, account ID, caller identity) at the start of any AWS task.

When Claude uses it

Use this skill before any other AWS work — deploying to SageMaker, creating resources, calling AWS APIs, or anything that touches an AWS account. Use it especially when the user has not specified a region or profile explicitly, when they say things like "use my AWS account", "deploy to AWS", "use my profile", or when about to make any AWS CLI or SDK call. Never guess the region or account ID — always use this skill to read it from the local configuration first.

Hf Cloud Aws Context Discovery SKILL.md

The full skill file from huggingface/skills (Apache-2.0).

AWS Context Discovery

Before doing any AWS work, read the user's local AWS config. Don't guess the region, and don't ask the user for things their config already answers.

What to discover

Run these at the start of the AWS work and remember the results for the rest of the session.

1. Active profile

AWS_PROFILE env var, else default. If the user mentioned a profile in their prompt, that overrides. If the named profile doesn't exist in ~/.aws/config, surface that clearly.

2. Region

Resolution order — stop at the first one that produces a value:

  1. Region the user explicitly named in this conversation
  2. AWS_REGION env var
  3. AWS_DEFAULT_REGION env var
  4. region field on the active profile in ~/.aws/config
  5. Ask the user — but only after the first four have failed

Do not fall back to us-east-1 or any other hardcoded default.

3. Credentials, account ID, caller ARN

aws sts get-caller-identity --profile <profile> --region <region>

Three purposes in one call: confirms credentials are valid (stop if not), returns the Account ID (needed for ARN construction), returns the Arn of the caller.

4. Identify SSO / assumed-role principals

The Arn field tells you what kind of principal this is. The pattern matters because it determines what IAM operations the caller can do.

ARN patternTypeIAM write capability
arn:aws:iam::<acct>:user/<name>IAM userDepends on attached policies
arn:aws:sts::<acct>:assumed-role/AWSReservedSSO_<...>/<email>SSO assumed-roleTypically none — can't create/modify IAM roles
arn:aws:sts::<acct>:assumed-role/<role>/<session>Regular assumed-roleDepends on the role

If the caller is SSO, surface this immediately before later skills hit iam:CreateRole and fail:

Heads up: you're authenticated via SSO (AWSReservedSSO_<PermissionSet>_...). SSO principals usually can't create IAM roles directly. If we need a SageMaker execution role, I'll look for an existing one first — if none exists, you'll need to ask whoever manages your AWS access to create one.

This is the highest-leverage thing this skill does. Surfacing it now turns a confusing mid-deployment error into a five-second conversation.

Commands to run

# Effective profile and region (faster than parsing config files)
aws configure list

# Validate credentials and get identity
aws sts get-caller-identity
aws sts get-caller-identity --profile <profile-name>  # if a profile was named

aws configure list handles env-var overrides and shows the resolved effective values. Prefer it over parsing ~/.aws/config yourself. If you need to read raw config (e.g. to list profiles), ~/.aws/config and ~/.aws/credentials are plain INI files — read-only.

What to report back

One or two lines, not a wall of text:

Working with profile my-profile in eu-west-1, account 123456789012. You're authenticated via SSO, so we'll need to use an existing IAM role rather than create one.

Don't ask the user to confirm the region you just read from their config — they configured it; that is the confirmation.

If something is wrong (credentials expired, profile doesn't exist, no region anywhere), stop and surface the specific error before continuing.

How to install Hf Cloud Aws Context Discovery

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit huggingface/skills/skills/hf-cloud-aws-context-discovery#main ~/.claude/skills/hf-cloud-aws-context-discovery

Codex

npx degit huggingface/skills/skills/hf-cloud-aws-context-discovery#main ~/.codex/skills/hf-cloud-aws-context-discovery

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Hf Cloud Aws Context Discovery skill do?

Discover the user's local AWS context (active profile, region, account ID, caller identity) at the start of any AWS task. Use this skill before any other AWS work — deploying to SageMaker, creating resources, calling AWS APIs, or anything that touches an AWS account. Use it especially when the user has not specified a region or profile explicitly, when they say things like "use my AWS account", "deploy to AWS", "use my profile", or when about to make any AWS CLI or SDK call. Never guess the region or account ID — always use this skill to read it from the local configuration first.

+How do I install Hf Cloud Aws Context Discovery in Claude Code?

Copy the skill folder into ~/.claude/skills/hf-cloud-aws-context-discovery, for example with "npx degit huggingface/skills/skills/hf-cloud-aws-context-discovery#main ~/.claude/skills/hf-cloud-aws-context-discovery". Claude Code loads it automatically and uses it when a task matches.

+Does Hf Cloud Aws Context Discovery work with ChatGPT or Codex?

Yes. Hf Cloud Aws Context Discovery uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/hf-cloud-aws-context-discovery. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Hf Cloud Aws Context Discovery free?

Hf Cloud Aws Context Discovery is published on GitHub by huggingface under the Apache-2.0 license, which allows free use.

Related devops & cloud skills

  1. Supabase

    Official

    Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron,…

    supabase/agent-skills★ 3.1k
  2. Senior Architect

    System architecture decisions with a written rationale: monolith vs microservices, database choice, scaling limits, ADRs, Mermaid diagrams.

    alirezarezvani/claude-skills★ 30k
  3. Vercel Deploy

    Official

    Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the…

    openai/skills★ 29k
  4. Hf Cloud Sagemaker Deployment Planner

    Official

    Plan and coordinate the deployment of a model to Amazon SageMaker AI.

    huggingface/skills★ 11k
  5. Hf Cloud Sagemaker Iam Preflight

    Official

    Ensure a usable SageMaker execution role exists before deploying or training.

    huggingface/skills★ 11k
  6. Hf Cloud Sagemaker Production Defaults

    Official

    Create a SageMaker endpoint (real-time, real-time scale-to-zero, or async) with autoscaling, CloudWatch alarms, and tagging enabled by…

    huggingface/skills★ 11k
  7. Hf Cloud Serving Image Selection

    Official

    Pick the right serving container for a SageMaker model deployment and find its current image URI.

    huggingface/skills★ 11k
  8. Replay Regression

    Official

    Use when independently verifying a supplied PoC against fresh live before/after deployments.

    trailofbits/skills★ 8.3k
  9. Reproduce Regression

    Official

    Use when deploying before/after systems and building a live-system PoC for a regression candidate.

    trailofbits/skills★ 8.3k

See all devops & cloud skills →

More skills from huggingface

  1. Hf Cloud Python Env Setup

    Official

    Set up an isolated Python environment for SageMaker / AWS work, with the right Python version and current boto3.

    huggingface/skills★ 11k

All skills by huggingface →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.