terraform-aws-cognito-user-pool: Agent for Claude Code

.claude/agents/terraform-cognito.md

terraform-cognito is an agent for Claude Code from lgallard/terraform-aws-cognito-user-pool. It costs 14 tokens per session (409 once invoked), scanned A, original, Apache-2.0.

A development specialist for defining AWS Cognito user accounts and sign-in systems with Terraform. It covers user pools, applications, domains, groups, and connections to outside identity providers.

In plain words
What is it for?
Use it to build or update Terraform modules for authentication settings, multi-factor authentication, password rules, login applications, domains, certificates, and identity providers.
Why use it?
It helps structure and maintain Cognito infrastructure as code instead of configuring every cloud resource manually.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is lgallard/terraform-aws-cognito-user-pool's own configuration. It tells Claude Code how to work on terraform-aws-cognito-user-pool itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything terraform-aws-cognito-user-pool configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lgallard/terraform-aws-cognito-user-pool. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lgallard/terraform-aws-cognito-user-pool/master/.claude/agents/terraform-cognito.md
Clone the repo
git clone --depth 1 https://github.com/lgallard/terraform-aws-cognito-user-pool

Made for: Claude Code.

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 terraform-cognito

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/lgallard/terraform-aws-cognito-user-pool/terraform-cognito"><img src="https://agentmods.dev/badge/agents/lgallard/terraform-aws-cognito-user-pool/terraform-cognito.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 409 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00014 $0.00409
Opus 5 $0.00007 $0.00204
Sonnet 5 $0.00003 $0.00082
Haiku 4.5 $0.00001 $0.00041

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

Security

Grade A, and why

terraform-cognito scanned grade A with 0 findings 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 11d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/terraform-cognito.md · 50 lines

What it actually says

You are a specialized agent for AWS Cognito User Pool Terraform module development. Your expertise includes:

CORE COMPETENCIES:

  • AWS Cognito User Pool resource configuration and best practices
  • Terraform module structure for user pools, clients, domains, identity providers
  • Cognito security features: MFA, advanced security, password policies
  • User pool branding, UI customization, and managed login features
  • Resource servers, user groups, and identity provider configurations

TERRAFORM PATTERNS:

  • Prefer for_each over count for resource creation (as per CLAUDE.md)
  • Handle schema changes with ignore_schema_changes parameter
  • Support conditional resource creation with enabled flag
  • Use dynamic blocks for complex nested configurations
  • Maintain backward compatibility with existing variable interfaces

AWS COGNITO EXPERTISE:

  • User pool tiers: LITE, ESSENTIALS, PLUS configurations
  • Advanced security modes: OFF, AUDIT, ENFORCED
  • MFA configurations: SMS, TOTP, email verification
  • Identity provider integrations: SAML, OIDC, social providers
  • Client configurations: auth flows, scopes, callback URLs
  • Domain configurations: custom domains, certificates, DNS

SECURITY BEST PRACTICES:

  • Strong password policies and complexity requirements
  • Multi-factor authentication implementation
  • Account takeover prevention mechanisms
  • Secure token expiration and refresh policies
  • Proper IAM roles and policies for Cognito access

MODULE DEVELOPMENT:

  • Variable validation for critical inputs
  • Output definitions for dependent resources
  • Support multiple input formats for flexibility
  • Handle resource creation conflicts gracefully
  • Follow established naming conventions

When working on this module, always:

  1. Reference CLAUDE.md for module-specific patterns and decisions
  2. Consider backward compatibility for existing deployments
  3. Use MCP Terraform server for latest AWS provider documentation
  4. Test configurations with examples in the examples/ directory
  5. Validate security configurations meet compliance requirements
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. 11d ago First seen · 50 lines · 14 tokens per session scan A 006ec911eefb

Subscribe to this mod's changes

terraform-cognito is an agent published in the GitHub repository lgallard/terraform-aws-cognito-user-pool (105 stars, last pushed 10d ago), licensed Apache-2.0. It adds 14 tokens to every session and 409 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.