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.
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/cognitoRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/itsmostafa/aws-agent-skills /tmp/aws-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/aws-agent-skills/skills/cognito ~/.gemini/antigravity-cli/skills/cognitoAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
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
ANo 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 →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
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.
