hf-cloud-aws-context-discovery

hf-cloud-aws-context-discovery is a skill for Codex from PracticalSwan/agent-skills. It costs 132 tokens per session (1,489 once invoked), scanned C, original, MIT.

An AWS setup check that finds the active account, profile, region, and caller identity from the local configuration. AWS is Amazon's cloud platform, where developers run services and store data.

In plain words
What is it for?
Use it at the start of AWS tasks such as deploying to SageMaker, creating cloud resources, or calling AWS APIs.
Why use it?
It prevents cloud work from using the wrong account or region and avoids guessing configuration details. It also confirms that the available credentials work before changes are made.

Skill for Codex

Written for Codex: reads $CODEX_HOME. Also seen: mentions Claude Code; mentions Codex.

Good fit Use it at the start of AWS tasks such as deploying to SageMaker, creating cloud resources, or calling AWS APIs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/practicalswan/agent-skills/hf-cloud-aws-context-discovery
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PracticalSwan/agent-skills --skill hf-cloud-aws-context-discovery
Clone the repo
git clone --depth 1 https://github.com/PracticalSwan/agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hf-cloud-aws-context-discovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/practicalswan/agent-skills/hf-cloud-aws-context-discovery/github.svg)](https://agentmods.dev/skills/practicalswan/agent-skills/hf-cloud-aws-context-discovery)
Your own site
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/hf-cloud-aws-context-discovery"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/hf-cloud-aws-context-discovery/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hf-cloud-aws-context-discovery

Your own site · 80×15
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/hf-cloud-aws-context-discovery"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/hf-cloud-aws-context-discovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,489 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00132 $0.01489
Opus 5.5 $0.00053 $0.00596
Sonnet 5.5 $0.00026 $0.00298
Haiku 4.5 $0.00013 $0.00149

Measured 2mo ago against content hash 861167e68fcc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

hf-cloud-aws-context-discovery scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

`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
hf-cloud-aws-context-discovery/SKILL.md · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 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.

Read the full file on GitHub · 126 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed 861167e68fcc
  2. 2mo ago Changed a39d0c768be6
  3. 3mo ago First seen · 126 lines · 132 tokens per session scan C aa76f00bf005

Subscribe to this mod's changes

hf-cloud-aws-context-discovery is a skill published in the GitHub repository PracticalSwan/agent-skills (25 stars, last pushed 19d ago), licensed MIT. It adds 132 tokens to every session and 1,489 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

hf-cloud-aws-context-discovery compared with skills from other repositories

hf-cloud-aws-context-discovery next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hf-cloud-aws-context-discoveryPracticalSwan/agent-skillsSkill2519d agoMITC132Codex
agentcore-investigationawslabs/mcpSkill10.0ktodayApache-2.0A52Claude Code, Codex
framework-compliance-triageprowler-cloud/prowlerSkill15ktodayApache-2.0A24Claude Code
performing-cloud-log-forensics-with-athenaxalgorix/xalgorixSkill1.6ktodayApache-2.0A80Claude Code, Codex
securing-aws-lambda-execution-rolesxalgorix/xalgorixSkill1.6ktodayApache-2.0A53Claude Code, Codex
implementing-aws-iam-permission-boundariesxalgorix/xalgorixSkill1.6ktodayApache-2.0A34Claude Code, Codex
hyperpod-version-checkerawslabs/agent-pluginsSkill957yesterdayApache-2.0A120Claude Code