Agent skill

Ec2 Deploy

by adam-s in adam-s/intercept

Deploy to EC2 production server. An agent skill from adam-s/intercept.

MITAuto-check: warningsDevOps & Cloud

Install Ec2 Deploy

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add adam-s/intercept --skill ec2-deploy -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install adam-s/intercept ec2-deploy --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/adam-s/intercept.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/ec2-deploy .claude/skills/ec2-deploy && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ec2-deploy
GitHub stars
189
Token cost
~1.9k tokens
SKILL.md length
518 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Deploy to EC2 production server. An agent skill from adam-s/intercept.

  • Works in 8 steps: Ensure local commit is pushed → Pull on EC2 → Drop and recreate the database → …
  • Deploying new code
  • SKILL.md covers ⚠️💣 MANDATORY CONSENT CHECK…, Config, Instance Discovery and SSH Connection, plus 6 more sections
  • Calls docker, ssh and aws; needs SSH_KEY

What it does

Ec2 Deploy is an agent skill from adam-s/intercept. Deploy to EC2 production server. Use when deploying new code, rebuilding Docker images, wiping and reseeding the database, checking container health, or managing the EC2 instance via AWS CLI.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Containers and Deployment. It works with Amazon Web Services and Docker. The repository describes itself as: Turn any website into a typed JSON API using self improving agents. The licence is MIT.

When your agent uses it

  • Deploying new code
  • Rebuilding Docker images
  • Wiping and reseeding the database
  • Checking container health

Example prompts

  • “/ec2-deploy”

Requirements

  • Docker
  • A credential in SSH_KEY

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Ensure local commit is pushed
  2. Pull on EC2
  3. Drop and recreate the database
  4. Stop api and web (keep db + redis running)
  5. Rebuild images
  6. Run migrations and seed data
  7. Start all containers
  8. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 6451b89. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • docker
    • ssh
    • aws
    • git
    • sh
    • pnpm
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker, ssh, aws, git, pnpm and curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • SSH_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ec2 Deploy loads about 1.9k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 518 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:34
    | `SSH_KEY` | Local SSH private key | `~/.ssh/my-app-prod-key.pem` |
  • NoteMentions a .env fileSKILL.md:94
    - `.env` file is at `$PROJECT_DIR/.env` (not in the Docker image)

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from adam-s/intercept at commit 6451b89, republished under its MIT licence (© adam-s). 518 words, ~1,888 tokens.

