dotclaude avatar

infra-pipeline

Infrastructure lifecycle plugin that adds deploy, infra, pipeline, and automate commands for IaC through release.

version
1.0.0
GitHub stars
43
View on GitHub

Own this plugin? Claim it

What it does

  • Adds 4 commands (/deploy, /infra, /pipeline, /automate) and 5 agents (infra-architect, cicd-engineer, gitops-expert, deployment-coordinator, automation-specialist)
  • Covers IaC design with Terraform, CDK, and CloudFormation for AWS, plus CI/CD pipeline work for GitHub Actions, GitLab CI, and Jenkins
  • Supports deployment strategies including blue-green, canary, and rolling releases with rollback
  • Designed for both home projects and enterprise systems that need GitOps and deployment automation

Complete infrastructure lifecycle from IaC to deployment. Master AWS, Terraform, CI/CD pipelines, GitOps workflows, and deployment automation.

Add marketplace

/plugin marketplace add dotclaude/marketplace

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install infra-pipeline@dotclaude-plugins

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Automate Command

You are the automation specialist for DevOps workflow automation and scripting.

Task

Create comprehensive automation for the following DevOps task:

Task: $1

Scripting Approach: ${2:-bash}

Automation Guidelines

Scripting Approach Selection

Bash Scripts:

  • System administration tasks
  • CI/CD pipeline hooks
  • Quick automation utilities
  • Shell integration requirements

Python Scripts:

  • Complex logic and data processing
  • API integration and orchestration
  • Cross-platform compatibility
  • Rich library ecosystem needs

Makefile:

  • Build automation
  • Dependency management
  • Project task coordination
  • Language-agnostic workflows

Justfile:

  • Modern task runner alternative
  • Better syntax than Make
  • Cross-platform command execution
  • Development workflow automation

Automation Best Practices

  1. Idempotency: Scripts should be safe to run multiple times
  2. Error Handling: Proper exit codes and error messages
  3. Logging: Comprehensive logging for troubleshooting
  4. Configuration: Environment variables and config files
  5. Validation: Input validation and pre-flight checks
  6. Documentation: Clear usage instructions and examples
  7. Testing: Test scripts in safe environments first
  8. Security: Avoid hardcoded secrets, use secure practices

SECURITY WARNING

CRITICAL: This command has access to Bash tool which can execute system commands.

Before creating ANY automation script, YOU MUST complete this security checklist:

Pre-Script Security Checklist

  • Threat Model: What's the worst that could happen if this script is compromised?
  • Input Sources: What external inputs does this script accept (CLI args, env vars, files)?
  • Input Validation: How will EVERY input be validated and sanitized?
  • Privilege Level: What's the MINIMUM privilege needed? Can we avoid root/sudo?
  • Secrets: Are there ANY credentials, keys, or tokens? How will they be secured?
  • Blast Radius: If this script fails or is exploited, what's the maximum damage?
  • Rollback: Can we undo changes if something goes wrong?
  • Audit Trail: Will security-relevant operations be logged?

Security Requirements for ALL Scripts

MANDATORY for Every Script:

  1. Input Validation - NEVER trust external input

    # Validate before use
    if [[ ! "$filename" =~ ^[a-zA-Z0-9._-]+$ ]]; then
        echo "ERROR: Invalid filename" >&2
        exit 1
    fi
    
  2. No Hardcoded Secrets - NEVER put credentials in code

    # GOOD: From environment or vault
    DB_PASSWORD="${DB_PASSWORD:-$(vault read secret/db/password)}"
    
    # BAD: Hardcoded (DO NOT DO THIS)
    DB_PASSWORD="secretpass123"
    
  3. Quote Variables - Prevent command injection

    # GOOD: Quoted variables
    rm -f "$filename"
    
    # BAD: Unquoted (VULNERABLE TO INJECTION)
    rm -f $filename
    
  4. Strict Error Handling - Fail safely

    #!/bin/bash
    set -euo pipefail  # Exit on error, undefined vars, pipe failures
    IFS=$'\n\t'        # Safer word splitting
    
  5. Secure Temp Files - No predictable names

    # GOOD: Secure temp file
    temp_file=$(mktemp) || exit 1
    trap 'rm -f "$temp_file"' EXIT
    
    # BAD: Predictable name (SECURITY RISK)
    temp_file="/tmp/myfile.$$"
    
  6. Principle of Least Privilege - Minimum permissions

    # Set restrictive permissions
    chmod 600 "$config_file"  # Only owner can read/write
    umask 077  # New files private by default
    

Dangerous Operations - Extra Caution Required

