Agent Native

hf-cloud-aws-context-discovery

This skill reads the user's local AWS configuration to discover their active profile, region, account ID, and caller identity before any AWS work begins.

by Hugging FaceOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (huggingface)

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
License
Apache-2.0 (permissive)
Pin
c3ff942pinned Oct 9, 2026
Context cost
about 830 tokenswhen the skill loads
GitHub stars
11,150on huggingface/skills
Scripts
None found

What it does

“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.”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill reads the user's local AWS configuration to discover their active profile, region, account ID, and caller identity before any AWS work begins. It runs AWS CLI commands to validate credentials and identify whether the caller is an IAM user, SSO principal, or assumed-role, surfacing critical limitations early to prevent deployment failures.

When to use it

  • Starting any AWS task without explicit region or profile specified by user
  • Deploying to AWS services like SageMaker or creating IAM-dependent resources
  • Before making AWS CLI or SDK calls to confirm credentials and account context
  • When user says deploy to AWS account or use my profile without specifics

When not to

  • User has already explicitly stated their AWS region and account details
  • Performing non-AWS tasks or work that doesn't touch AWS services
  • When working with hardcoded AWS credentials already validated in the session

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add huggingface/skills --skill hf-cloud-aws-context-discovery

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install huggingface/skills hf-cloud-aws-context-discovery@c3ff942be3e07116b475253f0a8fc4f54682c1a8

Installs the commit we checked (c3ff942).

Copy by hand

Download the folder at c3ff942 and put it in .claude/skills/hf-cloud-aws-context-discovery for Claude Code and in .agents/skills/hf-cloud-aws-context-discovery for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at c3ff942

Claude Code plugin

/plugin install huggingface-skills@claude-plugins-official

The publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "hf-cloud-aws-context-discovery" by Hugging Face.

Source, pinned to commit c3ff942be3e07116b475253f0a8fc4f54682c1a8:
https://github.com/huggingface/skills/tree/c3ff942be3e07116b475253f0a8fc4f54682c1a8/skills/hf-cloud-aws-context-discovery

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/hf-cloud-aws-context-discovery/ for Claude Code and .agents/skills/hf-cloud-aws-context-discovery/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/hugging-face/hf-cloud-aws-context-discovery

SKILL.md at the pin

---
name: hf-cloud-aws-context-discovery
description: 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.
---

# 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

```bash
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 pattern | Type | IAM write capability |
|---|---|---|
| `arn:aws:iam::<acct>:user/<name>` | IAM user | Depends on attached policies |
| `arn:aws:sts::<acct>:assumed-role/AWSReservedSSO_<...>/<email>` | **SSO assumed-role** | Typically **none** — can't create/modify IAM roles |
| `arn:aws:sts::<acct>:assumed-role/<role>/<session>` | Regular assumed-role | Depends 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

```bash
# 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.

From huggingface/skills at c3ff942, shown as plain text under its license: Apache-2.0 (permissive). The license text is in LICENSE.

View SKILL.md on GitHub at c3ff942

Files

1 file, 4.0 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at c3ff942

More from Hugging Face

  • hf-cloud-python-env-setup

    Sets up an isolated Python environment for SageMaker and AWS work with the correct Python version (3.10, 3.11, or 3.12) and current boto3 and awscli.

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 1.5K tokens · pinned 6 days ago

  • hf-cloud-sagemaker-deployment-planner

    This skill helps users plan and execute deployments of machine learning models to Amazon SageMaker by gathering requirements, selecting appropriate deployment…

    Claude Code, Codex, Cursor +4 · about 1.9K tokens · pinned 6 days ago

  • hf-cloud-sagemaker-iam-preflight

    This skill validates or creates an AWS IAM execution role before deploying SageMaker endpoints, training jobs, or models.

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 1.6K tokens · pinned 6 days ago

  • hf-cloud-sagemaker-production-defaults

    Deploys SageMaker endpoints with production defaults: autoscaling based on traffic, CloudWatch alarms for latency and errors, and consistent tagging.

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 6.7K tokens · pinned 6 days ago

  • hf-cloud-serving-image-selection

    This skill helps select the correct SageMaker serving container image for model deployments and retrieves its current URI from AWS's Deep Learning Containers…

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 4.3K tokens · pinned 6 days ago

  • hf-mcp

    This skill connects the agent to Hugging Face Hub via MCP server, enabling searches across models, datasets, Spaces, and papers.

    Claude Code, Codex, Cursor +4 · about 1.2K tokens · pinned 6 days ago

All Cloud and DevOps skills
  • agent-advisor

    Guides startups through a phased decision process to choose an AWS runtime for AI agents (AgentCore, ECS, EKS, Lambda, or Lambda MicroVMs), plan migrations of…

    by Amazon (AWS)Official publisher

    Contains scripts

    Claude Code · about 4.6K tokens · pinned 6 days ago

  • amazon-eventbridge-event-bus

    Enables building event-driven applications on AWS EventBridge custom event buses with publish/subscribe routing, event retention, filtering, transformation…

    by Amazon (AWS)Official publisher

    Claude Code, Codex, Cursor +3 · about 8.4K tokens · pinned 6 days ago

  • architect-for-startups

    Provides stage-appropriate AWS architecture guidance for startups from pre-revenue through Series B+, considering runway, team size, and AWS credits.

    by Amazon (AWS)Official publisher

    Claude Code, Codex, Cursor +4 · about 3.4K tokens · pinned 6 days ago

  • aws-containers

    Provides domain expertise for deploying and managing containerized workloads on AWS using EKS, ECS, Fargate, and Elastic Beanstalk.

    by Amazon (AWS)Official publisher

    Claude Code, Codex, Cursor +4 · about 1.4K tokens · pinned 6 days ago

  • aws-fault-injection-service

    Plans, builds, runs, and analyzes chaos engineering experiments using AWS Fault Injection Service to test application resilience.

    by Amazon (AWS)Official publisher

    Claude Code, Codex, Cursor +3 · about 1.9K tokens · pinned 6 days ago

  • aws-lambda-managed-instances

    Evaluates and migrates AWS Lambda workloads to Lambda Managed Instances, which run functions on EC2 instances while AWS handles provisioning, patching, and…

    by Amazon (AWS)Official publisher

    Claude Code, Codex, Cursor +3 · about 3.5K tokens · pinned 6 days ago

Open roles at Hugging Face

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use