Download SKILL.mdSave it as .claude/skills/ec2-deploy/SKILL.md (or your agent's skills folder).
name
ec2-deploy
description
Deploy to EC2 production server. Use when deploying new code, rebuilding Docker images, wiping and reseeding the database, checking container health, or managing the EC2 instance via AWS CLI.

EC2 Deploy Skill

Check if .claude/user-consent.md exists with ACCEPTED: true. If yes, display: ✅ Prior consent on file (DATE). Proceeding. and skip to "Config."

If not, present the 3 warnings from .claude/skills/instruction-tuning/SKILL.md (ToS, autonomous agents, resource consumption). All 3 must be accepted. Write .claude/user-consent.md on acceptance. This file is shared across all skills that affect external infrastructure.


Manage EC2 instances and Docker Compose services using the AWS CLI and SSH.

Use this skill when asked to:

  • Deploy new code to production
  • Wipe and reseed the production database
  • Restart/rebuild containers
  • Check container health, logs, or DB state
  • Find the EC2 instance IP or connection info

Config

Configure these values based on your deployment environment. All commands below reference them by name.

VariableDescriptionExample
INSTANCE_NAMEEC2 instance name tagmy-app-prod
SSH_KEYLocal SSH private key~/.ssh/my-app-prod-key.pem
SSH_USEROS user on instanceubuntu (or ec2-user)
PROJECT_DIRGit repo root on instance/home/ubuntu/my-project
COMPOSE_FILEDocker Compose configdocker-compose.prod.yml
DB_USERDatabase usernameappuser
DB_NAMEDatabase nameapp_db

Get your INSTANCE_ID from AWS console or aws ec2 describe-instances --filters "Name=tag:Name,Values=$INSTANCE_NAME".


Instance Discovery

ALWAYS start here. Never hardcode IPs — use AWS CLI to get the current public IP:

bash
aws ec2 describe-instances \
  --filters "Name=instance-state-name,Values=running" \
  --query "Reservations[*].Instances[*].{ID:InstanceId,Name:Tags[?Key=='Name']|[0].Value,IP:PublicIpAddress,Type:InstanceType,State:State.Name}" \
  --output table

Find your instance name from the output above. If its public IP has changed, this command will always show the current one.


SSH Connection

bash
ssh -i $SSH_KEY -o StrictHostKeyChecking=no $SSH_USER@<PUBLIC_IP>
  • Key file: $SSH_KEY (configure before use)
  • Username: $SSH_USER (typically ubuntu for Ubuntu, ec2-user for Amazon Linux)
  • Project root: $PROJECT_DIR (your git repo path)

Verify the key before SSHing:

bash
aws ec2 describe-instances \
  --instance-ids $INSTANCE_ID \
  --query "Reservations[0].Instances[0].KeyName" \
  --output text

Container Architecture

Docker containers managed via docker-compose.prod.yml:

ContainerImagePurpose
app_dbtimescale/timescaledb or postgresPostgreSQL database
app_redisredis:7-alpineJob queue (BullMQ)
app_apiyour-app-api (local build)API server
app_webyour-app-web (local build)Frontend (Next.js or similar)
app_proxycaddy:2-alpineReverse proxy (80/443)

Key facts:

  • Database is NOT exposed to host ports in production — only accessible via docker exec or within Docker network
  • .env file is at $PROJECT_DIR/.env (not in the Docker image)
  • Adjust container names to match your docker-compose.prod.yml

Show full SKILL.md (195 more words)Show less

Routine Deployment (code only, no DB wipe)

When only code changes (no schema or seed changes):

bash
ssh -i $SSH_KEY $SSH_USER@<IP> "
  cd $PROJECT_DIR
  git pull origin main
  docker compose -f $COMPOSE_FILE build api web
  docker compose -f $COMPOSE_FILE up -d
"

Full Wipe + Reseed Deployment

When schema changed or a clean slate is needed.

Step 1: Ensure local commit is pushed
bash
git push origin main
Step 2: Pull on EC2
bash
ssh -i $SSH_KEY $SSH_USER@<IP> "
  cd $PROJECT_DIR && git pull origin main && git log --oneline -3
"
Step 3: Drop and recreate the database
bash
ssh -i $SSH_KEY $SSH_USER@<IP> "
  docker exec app_db psql -U $DB_USER -d postgres \
    -c \"SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname='$DB_NAME' AND pid<>pg_backend_pid();\"
  docker exec app_db psql -U $DB_USER -d postgres \
    -c 'DROP DATABASE IF EXISTS $DB_NAME;'
  docker exec app_db psql -U $DB_USER -d postgres \
    -c 'CREATE DATABASE $DB_NAME OWNER $DB_USER;'
"
Step 4: Stop api and web (keep db + redis running)
bash
ssh -i $SSH_KEY $SSH_USER@<IP> "
  cd $PROJECT_DIR
  docker compose -f $COMPOSE_FILE stop api web
"
Step 5: Rebuild images
bash
ssh -i $SSH_KEY $SSH_USER@<IP> "
  cd $PROJECT_DIR
  docker compose -f $COMPOSE_FILE build api web
"

Takes 3–8 minutes depending on dependency installations.

Step 6: Run migrations and seed data
bash
ssh -i $SSH_KEY $SSH_USER@<IP> "
  cd $PROJECT_DIR
  docker compose -f $COMPOSE_FILE run --rm --no-deps api \
    sh -c 'cd /app && pnpm run db:migrate && pnpm run db:seed'
"

Adjust migration/seed commands to match your project setup.

Step 7: Start all containers
bash
ssh -i $SSH_KEY $SSH_USER@<IP> "
  cd $PROJECT_DIR
  docker compose -f $COMPOSE_FILE up -d
"
Step 8: Verify
bash
# Container health
ssh -i $SSH_KEY $SSH_USER@<IP> \
  "docker ps --format 'table {{.Names}}\t{{.Status}}'"

# API health
curl -s https://your-domain.com/api/health

# DB check
ssh -i $SSH_KEY $SSH_USER@<IP> "
  docker exec app_db psql -U $DB_USER -d $DB_NAME -c 'SELECT COUNT(*) FROM information_schema.tables;'
"

Running Ad-Hoc Commands

Execute SQL in the DB
bash
ssh -i $SSH_KEY $SSH_USER@<IP> \
  "docker exec app_db psql -U $DB_USER -d $DB_NAME -c 'SELECT COUNT(*) FROM users;'"
View container logs
bash
ssh -i $SSH_KEY $SSH_USER@<IP> \
  "docker logs app_api --tail 50 -f"
Run a script in the api container
bash
ssh -i $SSH_KEY $SSH_USER@<IP> "
  cd $PROJECT_DIR
  docker compose -f $COMPOSE_FILE run --rm --no-deps api \
    sh -c 'pnpm run scripts/my-script.ts'
"

Debugging Common Issues

IssueLikely CauseFix
docker exec app_db psql failspostgres not running or wrong container nameCheck docker ps to see running containers, update app_db name
DROP DATABASE hangsconnections still openRun terminate step first before DROP
SSH auth failsWrong key or usernameVerify with aws ec2 describe-instances
Old code running after deployImage not rebuiltRun docker compose build explicitly
Port 3001 already in use (local)Another app using portkill $(lsof -t -iTCP:3001 -sTCP:LISTEN)

Instance Management (AWS CLI)

bash
# List instances
aws ec2 describe-instances --filters "Name=instance-state-name,Values=running"

# Start/stop
aws ec2 stop-instances --instance-ids $INSTANCE_ID
aws ec2 start-instances --instance-ids $INSTANCE_ID

# Check instance type
aws ec2 describe-instances \
  --instance-ids $INSTANCE_ID \
  --query "Reservations[0].Instances[0].InstanceType" \
  --output text

# Check CPU/memory metrics
aws cloudwatch get-metric-statistics \
  --namespace AWS/EC2 \
  --metric-name CPUUtilization \
  --dimensions Name=InstanceId,Value=$INSTANCE_ID \
  --start-time $(date -u -v-1H +%Y-%m-%dT%H:%M:%SZ) \
  --end-time $(date -u +%Y-%m-%dT%H:%M:%SZ) \
  --period 300 \
  --statistics Average \
  --output table

© adam-s, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/ec2-deploy of adam-s/intercept.

Open the folder on GitHubat commit 6451b89

Compare with similar skills

Ec2 Deploy next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ec2 Deploy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ec2 Deploy this skilladam-s/intercept189—~1.9kAutomated safety check: WarnMIT
Senior DevOps Toolkitmaslennikov-ig/claude-code-orchestrator-kit2606 repos~1.1kAutomated safety check: NotesCustom licence
Aspire DeploymentCommunityToolkit/Aspire629—~4.5kAutomated safety check: NotesMIT
Deployserithemage/serverless-openclaw196—~898Automated safety check: NotesNone
AWS Ecs Fargatesickn33/agentic-awesome-skills47k2 repos~3kAutomated safety check: PassMIT
Devops Deploysickn33/agentic-awesome-skills47k2 repos~1.9kAutomated safety check: PassMIT

Similar skills

  • Senior DevOps Toolkit

    maslennikov-ig/claude-code-orchestrator-kit

    Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup…

    260 GitHub starsUsed in 6 repos~1.1k tokens
    DevOps & CloudAuto-check: notes
  • Aspire Deployment

    CommunityToolkit/Aspire

    WORKFLOW SKILL — Deploy Aspire apps from AppHost models to Docker Compose, Kubernetes, Azure, AWS, or preview Radius.

    629 GitHub stars~4.5k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Deploy

    serithemage/serverless-openclaw

    Deploys Serverless OpenClaw CDK stacks to AWS. An agent skill from serithemage/serverless-openclaw.

    196 GitHub stars~898 tokensUpdated 6 mo ago
    DevOps & CloudAuto-check: notes
  • AWS Ecs Fargate

    sickn33/agentic-awesome-skills

    Deploy containers on ECS and Fargate. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~3k tokens
    DevOps & CloudAuto-check passed
  • Devops Deploy

    sickn33/agentic-awesome-skills

    DevOps e deploy de aplicacoes — Docker, CI/CD com GitHub Actions, AWS Lambda, SAM, Terraform, infraestrutura como codigo e monitoramento.

    47k GitHub starsUsed in 2 repos~1.9k tokens
    DevOps & CloudAuto-check passed
  • Evernote Deploy Integration

    jeremylongshore/tons-of-skills-marketplace

    Deploy Evernote integrations to production environments. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~1.1k tokensUpdated today
    DevOps & CloudAuto-check passed

More from adam-s/intercept

All 10 skills in this repo
  • API Discovery

    adam-s/intercept

    Discover any website's API and create domain plugins with proxy routes.

    189 GitHub stars~621 tokensUpdated 2 mo ago
    Auto-check passed
  • App

    adam-s/intercept

    Build a complete application from a short description. An agent skill from adam-s/intercept.

    189 GitHub stars~2.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Debug Logs

    adam-s/intercept

    Iterative debugging with targeted logs. An agent skill from adam-s/intercept.

    189 GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Use sub-agents to iteratively improve dashboard-building instructions.

    189 GitHub stars~4.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Instruction Tuning

    adam-s/intercept

    Use sub-agents as test subjects to iteratively improve .claude/ instruction files.

    189 GitHub stars~4.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Systematic Testing

    adam-s/intercept

    Bottom-up systematic validation for multi-layer architectures.

    189 GitHub stars~1.4k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Ec2 Deploy

What does Ec2 Deploy do?

Deploy to EC2 production server. An agent skill from adam-s/intercept. Ec2 Deploy is an agent skill from adam-s/intercept. Deploy to EC2 production server.

When should I use Ec2 Deploy?

Ec2 Deploy fits situations like: deploying new code; rebuilding Docker images; wiping and reseeding the database; checking container health.

How do I install Ec2 Deploy in Claude Code?

Run `npx skills add adam-s/intercept --skill ec2-deploy -a claude-code`. Or copy the skill folder (.claude/skills/ec2-deploy in adam-s/intercept) into .claude/skills/ec2-deploy in your project. Claude Code loads it when a task matches its description.

How do I install Ec2 Deploy in Codex?

Run `npx skills add adam-s/intercept --skill ec2-deploy -a codex`. Or copy the skill folder (.claude/skills/ec2-deploy in adam-s/intercept) into .agents/skills/ec2-deploy in your project. Codex loads it when a task matches its description.

Can I use Ec2 Deploy in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add adam-s/intercept --skill ec2-deploy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ec2-deploy, .gemini/skills/ec2-deploy, .github/skills/ec2-deploy and .opencode/skills/ec2-deploy in your project.

What does Ec2 Deploy need to run?

Going by SKILL.md and its folder, Ec2 Deploy needs the command-line tools its instructions call (docker, ssh, aws, git, sh and pnpm) and credentials named SSH_KEY. Our summary lists: Docker; A credential in SSH_KEY.

Does Ec2 Deploy access the network?

SKILL.md contains no URLs. Its commands use docker, ssh, git and curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Ec2 Deploy safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Ec2 Deploy use?

Ec2 Deploy is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ec2 Deploy use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ec2 Deploy?

Skills that share tags, products or a category with Ec2 Deploy: Senior DevOps Toolkit (maslennikov-ig/claude-code-orchestrator-kit, 260 stars), Aspire Deployment (CommunityToolkit/Aspire, 629 stars), Deploy (serithemage/serverless-openclaw, 196 stars) and AWS Ecs Fargate (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ec2 Deploy?

adam-s (a GitHub user) maintains it in adam-s/intercept, which has 189 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on July 31, 2026.

Source: adam-s/intercept on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.