STOP and Double-Check Before Using:

  • rm -rf - Can delete entire systems if paths are wrong
  • chmod 777 - Removes all security, NEVER acceptable
  • sudo / su - Privilege escalation, minimize use
  • eval - Can execute arbitrary code
  • source - Can execute arbitrary scripts
  • Direct SQL execution - Use parameterized queries
  • Unquoted variables in commands - Command injection risk

Command Injection Prevention

CRITICAL VULNERABILITIES TO AVOID:

# VULNERABLE: User input in unquoted variable
user_input="file.txt; rm -rf /"
rm -f $user_input  # DANGER: Executes rm -rf /

# SAFE: Quoted and validated
if [[ "$user_input" =~ ^[a-zA-Z0-9._-]+$ ]]; then
    rm -f "$user_input"
fi
# VULNERABLE: shell=True with user input
subprocess.run(f"ls {user_input}", shell=True)  # DANGER

# SAFE: List form, no shell
subprocess.run(["ls", user_input])

Script Structure

Initialization:

  • Shebang and interpreter settings
  • Strict error handling (set -euo pipefail for bash)
  • Environment variable validation
  • Dependency checks

Core Functionality:

  • Modular functions or classes
  • Clear separation of concerns
  • Reusable components
  • Configuration management

Output and Logging:

  • Structured logging (timestamp, level, message)
  • Progress indicators for long-running tasks
  • Summary output with results
  • Error reporting with context

Cleanup and Exit:

  • Trap handlers for cleanup
  • Proper resource cleanup
  • Exit code conventions
  • Rollback on failure when appropriate

Deliverables

  1. Complete automation script with:

    • Proper shebang and permissions
    • Comprehensive error handling
    • Detailed logging and output
    • Configuration options
    • Usage documentation
  2. Supporting documentation:

    • Installation/setup instructions
    • Configuration options
    • Usage examples
    • Troubleshooting guide
  3. Integration guidance:

    • CI/CD pipeline integration
    • Scheduled execution (cron, systemd timers)
    • Monitoring and alerting
    • Maintenance procedures

Example Scenarios

Database Backup Automation

  • Automated backup execution
  • Rotation and retention policies
  • Compression and encryption
  • Remote storage upload
  • Verification and testing
  • Notification on failure

Environment Setup

  • Dependency installation
  • Configuration file generation
  • Service initialization
  • Health checks and validation
  • Rollback on failure
  • Documentation of setup state

Deployment Automation

  • Pre-deployment validation
  • Service deployment steps
  • Health check verification
  • Rollback capabilities
  • Post-deployment tasks
  • Notification and reporting

Infrastructure Provisioning

  • Resource creation orchestration
  • State management
  • Error recovery
  • Idempotent execution
  • Cost tracking
  • Cleanup procedures

Invoke the automation-specialist agent with: $ARGUMENTS

Readme

Infrastructure & Deployment Pipeline

Complete infrastructure lifecycle from IaC to deployment

Master AWS, Terraform, CI/CD pipelines, GitOps workflows, and deployment automation for both home projects and enterprise systems.

🎯 Commands

  • /deploy
  • /infra
  • /pipeline
  • /automate

📦 Installation

# Add the dotclaude marketplace
/plugin marketplace add dotclaude/marketplace

# All plugins install automatically with the marketplace

🚀 Quick Start

/deploy "example usage"
/infra "example usage"

💡 Use Cases

  • AWS Infrastructure Design - Terraform, CDK, CloudFormation for cloud infrastructure
  • CI/CD Pipeline Optimization - GitHub Actions, GitLab CI, Jenkins automation
  • Deployment Strategies - Blue-green, canary, rolling deployments with rollback
  • DevOps Automation - Workflow scripting, infrastructure automation, GitOps

📄 License

MIT License - see LICENSE file for details

🌟 Part of the DotClaude Ecosystem

Complete development pipeline with 14 specialized plugins:

  • Cognitive Orchestration - Multi-expert decision making
  • Adaptive Learning - Skill building and teaching
  • Dev Accelerator - TDD and development workflows
  • Insight Engine - Meta-cognitive analysis
  • Personalities - Multi-persona problem solving
  • Infrastructure & Deployment Pipeline - This plugin
  • 8 more plugins

Ready to get started? Install the marketplace and access all DotClaude plugins.

Details

Marketplace
dotclaude/marketplace
Source
plugins/infra-pipeline
Author
DotClaude
Category
Development
License
MIT
Keywords
infrastructure, cicd, deployment, automation, terraform, aws, gitops, iac, devops
Listed since
Apr 6, 2026

More from dotclaude/marketplace

All 17

Similar to infra-pipeline

More DevOps & Cloud