validate-template

A command that checks an AWS CloudFormation template, a file describing cloud resources, for syntax, security, and recommended practices.

In plain words
What is it for?
Use it to validate a named YAML or JSON template with AWS validation, cfn-lint checks, and security scanning when available.
Why use it?
It catches template problems before you try to deploy infrastructure and points out missing or incorrect resource settings.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/armanzeroeight/fastagent-plugins/validate-template
Clone the repo
git clone --depth 1 https://github.com/armanzeroeight/fastagent-plugins
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 903 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00012 $0.00903
Opus 5 $0.00006 $0.00451
Sonnet 5 $0.00002 $0.00181
Haiku 4.5 $0.00001 $0.00090

Measured 3d ago against content hash 6211843d0a58, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

validate-template 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 3d 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.

plugins/cloudformation-toolkit/commands/validate-template.md · 147 lines

How it starts

The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Validate CloudFormation Template

Context

  • Current directory: !pwd
  • Available CloudFormation templates: !find . -name "*.yaml" -o -name "*.yml" -o -name "*.json" | grep -E "(template|stack|cfn)" | head -20
  • AWS CLI version: !aws --version 2>&1 || echo "AWS CLI not installed"
  • cfn-lint installed: !cfn-lint --version 2>&1 || echo "cfn-lint not installed"

Your Task

Validate the specified CloudFormation template for syntax errors, security issues, and best practices violations.

Arguments

  • $1: Path to CloudFormation template file (required)

Steps

  1. Verify template file exists

    • Check if the specified file exists
    • If not provided, list available templates and ask user to specify
  2. Run AWS CloudFormation validation

    aws cloudformation validate-template --template-body file://$1
    
    • Check for syntax errors
    • Verify template structure
    • Report any AWS validation errors
  3. Run cfn-lint validation (if available)

    cfn-lint $1
    
    • Check for best practices violations
    • Identify resource property issues
    • Report warnings and errors
    • If cfn-lint not installed, suggest: pip install cfn-lint
  4. Run cfn-nag security scan (if available)

    cfn_nag_scan --input-path $1
    
    • Check for security issues
    • Identify overly permissive IAM policies
    • Check for unencrypted resources
    • Report security warnings and failures
    • If cfn-nag not installed, suggest: gem install cfn-nag
  5. Analyze and summarize results

    • Categorize issues by severity (errors, warnings, info)
    • Highlight critical security issues
    • Provide specific recommendations for fixes
    • Show line numbers for issues when available
  6. Provide actionable recommendations

    • For each issue, explain what's wrong
    • Suggest specific fixes with code examples
    • Prioritize by impact (high/medium/low)
    • Reference best practices documentation

Output Format

Read the full file on GitHub · 147 lines

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. 3d ago First seen · 147 lines · 12 tokens per session scan A 6211843d0a58

Subscribe to this mod's changes

validate-template is a command published in the GitHub repository armanzeroeight/fastagent-plugins (29 stars, last pushed 1mo ago), licensed MIT. It adds 12 tokens to every session and 903 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.