qodex-ai

deployment-automation

1
0
# Install this skill:
npx skills add qodex-ai/ai-agent-skills --skill "deployment-automation"

Install specific skill from multi-skill repository

# Description

Automate deployment to Vercel platform. Manages deployment configuration, environment setup, and CI/CD integration.

# SKILL.md


name: deployment-automation
description: Automate deployment to Vercel platform. Manages deployment configuration, environment setup, and CI/CD integration.
license: Proprietary. LICENSE.txt has complete terms


Vercel Production Deploy Loop

Instructions

When requested to deploy to Vercel production with automatic error fixing:

  1. Initial Deployment Attempt
  2. Run vercel --prod to start production deployment
  3. Wait for deployment to complete

  4. Error Detection & Analysis

  5. CRITICAL: Use Vercel MCP tool to fetch detailed logs:
    • The MCP logs provide much more detail than CLI output
  6. Analyze the build logs to identify root cause:
    • Build errors (TypeScript, ESLint, compilation)
    • Runtime errors
    • Environment variable issues
    • Dependency problems
    • Configuration issues
  7. Extract specific error messages

  8. Error Fixing

  9. Make minimal, targeted fixes to resolve the specific error

  10. Retry Deployment

  11. Run vercel --prod again with the fixes applied
  12. Repeat steps until deployment succeeds

  13. Success Confirmation

  14. Once deployment succeeds, report:
    • Deployment URL
    • All errors that were fixed
    • Summary of changes made
  15. Ask if user wants to commit/push the fixes

Loop Exit Conditions

  • โœ… Deployment succeeds
  • โŒ SAME error occurs 5+ times (suggest manual intervention)
  • โŒ User requests to stop

Best Practices

  • Make incremental fixes rather than large refactors
  • Preserve user's code style and patterns when fixing

Example Flow

User: "Deploy to production and fix any errors"

  • Vercel MCP build logs are the PRIMARY source of error information
  • CLI output alone is insufficient for proper error diagnosis
  • Always wait for deployment to complete before fetching logs
  • If errors require user input (like API keys), prompt user immediately

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.