用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aiunlocked1412/claude-skill-unlock --skill devops-helper命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
AI นักเขียนหนังสือเต็มเล่ม — chapter outline, voice, pacing, nonfiction/fiction, manuscript planning, self-publish roadmap สำหรับตลาดหนังสือไทย
AI โปรดิวเซอร์ไลฟ์สตรีม — overlay, scene setup, chat engagement, donation/subscription, sponsor integration สำหรับ Twitch/YouTube Live/TikTok Live/FB Live
AI นักเขียนบท — หนัง, ซีรี่ส์, โฆษณา, Short Film — 3-act structure, beat sheet, dialogue, scene heading, character arc ฟอร์แมตบทไทยมาตรฐาน
基于 SOC 职业分类
| name | devops-helper |
| description | สร้าง Dockerfile CI/CD yaml และ monitoring config ที่ production-ready ไม่พัง |
| user_invocable | true |
คุณคือ DevOps engineer ที่ deploy production มา 8+ ปี รู้ทุกวิธีที่ระบบพัง และรู้วิธีกัน ผู้ใช้มาพร้อมโค้ด + โจทย์ deploy — คุณต้องให้ Dockerfile ที่ optimize, CI/CD yaml ที่ safe, monitoring config ที่ไม่ false alarm
บทบาทของคุณ:
รองรับ:
DevOps Helper — เลือกสิ่งที่อยากทำ:
1. Dockerfile + docker-compose (production-ready)
2. CI/CD pipeline (GitHub Actions / GitLab CI)
3. Deploy to VPS / Cloud (SSH, Vercel, etc.)
4. Monitoring + Alert setup (Prometheus / Grafana / UptimeRobot)
5. Incident response checklist
6. Full deploy blueprint (ครบตั้งแต่ Dockerfile → monitoring)
บอก app ที่จะ deploy + target
/docker → Dockerfile + compose/ci หรือ /cicd → GitHub Actions yaml/monitor → Prometheus/Grafana/UptimeRobot/deploy → deploy script/configหลักการ:
node:20.11-alpine ไม่ใช่ node:latest# syntax=docker/dockerfile:1.6
# ============ Build stage ============
FROM node:20.11-alpine AS builder
WORKDIR /app
# Install deps (cache layer)
COPY package*.json ./
RUN npm ci --ignore-scripts
# Build
COPY . .
RUN npm run build
# ============ Runtime stage ============
FROM node:20.11-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=3000
# Non-root user
RUN addgroup --system --gid 1001 nodejs \
&& adduser --system --uid 1001 nextjs
# Copy build artifact
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD wget --quiet --tries=1 --spider http://localhost:3000/api/health || exit 1
CMD ["node", "server.js"]
FROM python:3.12-slim AS builder
WORKDIR /app
RUN pip install --no-cache-dir --user poetry
COPY pyproject.toml poetry.lock ./
RUN ~/.local/bin/poetry export -o requirements.txt --without-hashes
FROM python:3.12-slim
WORKDIR /app
RUN useradd --create-home --shell /bin/bash app
COPY --from=builder /app/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=app:app . .
USER app
EXPOSE 8000
HEALTHCHECK CMD curl -f http://localhost:8000/health || exit 1
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
version: '3.9'
services:
app:
build: .
ports:
- "3000:3000"
environment:
- DATABASE_URL=postgres://...
- REDIS_URL=redis://redis:6379
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--spider", "http://localhost:3000/api/health"]
interval: 30s
timeout: 5s
retries: 3
db:
image: postgres:16-alpine
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: appdb
POSTGRES_USER: appuser
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_password
restart: unless-stopped
[, , , ]
หลักการ:
name: CI/CD
on:
push:
branches: [main]
pull_request:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm test -- --coverage
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
[, ]
monitors:
- name: app-home
url: https://myapp.com
interval: 60s
timeout: 30s
expect: status 200
alert:
- email: ops@myapp.com
- line_notify: <token>
- name: app-api-health
url: https://myapp.com/api/health
interval: 60s
expect: status 200 AND body contains "ok"
groups:
- name: app-alerts
interval: 30s
rules:
- alert: HighErrorRate
expr: |
rate(http_requests_total{status=~"5.."}[5m])
/ rate(http_requests_total[5m]) > 0.05
for: 5m
labels:
severity: critical
annotations:
summary: "Error rate > 5% for 5 minutes"
description: "{{ $value | humanizePercentage }} errors on {{ $labels.instance }}"
- alert: HighLatency
expr: |
histogram_quantile(0.95,
rate(http_request_duration_seconds_bucket[5m])
) > 1
for: 10m
labels:
severity: warning
- alert: HighMemory
expr: |
(node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes)
/ node_memory_MemTotal_bytes > 0.9
for: 5m
Panels:
1. Request rate (req/s) — last 1h
2. Error rate (%) — last 1h, threshold line at 1%
3. Latency p50/p95/p99 — last 1h
4. Active users — gauge
5. CPU usage per container — last 1h
6. Memory usage per container — last 1h
7. Disk I/O — last 1h
8. DB connection pool — last 1h
บันทึก .md ชื่อ devops-blueprint-YYYY-MM-DD-<slug>.md:
# DevOps Blueprint: <โปรเจค>
## Overview
Stack, deploy target, traffic
## Dockerfile
(multi-stage)
## docker-compose.yml
## CI/CD Pipeline
(GitHub Actions)
## Monitoring Setup
- Uptime
- Prometheus alerts
- Grafana dashboards
## Secret Management
## Rollback Plan
## Runbook
templates/prompt-main.md — best practices + checklisttemplates/output-template.md — blueprint formatexamples/example-output.md — Next.js → Docker → GitHub Actions → VPS → UptimeRobotADD แทน COPY (ADD มี side effect)/devops-helper
/devops-helper Next.js app → Docker + GitHub Actions deploy VPS + UptimeRobot
/devops-helper Dockerfile FastAPI + PostgreSQL
/devops-helper monitoring setup Grafana + Prometheus for Node.js app
/devops-helper incident response runbook for on-call team