amitkarpe/agent-skills/ecs-recovery

Claude Code and agent skill by amitkarpe/agent-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Controlled ECS node recovery workflow for Docker and ECS restart, NAT verification, and optional drain operations on EC2-backed ECS clusters. Use when tasks are stuck, Docker NAT is suspect, or awslogs failures require node-by-node recovery with durable evidence.

Install

npx vskill@latest install amitkarpe/agent-skills/ecs-recovery

SKILL.md

The same SKILL.md was published earlier as amitkarpe/agent-skills/ecs-recovery.

ECS Recovery

Use this skill for controlled recovery on EC2-backed ECS clusters.

Use when

  • ECS tasks are stuck in PENDING or ACTIVATING
  • Docker NAT or port-publish behavior is suspect
  • Docker awslogs is failing on specific nodes
  • Docker and ECS must be restarted on one node at a time
  • you need durable evidence for before/after recovery state

Do not use when

  • the cluster is already stable and you only need read-only monitoring
  • the environment is Fargate-only
  • you need broad parallel restart across many nodes

Use ecs-monitoring first for read-only watch and flap detection.

Recovery rules

  • work on one node at a time
  • prefer DRAINING before restart when permissions allow it
  • if you do not have ecs:UpdateContainerInstancesState, do not fake drain behavior
  • verify Docker NAT after restart
  • stop if service counts worsen and do not recover promptly
  • write evidence to a durable temp path outside chat context

Main scripts

Restart Docker and ECS on one node
bash
bash scripts/restart-docker-ecs-one.sh \
<instance_id> <profile> <region> [output_dir]

This script:

  • captures before state
  • restarts docker
  • waits briefly
  • restarts ecs
  • captures after state
  • verifies:
  • docker=active
  • ecs=active
  • Docker NAT chain exists

If output_dir is not provided, it writes to:

bash
~/.AGENTS-temp/agent-skills/ecs-recovery/restart-<timestamp>-<instance_id>
Resolve ECS container instance ARN from EC2 ID
bash
bash scripts/resolve-container-instance.sh \
<cluster> <profile> <region> <ec2_instance_id>
Attempt to set a node to DRAINING
bash
bash scripts/drain-container-instance.sh \
<cluster> <profile> <region> <ec2_instance_id> [output_dir]

This script is useful only when the caller has:

  • ecs:UpdateContainerInstancesState

If the permission is missing, treat that as a real blocker and stop.

Recommended workflow

  1. Use ecs-monitoring first to confirm which services and nodes are unstable.
  2. Prefer drain over restart if permissions allow it.
  3. If drain is blocked, restart only one node at a time.
  4. After each restart, verify:
  • docker active
  • ecs active
  • Docker NAT chain present
  • service counts stable or recovering
  1. Stop immediately if:
  • a critical service stays degraded
  • NAT chain does not return
  • Docker or ECS does not come back

Evidence

Keep evidence outside the repo in:

bash
~/.AGENTS-temp/agent-skills/ecs-recovery/

Related skills

  • use ecs-monitoring before this skill for read-only diagnosis
  • later pair with awslogs-investigation when the issue is logging-specific

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/amitkarpe/agent-skills/ecs-recovery/badge)](https://verified-skill.com/skills/amitkarpe/agent-skills/ecs-recovery)

Something wrong with this skill or its page? Tell us.