agentleFS
bocodes1bocodes1/claude-skills/deploy-pipeline/SKILL.md

deploy-pipeline

Skill0 starsChanged 7 months agoMITView on GitHub

Use when deploying bot code to VPS, updating production, or pushing changes - safe deployment workflow that prevents SSH sed disasters

  • Reads credentials

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use agent-deep-links, helium-mcp and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ComposioHQSkill

    agent-deep-links

    Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

    Also in 3 projects that use this

  • ComposioHQSkill

    helium-mcp

    Search real-time news with bias scoring, get live stock/ETF/crypto data with AI analysis, ML options pricing, balanced news synthesis, and meme search via the Helium MCP server.

    Also in 3 projects that use this

  • petestewartSkill

    datadog-logs

    Query Datadog logs via the Logs Search API v2. Use when the user asks to "check the logs", "search logs", "find errors in Datadog", "look up logs for", "show me production logs", "check for errors", "search Datadog", or any request involving log search, error investigation, or production debugging that requires Datadog log data.

    Also in 3 projects that use this

  • OpenAISkill

    notion-meeting-intelligence

    Prepare meeting materials with Notion context and Codex research; use when gathering context, drafting agendas/pre-reads, and tailoring materials to attendees.

    Also in 3 projects that use this

  • +8 more from ComposioHQ

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No tracebacks in last 5 log lines

    line 46
  2. Very specific:

    Update today's daily note in ~/obsidian-vault/memory/YYYY-MM-DD.md with:

    line 77

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Deploy Pipeline

Safe deployment workflow for VPS bot code. Never edit production code via SSH sed/echo.

The Rule

Edit locally -> validate -> SCP -> backup -> restart -> verify -> (rollback if needed)

Workflow

1. Edit Locally

Make all changes in your local workspace. Use your editor, not SSH.

2. Validate Locally

python3 -m py_compile bot.py          # syntax check
python3 -c "import ast; ast.parse(open('bot.py').read())"  # parse check
grep -n "f'" bot.py | head -20        # spot-check f-strings

3. Backup Current VPS Version

# Read SSH details from TOOLS.md first
ssh $VPS_HOST "cp -r $BOT_DIR ${BOT_DIR}.bak.$(date +%Y%m%d-%H%M)"

4. Deploy via SCP

scp bot.py $VPS_HOST:$BOT_DIR/bot.py
# For multiple files:
scp -r ./bot-src/ $VPS_HOST:$BOT_DIR/

5. Restart & Verify

ssh $VPS_HOST "cd $BOT_DIR && pkill -f bot.py; sleep 2; nohup python3 bot.py > bot.log 2>&1 &"
sleep 3
ssh $VPS_HOST "pgrep -f bot.py && tail -5 $BOT_DIR/bot.log"

Check for:

  • PID exists (exactly 1 process)
  • No tracebacks in last 5 log lines
  • Bot is making API calls (check log for recent activity)

6. Rollback (if something's wrong)

ssh $VPS_HOST "pkill -f bot.py; cp -r ${BOT_DIR}.bak.XXXXXX/* $BOT_DIR/"
ssh $VPS_HOST "cd $BOT_DIR && nohup python3 bot.py > bot.log 2>&1 &"

Pre-Deploy Checklist

  • Code edited locally (NOT via SSH)
  • Syntax check passes
  • Backup taken on VPS
  • SCP transfer complete
  • Bot restarted
  • Exactly 1 PID confirmed (pgrep -c -f bot.py = 1)
  • Logs clean (no tracebacks)
  • Bot actively trading (check within 5 min)

Common Gotchas

ProblemWhy It HappensFix
F-strings break over SSHNested quotes in ssh "echo 'f\"...\"'"Edit locally, SCP the file
Quote escaping hellSSH wraps commands in shellWrite temp script, SCP it, execute
sed nukes productionsed -i on wrong line, no undoNever use sed on production
Bot not startingSyntax error, missing import, bad envpython3 -m py_compile, check imports, check .env
SSH timeoutsSecurity Group, key path wrongCheck SG port 22, use -o ConnectTimeout=10
Zombie processesMultiple restarts without killingAlways pkill before starting, verify count = 1

After Deploy

Update today's daily note in ~/obsidian-vault/memory/YYYY-MM-DD.md with:

  • What was deployed
  • Result (pass/fail)
  • Any issues encountered
  • Next steps

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.