Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

cognito

Skill by itsmostafa

Explains how to set up AWS Cognito user pools, identity pools and OAuth flows, with CLI and Python examples. It is aimed at developers adding sign-up, sign-in and AWS credential access to web or mobile apps.

  • Score 89
  • 1.2k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install cognito

Built from the published package, never by AI.

git clone --depth 1 https://github.com/itsmostafa/aws-agent-skills /tmp/aws-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/aws-agent-skills/skills/cognito ~/.claude/skills/cognito

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install cognito in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill is a reference guide for AWS Cognito, the authentication and user management service from Amazon Web Services. It covers user pools for sign-up and sign-in, identity pools that provide temporary AWS credentials, and the ID, access and refresh token types with their lifetimes. It also includes AWS CLI commands and Python boto3 examples for creating pools and app clients, signing users up and in, and refreshing tokens.

The guide lists best practices for security and architecture, along with troubleshooting notes for sign-in failures, token validation, hosted UI problems and rate limiting. It is aimed at developers setting up Cognito for web or mobile applications who want step-by-step CLI and SDK commands. The source is a single SKILL.md file that links to the official Cognito documentation.

Written from the project's SKILL.md and checked against it.

What it can do

  • Create user poolsCreates a Cognito user pool with password policy, email verification and optional MFA using the AWS CLI.
  • Create app clientsSets up an app client with OAuth flows, callback and logout URLs, and token validity settings.
  • Sign up and confirm usersRegisters users with boto3 and confirms sign-up with a confirmation code.
  • Authenticate usersShows SRP and admin password authentication flows and reading the returned tokens.
  • Refresh tokensGets new ID and access tokens from a refresh token with REFRESH_TOKEN_AUTH.
  • Create identity poolsCreates an identity pool linked to a user pool, with optional unauthenticated identities.
  • Get AWS credentialsRetrieves an identity ID and temporary AWS credentials for a signed-in user.
  • Troubleshoot sign-in and tokensLists common causes and debug commands for sign-in failures and JWT validation errors.

What you need

  • AWS CLI
  • Python with boto3
  • python-jose or a similar library for JWT validation

Try asking

  • Create a Cognito user pool with a 12-character password policy and email sign-in
  • Show me how to refresh Cognito tokens with boto3
  • Help me get temporary AWS credentials from a Cognito identity pool

Good to know

  • The guide says ADMIN_USER_PASSWORD_AUTH is not recommended for production
  • Refresh token lifetime is configurable, and the source gives 30 days as the example
  • The source notes TooManyRequestsException rate limits and suggests exponential backoff

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/cognito/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md9 KB
  • auth-flows.md9 KB

Alternatives to cognito

All alternatives →

Compare with function_health, windows-privilege-escalation or github-actions-advanced

cognito: common questions

Does this skill cover identity pools as well as user pools?

Yes. It explains that identity pools provide temporary AWS credentials and includes CLI and boto3 examples for creating one and getting credentials.

How long do Cognito tokens last according to this guide?

The guide lists ID and access tokens at 1 hour and refresh tokens at 30 days by default, noting the refresh token lifetime is configurable.

Does it include steps for troubleshooting Cognito errors?

Yes. It has troubleshooting sections for users who cannot sign in, token validation failures, hosted UI problems and rate limiting.

How do I install cognito?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is cognito free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is cognito safe to use?

It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to cognito?

Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.

cognito Install

Add to stack

Loading.