agentleFS
thanvish21thanvish21/hcc-bundle/deployment-patterns/SKILL.md

deployment-patterns

Skill0 starsChanged 4 months agoMITView on GitHub

Hermes-native deployment patterns — systemd services, Docker Compose, Kubernetes, serverless, and CI/CD pipelines using Hermes tooling.

  • Reads credentials
  • Installs packages

33 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ralphinho-rfc-pipeline, nuxt4-patterns 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.
  • junimnjwSkill

    ralphinho-rfc-pipeline

    RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.

    Also in 12 projects that use this

  • loulanyueSkill

    nuxt4-patterns

    Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.

    Also in 10 projects that use this

  • RojiosSkill

    dart-flutter-patterns

    Production-ready Dart and Flutter patterns covering null safety, immutable state, async composition, widget architecture, popular state management frameworks (BLoC, Riverpod, Provider), GoRouter navigation, Dio networking, Freezed code generation, and clean architecture.

    Also in 7 projects that use this

  • TironFoxSkill

    agent-payment-x402

    Add x402 payment execution to AI agents — per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents need to pay for APIs, services, or other agents.

    Also in 6 projects that use this

  • TironFoxSkill

    openclaw-persona-forge

    为 OpenClaw AI Agent 锻造完整的龙虾灵魂方案。根据用户偏好或随机抽卡, 输出身份定位、灵魂描述(SOUL.md)、角色化底线规则、名字和头像生图提示词。 如当前环境提供已审核的生图 skill,可自动生成统一风格头像图片。 当用户需要创建、设计或定制 OpenClaw 龙虾灵魂时使用。 不适用于:微调已有 SOUL.md、非 OpenClaw 平台的角色设计、纯工具型无性格 Agent。 触发词:龙虾灵魂、虾魂、OpenClaw 灵魂、养虾灵魂、龙虾角色、龙虾定位、 龙虾剧本杀角色、龙虾游戏角色、龙虾 NPC、龙虾性格、龙虾背景故事、 lobster soul、lobster character、抽卡、随机龙虾、龙虾 SOUL、gacha。

    Also in 5 projects that use this

  • ronmkrSkill

    vite-patterns

    Vite build tool patterns including config, plugins, HMR, env variables, proxy setup, SSR, library mode, dependency pre-bundling, and build optimization. Activate when working with vite.config.ts, Vite plugins, or Vite-based projects.

    Also in 7 projects that use this

The file

Files
SKILL.md

Deployment Patterns for Hermes

Production deployment patterns using Hermes Agent tooling and automation.

Prerequisites

  • Hermes with terminal, file, code_execution toolsets
  • Target environment access (SSH, kubectl, docker, cloud CLIs)

Core Patterns

1. Systemd Service Deployment

# /etc/systemd/system/hermes-app.service
[Unit]
Description=Hermes Application
After=network.target

[Service]
Type=simple
User=hermes
WorkingDirectory=/opt/hermes-app
Environment=HERMES_HOME=/opt/hermes-app/.hermes
ExecStart=/usr/local/bin/hermes gateway run
Restart=on-failure
RestartSec=10
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target
# Deploy via Hermes
terminal(command="sudo cp hermes-app.service /etc/systemd/system/")
terminal(command="sudo systemctl daemon-reload")
terminal(command="sudo systemctl enable --now hermes-app")
terminal(command="sudo systemctl status hermes-app")

2. Docker Compose Stack

# docker-compose.yml
version: '3.8'
services:
  hermes-gateway:
    image: nousresearch/hermes-agent:latest
    ports:
      - "8080:8080"
    volumes:
      - ./config:/root/.hermes
      - ./data:/data
    environment:
      - HERMES_HOME=/root/.hermes
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
      interval: 30s
      timeout: 10s
      retries: 3

  redis:
    image: redis:7-alpine
    volumes:
      - redis-data:/data

volumes:
  redis-data:
# Deploy
terminal(command="docker compose up -d --build")
terminal(command="docker compose logs -f hermes-gateway")

3. Kubernetes Deployment

# k8s/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: hermes-gateway
spec:
  replicas: 3
  selector:
    matchLabels:
      app: hermes-gateway
  template:
    metadata:
      labels:
        app: hermes-gateway
    spec:
      containers:
      - name: hermes
        image: nousresearch/hermes-agent:latest
        ports:
        - containerPort: 8080
        env:
        - name: HERMES_HOME
          value: /data/.hermes
        volumeMounts:
        - name: config
          mountPath: /data/.hermes
        resources:
          requests:
            memory: "512Mi"
            cpu: "250m"
          limits:
            memory: "1Gi"
            cpu: "1000m"
      volumes:
      - name: config
        persistentVolumeClaim:
          claimName: hermes-config
---
apiVersion: v1
kind: Service
metadata:
  name: hermes-gateway
spec:
  selector:
    app: hermes-gateway
  ports:
  - port: 80
    targetPort: 8080
  type: LoadBalancer
# Deploy
terminal(command="kubectl apply -f k8s/")
terminal(command="kubectl rollout status deployment/hermes-gateway")

4. CI/CD Pipeline (GitHub Actions)

# .github/workflows/deploy.yml
name: Deploy Hermes App

on:
  push:
    branches: [main]
  workflow_dispatch:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run tests
        run: |
          pip install -r requirements.txt
          pytest --tb=short

  deploy:
    needs: test
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/main'
    steps:
      - uses: actions/checkout@v4
      - name: Deploy to server
        run: |
          ssh user@server "cd /opt/hermes-app && git pull && docker compose up -d --build"
        env:
          SSH_KEY: ${{ secrets.SSH_KEY }}

5. Blue-Green Deployment

#!/bin/bash
# blue-green-deploy.sh

CURRENT=$(docker compose ps --format json | jq -r '.[] | select(.Service=="app-blue") | .State')
TARGET="app-green"

if [[ "$CURRENT" == "running" ]]; then
  TARGET="app-blue"
fi

docker compose up -d --build $TARGET
docker compose exec $TARGET health-check || exit 1
docker compose stop $([ "$TARGET" = "app-blue" ] && echo "app-green" || echo "app-blue")

Hermes Automation

Cron Jobs for Deployment Health

# Health check every 5 minutes
hermes cron create "every 5m" "Check deployment health and alert on failure"

# Daily backup
hermes cron create "0 3 * * *" "Backup Hermes config and session data"

# Weekly security update
hermes cron create "0 4 * * 0" "Update base images and redeploy"

Rollback Procedures

# Quick rollback via Hermes
hermes sessions list --all
hermes --resume <session-id>  # Resume pre-deployment session

# Docker rollback
terminal(command="docker compose down && docker compose up -d --force-recreate")

# K8s rollback
terminal(command="kubectl rollout undo deployment/hermes-gateway")

Environment Management

Config per Environment

config/
├── base.yaml           # Shared config
├── development.yaml    # Dev overrides
├── staging.yaml        # Staging overrides
└── production.yaml     # Prod overrides (secrets in .env)
# Deploy to environment
HERMES_ENV=production hermes deploy

Monitoring & Observability

# docker-compose.monitoring.yml
services:
  prometheus:
    image: prom/prometheus
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
    ports:
      - "9090:9090"

  grafana:
    image: grafana/grafana
    ports:
      - "3000:3000"
    volumes:
      - grafana-data:/var/lib/grafana

Skill Composition

  • docker-patterns — Container best practices
  • git-workflow — GitOps deployment flows
  • security-review — Secure deployment practices
  • cost-aware-llm-pipeline — Optimize LLM costs in prod

Adapted from ECC deployment-patterns for Hermes Agent. Original: affaan-m/ECC

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.