Sponsor Suno AI Music arrow_forward
Slash Command

Cloudformation Generate

Convert Terraform to CloudFormation or generate CFN templates

Type
Slash Command
GitHub stars
2.8k
License
MIT
Repo last updated
Sep 27, 2026

What Cloudformation Generate is

Cloudformation Generate is a slash command published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”

A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.

Cloudformation Generate gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.

How to install Cloudformation Generate

Claude Code

  1. Download cloudformation-generate.md from the repository.
  2. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
  3. Run it by typing / followed by its name.

Claude Cowork

  1. Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
  2. In Customize → Skills, click +, then upload the ZIP.
  3. Run it from any task with / and the skill name.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/packages/devops-automation-pack/plugins/05-terraform/commands/cloudformation-generate.md, shared under the repository's MIT license. Read the full file on GitHub.

Generates AWS CloudFormation templates from scratch or helps convert Terraform configurations to CloudFormation (with limitations).

When to Use This

  • Organization requires CloudFormation
  • Need to use AWS StackSets
  • Migrating from Terraform to CloudFormation
  • AWS Service Catalog integration
  • Prefer Terraform (use Terraform instead!)
  • Multi-cloud infrastructure (CFN is AWS-only)

How It Works

You are a CloudFormation expert. When user runs /cloudformation-generate or /cfn:

  1. Understand requirements:
  • Starting from scratch OR converting from Terraform?
  • What AWS resources? (VPC, EC2, RDS, S3, etc.)
  • Parameters needed (make template reusable)?
  • Outputs required?
  1. Generate CloudFormation structure:
   AWSTemplateFormatVersion: '2010-09-09'
   Description: [template description]

   Parameters:      # User inputs
   Mappings:        # Lookup tables (optional)
   Conditions:      # Conditional logic (optional)
   Resources:       # AWS resources (REQUIRED)
   Outputs:         # Return values
  1. Apply CFN best practices:
  • Use parameters for reusability
  • Proper DependsOn for ordering
  • Use !Ref and !GetAtt for references
  • Add outputs for important values
  • Use conditions for multi-environment
  1. Provide deployment guide:
  • CLI deployment commands
  • Console deployment steps
  • Parameter examples
  • Stack update procedures

Output Format

# Complete CloudFormation template
# Ready to deploy with aws cloudformation create-stack
## Deployment

### CLI:

aws cloudformation create-stack \ --stack-name my-stack \ --template-body file://template.yaml \ --parameters [params]


### Console:

[Step-by-step instructions]

Example

User: /cfn

Request: Create VPC with public/private subnets, similar to Terraform VPC module

Output:

AWSTemplateFormatVersion: '2010-09-09'
Description: 'VPC with public and private subnets across 2 AZs'

Parameters:
  VPCName:
    Description: Name of the VPC
    Type: String
    Default: MyVPC

  VPCCIDR:
    Description: CIDR block for VPC
    Type: String
    Default: 10.0.0.0/16
    AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$

  PublicSubnet1CIDR:
    Description: CIDR for public subnet in AZ1
    Type: String
…

Deployment Instructions:

# 1. Validate template
aws cloudformation validate-template --template-body file://vpc-template.yaml

# 2. Create stack (development)
aws cloudformation create-stack \
  --stack-name myapp-vpc-dev \
  --template-body file://vpc-template.yaml \
  --parameters \
    ParameterKey=VPCName,ParameterValue=myapp-dev \
    ParameterKey=Environment,ParameterValue=dev

# 3. Create stack (production)
aws cloudformation create-stack \
  --stack-name myapp-vpc-prod \
  --template-body file://vpc-template.yaml \
  --parameters \
    ParameterKey=VPCName,ParameterValue=myapp-prod \
    ParameterKey=Environment,ParameterValue=production
…

Key CFN Features Used

Parameters:

  • Make template reusable across environments
  • Validation with AllowedPattern, AllowedValues
  • Default values for convenience

Conditions:

  • IsProduction creates second NAT only in prod (cost savings)
  • !If function for conditional resource references

Mappings:

  • AZMapping for region-specific availability zones
  • Makes template portable across regions

Intrinsic Functions:

  • !Ref - Reference parameters or resources
  • !GetAtt - Get attribute from resource
  • !Sub - String substitution
  • !Join - Concatenate values
  • !FindInMap - Lookup from mapping

Outputs with Exports:

  • Export values for cross-stack references
  • Other stacks can import with !ImportValue

Terraform vs CloudFormation

Pro Tips

Use parameters for reusability Export outputs for cross-stack references Use conditions for environment differences Always use DependsOn for correct ordering Validate template before deploying

Common Conversions

Terraform → CloudFormation:

# Terraform
resource "aws_s3_bucket" "assets" {
  bucket = "myapp-assets"
}
# CloudFormation
Resources:
  AssetsBucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: myapp-assets

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Cloudformation Generate?

Cloudformation Generate is a slash command for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Convert Terraform to CloudFormation or generate CFN templates

How do I install Cloudformation Generate in Claude Code?

Download cloudformation-generate.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name.

Can I use Cloudformation Generate in Claude Cowork?

Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.

Is Cloudformation Generate safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.