cognito

cognito is a skill for Claude Code from itsmostafa/aws-agent-skills. It costs 38 tokens per session (2,314 once invoked), scanned A, original, MIT.

Guidance for using Amazon Cognito, an AWS service for user sign-up, sign-in, identity management, and access control in web and mobile applications. It covers user directories, social or enterprise login providers, OAuth tokens, and temporary AWS credentials.

In plain words
What is it for?
Use it to configure user pools and identity pools, set password and multi-factor rules, implement OAuth flows, manage user attributes, and connect social or enterprise identity providers.
Why use it?
It helps you add account management and authentication without building every login flow yourself. It also explains how to control access to APIs and AWS resources after a user signs in.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the aws-agent-skills plugin — 18 skills shipped together

Good fit Use it to configure user pools and identity pools, set password and multi-factor rules, implement OAuth flows, manage user attributes, and connect social or enterprise identity providers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/itsmostafa/aws-agent-skills/cognito
About the project

AWS Agent Skills is a collection of local instructions that help coding agents reason about AWS cloud services and engineering tasks. It supports agents working with areas such as identity, compute, storage, serverless, databases, networking, and security. The catalogue contains 18 service-focused skills and one plugin for using these capabilities with coding agents.

itsmostafa/aws-agent-skills · 1,152 stars · on GitHub

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 itsmostafa/aws-agent-skills --skill cognito
Clone the repo
git clone --depth 1 https://github.com/itsmostafa/aws-agent-skills

Made for: Claude Code.

Or install aws-agent-skills, the plugin that ships this one along with the rest of its 18 skills.

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 cognito

README.md
[![agentmods](https://agentmods.dev/badge/skills/itsmostafa/aws-agent-skills/cognito/github.svg)](https://agentmods.dev/skills/itsmostafa/aws-agent-skills/cognito)
Your own site
<a href="https://agentmods.dev/skills/itsmostafa/aws-agent-skills/cognito"><img src="https://agentmods.dev/badge/skills/itsmostafa/aws-agent-skills/cognito/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 cognito

Your own site · 80×15
<a href="https://agentmods.dev/skills/itsmostafa/aws-agent-skills/cognito"><img src="https://agentmods.dev/badge/skills/itsmostafa/aws-agent-skills/cognito.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,314 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 44
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 45
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 275
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.00038 $0.02314
Opus 5 $0.00019 $0.01157
Sonnet 5 $0.00008 $0.00463
Haiku 4.5 $0.00004 $0.00231

Measured 10d ago against content hash 65216c1e0145, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

cognito scanned grade A 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 10d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

jwks = requests.get(jwks_url).json()
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • cognito — 92% identical, 32 lines differ
skills/cognito/SKILL.md · 355 lines

How it starts

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

AWS Cognito

Amazon Cognito provides authentication, authorization, and user management for web and mobile applications. Users can sign in directly or through federated identity providers.

Table of Contents

Core Concepts

User Pools

User directory for sign-up and sign-in. Provides:

  • User registration and authentication
  • OAuth 2.0 / OpenID Connect tokens
  • MFA and password policies
  • Customizable UI and flows

Identity Pools (Federated Identities)

Provide temporary AWS credentials to access AWS services. Users can be:

  • Cognito User Pool users
  • Social identity (Google, Facebook, Apple)
  • SAML/OIDC enterprise identity
  • Anonymous guests

Tokens

Token Purpose Lifetime
ID Token User identity claims 1 hour
Access Token API authorization 1 hour
Refresh Token Get new ID/Access tokens 30 days (configurable)

Common Patterns

Create User Pool

AWS CLI:

aws cognito-idp create-user-pool \
  --pool-name my-app-users \
  --policies '{
    "PasswordPolicy": {
      "MinimumLength": 12,
      "RequireUppercase": true,
      "RequireLowercase": true,
      "RequireNumbers": true,
      "RequireSymbols": true
    }
  }' \
  --auto-verified-attributes email \
  --username-attributes email \
  --mfa-configuration OPTIONAL \
  --user-attribute-update-settings '{
    "AttributesRequireVerificationBeforeUpdate": ["email"]
  }'

Create App Client

aws cognito-idp create-user-pool-client \
  --user-pool-id us-east-1_abc123 \
  --client-name my-web-app \
  --generate-secret \
  --explicit-auth-flows ALLOW_USER_SRP_AUTH ALLOW_REFRESH_TOKEN_AUTH \
  --supported-identity-providers COGNITO \
  --callback-urls https://myapp.com/callback \
  --logout-urls https://myapp.com/logout \
  --allowed-o-auth-flows code \
  --allowed-o-auth-scopes openid email profile \
  --allowed-o-auth-flows-user-pool-client \
  --access-token-validity 60 \
  --id-token-validity 60 \
  --refresh-token-validity 30 \
  --token-validity-units '{
    "AccessToken": "minutes",
    "IdToken": "minutes",
    "RefreshToken": "days"
  }'

Read the full file on GitHub · 355 lines

Files

What ships with it

1 file 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. 10d ago First seen · 355 lines · 38 tokens per session scan A 65216c1e0145

Subscribe to this mod's changes

cognito is a skill published in the GitHub repository itsmostafa/aws-agent-skills (1,152 stars, last pushed 2d ago), licensed MIT. It adds 38 tokens to every session and 2,314 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.