safe-deploy

safe-deploy is a skill for Claude Code from Abilityai/abilities. It costs 58 tokens per session (2,271 once invoked), scanned C, original, MIT.

A deployment workflow for Docker Compose services that can be reached over SSH, a secure way to run commands on another computer.

In plain words
What is it for?
It helps back up, pull, rebuild, restart, validate, roll back, restore a database, and diagnose deployment health.
Why use it?
It reduces the risk of losing data or leaving a service unhealthy during updates and rollbacks.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; positional $N argument.

Part of the utilities plugin — 7 skills shipped together

Good fit It helps back up, pull, rebuild, restart, validate, roll back, restore a database, and diagnose deployment health.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abilityai/abilities/safe-deploy
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.

Any agent
npx skills add Abilityai/abilities --skill safe-deploy
Clone the repo
git clone --depth 1 https://github.com/Abilityai/abilities

Made for: Claude Code.

Or install utilities, the plugin that ships this one along with the rest of its 7 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for safe-deploy

README.md
[![agentmods](https://agentmods.dev/badge/skills/abilityai/abilities/safe-deploy/github.svg)](https://agentmods.dev/skills/abilityai/abilities/safe-deploy)
Your own site
<a href="https://agentmods.dev/skills/abilityai/abilities/safe-deploy"><img src="https://agentmods.dev/badge/skills/abilityai/abilities/safe-deploy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for safe-deploy

Your own site · 80×15
<a href="https://agentmods.dev/skills/abilityai/abilities/safe-deploy"><img src="https://agentmods.dev/badge/skills/abilityai/abilities/safe-deploy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,271 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00058 $0.02271
Opus 5.5 $0.00023 $0.00908
Sonnet 5.5 $0.00012 $0.00454
Haiku 4.5 $0.00006 $0.00227

Measured 2mo ago against content hash 6d630f8ef017, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

safe-deploy scanned grade C with 2 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 2mo 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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

SSH_KEY=<path to key, default: ~/.ssh/id_rsa>

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

STATUS=$($RUN "curl -s -o /dev/null -w '%{http_code}' http://localhost:$BACKEND_PORT/health 2>/dev/null || echo 'unreachable'")
plugins/utilities/skills/safe-deploy/SKILL.md · 321 lines

How it starts

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

Safe Deploy

ℹ️ First, set expectations: before anything else, print one short line with this skill's version and its most recent change — the top entry of metadata.changelog above — e.g. safe-deploy vX.Y — recent: <summary>. Then proceed.

Safe deployment operations for docker-compose-based services over SSH. Three subcommands covering the full deploy lifecycle.


Prerequisites

Configure via environment variables or a local .env file:

SSH_HOST=<ip or hostname>
SSH_USER=<username, default: ubuntu>
SSH_KEY=<path to key, default: ~/.ssh/id_rsa>
APP_PATH=<remote app directory, default: ~/app>
COMPOSE_FILE=<compose file, default: docker-compose.yml>
BACKUP_DIR=<backup directory on remote, default: ~/backups>
DB_PATH=<path to database file, default: ~/app/app.db>

Connection setup (used in all subcommands):

source .env 2>/dev/null || true
SSH_HOST=${SSH_HOST:-""}
SSH_USER=${SSH_USER:-"ubuntu"}
SSH_KEY=${SSH_KEY:-"~/.ssh/id_rsa"}
APP_PATH=${APP_PATH:-"~/app"}
COMPOSE=${COMPOSE_FILE:-"docker-compose.yml"}
BACKUP_DIR=${BACKUP_DIR:-"~/backups"}
DB_PATH=${DB_PATH:-"$APP_PATH/app.db"}
RUN="ssh -i $SSH_KEY $SSH_USER@$SSH_HOST"

If SSH_HOST is empty, check for a scripts/run.sh wrapper.


Subcommand: update

Full deployment: backup → pull → rebuild → restart → validate.

Step U1: Pre-deploy Check

Check for running long-lived processes before proceeding:

$RUN "cd $APP_PATH && docker compose -f $COMPOSE ps --format json 2>/dev/null | grep -c running || docker compose -f $COMPOSE ps | grep -c Up"

Warn the user if active processes are running. Ask: "Proceed with deployment? Active processes may be interrupted."

Check disk space before proceeding:

$RUN "df -h $APP_PATH | tail -1 | awk '{print \$5}'"

If disk usage >85%, warn the user.

Step U2: Backup Database

Create a timestamped backup before any changes:

BACKUP_TS=$(date +%Y-%m-%d-%H%M%S)
$RUN "mkdir -p $BACKUP_DIR && cp $DB_PATH $BACKUP_DIR/app-${BACKUP_TS}.db 2>/dev/null && echo 'backup: ok' || echo 'backup: skipped (no DB found)'"

Read the full file on GitHub · 321 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. 2mo ago First seen · 321 lines · 58 tokens per session scan C 6d630f8ef017

Subscribe to this mod's changes

safe-deploy is a skill published in the GitHub repository Abilityai/abilities (13 stars, last pushed yesterday), licensed MIT. It adds 58 tokens to every session and 2,271 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (reaches for credential files, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.

Related

safe-deploy compared with skills from other repositories

safe-deploy next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
safe-deployAbilityai/abilitiesSkill13yesterdayMITC58Claude Code
deploy-docker-composeomnigent-ai/omnigentSkill12ktodayApache-2.0A84Claude Code, Codex
bdd-container-updateNVIDIA-AI-Blueprints/video-search-and-summarizationSkill2.0ktodayApache-2.0A117Cursor
securing-kubernetes-on-cloudxalgorix/xalgorixSkill1.6ktodayApache-2.0A80Claude Code, Codex
detecting-privilege-escalation-in-kubernetes-podsxalgorix/xalgorixSkill1.6ktodayApache-2.0A40Claude Code, Codex
docker-socket-mountPurpleAILAB/DecepticonSkill6.9k13d agoApache-2.0B67Claude Code
managing-astro-local-envastronomer/agentsSkill465todayApache-2.0A63Claude Code