How this command is triggered — by the user, by Claude, or both
Slash command
/org-generator:backend <client-name>This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# org-generator:backend
Creates an S3 backend bucket for storing Terraform state following the `{client-name}-backend` naming convention.
## Usage
## Arguments
- `client-name`: The client identifier (kebab-case, e.g., `acme-corp`)
## Workflow
### Step 1: Check Existing Backends
1. Read `~/Portfolio/aws/variables.tf`
2. Check if `<client-name>-backend` already exists in the `s3` variable map
3. If exists, skip creation and validate bucket exists
### Step 2: Add Backend Entry
Add entry to `~/Portfolio/aws/variables.tf`:
### Step 3: Apply Terraform
### Step 4: Validate Creatio...Creates an S3 backend bucket for storing Terraform state following the {client-name}-backend naming convention.
/org-generator:backend <client-name>
client-name: The client identifier (kebab-case, e.g., acme-corp)~/Portfolio/aws/variables.tf<client-name>-backend already exists in the s3 variable mapAdd entry to ~/Portfolio/aws/variables.tf:
variable "s3" {
description = "s3 buckets"
type = map(any)
default = {
# ... existing entries ...
<client-name>-backend = {
env = "projects"
encryption = "AES256"
}
}
}
cd ~/Portfolio/aws/
terraform init
terraform plan -target=module.s3["<client-name>-backend"]
terraform apply -target=module.s3["<client-name>-backend"] -auto-approve
aws s3 ls s3://<client-name>-backend --region us-east-1
The backend bucket is created with:
Uses the S3 module at ~/Portfolio/aws/modules/s3/:
module "s3" {
source = "./modules/s3/"
for_each = var.s3
name = each.key
env = each.value.env
encryption = each.value.encryption
}
| Error | Resolution |
|---|---|
| Bucket already exists | Skip creation, verify access |
| AWS credentials missing | Run aws configure or set environment variables |
| Terraform init fails | Check AWS provider configuration |
| Apply fails | Check IAM permissions for S3 bucket creation |
/org-generator:backend acme-corp
This will:
acme-corp-backend to ~/Portfolio/aws/variables.tfnpx claudepluginhub nokodoko/agents --plugin org-generator/configure-s3Creates and configures a secure AWS S3 bucket interactively based on purpose, with encryption, versioning, lifecycle rules, and logging. Generates CloudFormation or CDK IaC and documentation.
/tf-initInitializes Terraform workspace with backend configuration, supports -reconfigure flag and -backend-config overrides like key=prod.tfstate. Validates and reports status.
/tf-scaffoldScaffolds production-ready Terraform infrastructure for a service with live/, modules/, envs/ structure, resource modules for DB/cache/etc., environment wiring, and CI/CD pipeline.
/infraGenerates production-ready Terraform IaC for AWS, Azure, or GCP with multi-env setups, modules (network/compute/database/etc.), scripts, and policies.
/configure-gcsInteractively creates and configures a secure GCS bucket following best practices, generating Terraform or gcloud commands and documentation.
/create-modulePrompts for module purpose (networking, compute, etc.) then creates reusable Terraform module with full dir structure, vars/resources/outputs/README/examples, and validates.