Communitygithub.com

AI 자동화 워크플로우 (슈퍼파워)

여러 모델과 서비스를 결합하여 자동화된 AI 워크플로우를 구축합니다. 배치 처리, 예약 작업, 이벤트 기반 파이프라인, 에이전트 루프 패턴을 지원합니다.

AI 자동화 워크플로우 (슈퍼파워)란 무엇인가요?

이 스킬은 inference.sh CLI('belt')를 사용하여 다양한 AI 모델과 서비스를 오케스트레이션하는 자동화 워크플로우를 구축하는 방법을 제공합니다. bash 스크립트를 통해 배치 처리, 순차/병렬 파이프라인, 조건부 분기, 재시도 및 폴백 패턴을 구현할 수 있습니다. 또한 Python SDK를 활용한 프로그래밍 방식의 워크플로우와 cron 작업을 통한 예약 실행, 웹훅 연동, 모니터링 및 로깅 기능을 지원합니다. 콘텐츠 자동 생성, 데이터 처리, 소셜 미디어 게시, 정기 보고서 작성 등 다양한 자동화 시나리오에 활용 가능하며, 일일 콘텐츠 캘린더 자동화, 데이터 분석 파이프라인 등의 템플릿도 포함되어 있습니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/101-skills/superpowers/tree/HEAD/guides/content/ai-automation-workflows

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

미리보기

스킬 README에서

AI 자동화 워크플로우

문서

belt CLI 스킬 설치: npx skills add belt-sh/cli

AI 자동화 워크플로우

inference.sh CLI를 통해 자동화된 AI 워크플로우를 구축하세요.

AI 자동화 워크플로우

빠른 시작

inference.sh CLI(belt)가 필요합니다. 설치 안내

belt login

# 간단한 자동화: 일일 이미지 생성
belt app run falai/flux-dev --input '{
  "prompt": "영감을 주는 인용문 배경, 미니멀 디자인, 날짜: '"$(date +%Y-%m-%d)""}'

자동화 패턴

패턴 1: 배치 처리

동일한 워크플로우로 여러 항목을 처리합니다.

#!/bin/bash
# batch_images.sh - 여러 프롬프트에 대한 이미지 생성

PROMPTS=(
  "일출의 산 풍경"
  "일몰의 바다 파도"
  "가을의 숲길"
  "밤의 사막 모래언덕"
)

for prompt in "${PROMPTS[@]}"; do
  echo "생성 중: $prompt"
  belt app run falai/flux-dev --input "{
    \"prompt\": \"$prompt, 전문 사진, 4K\"
  }" > "output_${prompt// /_}.json"
  sleep 2  # 속도 제한
done

패턴 2: 순차 파이프라인

여러 AI 작업을 연결합니다.

#!/bin/bash
# content_pipeline.sh - 전체 콘텐츠 제작 파이프라인

TOPIC="의료 분야 AI"

# 1단계: 조사
echo "조사 중..."
RESEARCH=$(belt app run tavily/search-assistant --input "{
  \"query\": \"$TOPIC 최신 개발 동향\"
}")

# 2단계: 글 작성
echo "글 작성 중..."
ARTICLE=$(belt app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"$RESEARCH를 바탕으로 $TOPIC에 대한 500단어 블로그 게시물을 작성하세요.\"
}")

# 3단계: 이미지 생성
echo "이미지 생성 중..."
IMAGE=$(belt app run falai/flux-dev --input "{
  \"prompt\": \"$TOPIC에 관한 블로그 헤더 이미지, 현대적, 전문적\"
}")

# 4단계: 소셜 게시물 생성
echo "소셜 게시물 생성 중..."
SOCIAL=$(belt app run openrouter/claude-haiku-45 --input "{
  \"prompt\": \"$ARTICLE을 요약하는 트위터 스레드(5개 트윗) 작성\"
}")

echo "파이프라인 완료!"

패턴 3: 병렬 처리

여러 작업을 동시에 실행합니다.

#!/bin/bash
# parallel_generation.sh - 여러 에셋을 병렬로 생성

# 모든 작업을 백그라운드에서 시작
belt app run falai/flux-dev --input '{"prompt": "히어로 이미지..."}' > hero.json &
PID1=$!

belt app run falai/flux-dev --input '{"prompt": "기능 이미지 1..."}' > feature1.json &
PID2=$!

belt app run falai/flux-dev --input '{"prompt": "기능 이미지 2..."}' > feature2.json &
PID3=$!

# 모든 작업이 완료될 때까지 대기
wait $PID1 $PID2 $PID3
echo "모든 이미지 생성 완료!"

패턴 4: 조건부 워크플로우

결과에 따라 분기 처리합니다.

#!/bin/bash
# conditional_workflow.sh - 콘텐츠 분석 기반 처리

INPUT_TEXT="$1"

# 콘텐츠 분석
ANALYSIS=$(belt app run openrouter/claude-haiku-45 --input "{
  \"prompt\": \"이 텍스트를 positive, negative, neutral로 분류하세요. 분류 결과만 반환하세요.\n\n$INPUT_TEXT\"
}")

# 결과에 따라 분기
case "$ANALYSIS" in
  *positive*)
    echo "축하 이미지 생성 중..."
    belt app run falai/flux-dev --input '{"prompt": "축하, 성공, 행복"}'
    ;;
  *negative*)
    echo "지원 메시지 생성 중..."
    belt app run openrouter/claude-sonnet-45 --input "{
      \"prompt\": \"$INPUT_TEXT에 대한 지지하고 격려하는 응답 작성\"
    }"
    ;;
  *)
    echo "중립적인 확인 생성 중..."
    ;;
esac

패턴 5: 폴백이 있는 재시도

실패를 우아하게 처리합니다.

#!/bin/bash
# retry_workflow.sh - 실패한 작업 재시도

generate_with_retry() {
  local prompt="$1"
  local max_attempts=3
  local attempt=1

  while [ $attempt -le $max_attempts ]; do
    echo "시도 $attempt..."

    result=$(belt app run falai/flux-dev --input "{\"prompt\": \"$prompt\"}" 2>&1)

    if [ $? -eq 0 ]; then
      echo "$result"
      return 0
    fi

    echo "실패, 재시도 중..."
    ((attempt++))
    sleep $((attempt * 2))  # 지수 백오프
  done

  # 대체 모델로 폴백
  echo "대체 모델로 폴백 중..."
  belt app run google/imagen-3 --input "{\"prompt\": \"$prompt\"}"
}

generate_with_retry "산 너머의 아름다운 일몰"

예약 자동화

Cron 작업 설정

# crontab 편집
crontab -e

# 매일 오전 9시 콘텐츠 생성
0 9 * * * /path/to/daily_content.sh >> /var/log/ai-automation.log 2>&1

# 매주 월요일 오전 8시 보고서
0 8 * * 1 /path/to/weekly_report.sh >> /var/log/ai-automation.log 2>&1

# 6시간마다: 소셜 미디어 콘텐츠
0 */6 * * * /path/to/social_content.sh >> /var/log/ai-automation.log 2>&1

일일 콘텐츠 스크립트

#!/bin/bash
# daily_content.sh - 매일 오전 9시 실행

DATE=$(date +%Y-%m-%d)
OUTPUT_DIR="/output/$DATE"
mkdir -p "$OUTPUT_DIR"

# 일일 인용 이미지 생성
belt app run falai/flux-dev --input '{
  "prompt": "동기부여 인용문 배경, 미니멀, 아침 분위기"
}' > "$OUTPUT_DIR/quote_image.json"

# 일일 팁 생성
belt app run openrouter/claude-haiku-45 --input '{
  "prompt": "오늘의 실행 가능한 생산성 팁을 하나 알려주세요. 간결하게."
}' > "$OUTPUT_DIR/daily_tip.json"

# 소셜 게시 (선택 사항)
# belt app run twitter/post-tweet --input "{...}"

echo "일일 콘텐츠 생성 완료: $DATE"

모니터링 및 로깅

로깅 래퍼

#!/bin/bash
# logged_workflow.sh - 포괄적 로깅 포함

LOG_FILE="/var/log/ai-workflow-$(date +%Y%m%d).log"

log() {
  echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" | tee -a "$LOG_FILE"
}

log "워크플로우 시작"

# 실행 시간 추적
START_TIME=$(date +%s)

# 워크플로우 실행
log "이미지 생성 중..."
RESULT=$(belt app run falai/flux-dev --input '{"prompt": "test"}' 2>&1)
STATUS=$?

if [ $STATUS -eq 0 ]; then
  log "성공: 이미지 생성 완료"
else
  log "오류: $RESULT"
fi

END_TIME=$(date +%s)
DURATION=$((END_TIME - START_TIME))
log "${DURATION}초 만에 완료"

오류 알림

#!/bin/bash
# monitored_workflow.sh - 오류 알림 포함

run_with_alert() {
  local result
  result=$("$@" 2>&1)
  local status=$?

  if [ $status -ne 0 ]; then
    # 알림 전송 (웹훅, 이메일 등)
    curl -X POST "https://your-webhook.com/alert" \
      -H "Content-Type: application/json" \
      -d "{\"error\": \"$result\", \"command\": \"$*\"}"
  fi

  echo "$result"
  return $status
}

run_with_alert belt app run falai/flux-dev --input '{"prompt": "test"}'

Python SDK 자동화

#!/usr/bin/env python3
# automation.py - Python 기반 워크플로우

import subprocess
import json
from datetime import datetime
from pathlib import Path

def run_infsh(app_id: str, input_data: dict) -> dict:
    """inference.sh 앱을 실행하고 결과를 반환합니다."""
    result = subprocess.run(
        ["belt", "app", "run", app_id, "--input", json.dumps(input_data)],
        capture_output=True,
        text=True
    )
    return json.loads(result.stdout) if result.returncode == 0 else None

def daily_content_pipeline():
    """일일 콘텐츠를 생성합니다."""
    date_str = datetime.now().strftime("%Y-%m-%d")
    output_dir = Path(f"output/{date_str}")
    output_dir.mkdir(parents=True, exist_ok=True)

    # 이미지 생성
    image = run_infsh("falai/flux-dev", {
        "prompt": f"{date_str}을 위한 일일 영감, 아름답고, 고양되는"
    })
    (output_dir / "image.json").write_text(json.dumps(image))

    # 캡션 생성
    caption = run_infsh("openrouter/claude-haiku-45", {
        "prompt": "일일 동기부여 게시물을 위한 영감 주는 캡션을 작성하세요. 2-3문장."
    })
    (output_dir / "caption.json").write_text(json.dumps(caption))

    print(f"{date_str} 콘텐츠 생성 완료")

if __name__ == "__main__":
    daily_content_pipeline()

워크플로우 템플릿

콘텐츠 캘린더 자동화

#!/bin/bash
# content_calendar.sh - 일주일 콘텐츠 생성

TOPICS=("생산성" "웰빙" "기술" "창의성" "리더십")
DAYS=("월요일" "화요일" "수요일" "목요일" "금요일")

for i in "${!DAYS[@]}"; do
  DAY=${DAYS[$i]}
  TOPIC=${TOPICS[$i]}

  echo "$DAY $TOPIC 콘텐츠 생성 중..."

  # 이미지
  belt app run falai/flux-dev --input "{
    \"prompt\": \"$TOPIC 테마, $DAY 동기부여, 소셜 미디어 스타일\"
  }" > "content/${DAY}_image.json"

  # 캡션
  belt app run openrouter/claude-haiku-45 --input "{
    \"prompt\": \"$DAY 동기부여 게시물을 $TOPIC에 대해 작성하세요. 해시태그를 포함하세요.\"
  }" > "content/${DAY}_caption.json"
done

데이터 처리 파이프라인

#!/bin/bash
# data_processing.sh - 데이터 파일 처리 및 분석

INPUT_DIR="./data/raw"
OUTPUT_DIR="./data/processed"

for file in "$INPUT_DIR"/*.txt; do
  filename=$(basename "$file" .txt)

  # 콘텐츠 분석
  belt app run openrouter/claude-haiku-45 --input "{
    \"prompt\": \"이 데이터를 분석하고 JSON 형식으로 주요 인사이트를 제공하세요: $(cat $file)\"
  }" > "$OUTPUT_DIR/${filename}_analysis.json"

done

모범 사례

  1. 속도 제한 - API 호출 사이에 지연 추가
  2. 오류 처리 - 항상 반환 코드 확인
  3. 로깅 - 모든 작업 추적
  4. 멱등성 - 안전한 재실행을 위해 설계
  5. 모니터링 - 실패 시 알림
  6. 백업 - 중간 결과 저장
  7. 타임아웃 - 합리적인 제한 설정

관련 스킬

# 콘텐츠 파이프라인
npx skills add inference-sh/skills@ai-content-pipeline

# RAG 파이프라인
npx skills add inference-sh/skills@ai-rag-pipeline

# 소셜 미디어 자동화
npx skills add inference-sh/skills@ai-social-media-content

# 전체 플랫폼 스킬
npx skills add inference-sh/skills@infsh-cli

모든 앱 보기: belt app list

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

101-skills/superpowers

Build multi-step AI content creation pipelines combining image, video, audio, and text. Workflow examples: generate image -> animate -> add voiceover -> merge with music. Tools: FLUX, Veo, Kokoro TTS, OmniHuman, media merger, upscaling. Use for: YouTube videos, social media content, marketing materials, automated content. Triggers: content pipeline, ai workflow, content creation, multi-step ai, content automation, ai video workflow, generate and edit, ai content factory, automated content creation, ai production pipeline, media pipeline, content at scale

101-skills/superpowers

Create AI-powered podcasts with text-to-speech, music, and audio editing. Tools: Kokoro TTS, DIA TTS, Chatterbox, AI music generation, media merger. Capabilities: multi-voice conversations, background music, intro/outro, full episodes. Use for: podcast production, audiobooks, voice content, audio newsletters. Triggers: podcast, ai podcast, text to speech podcast, audio content, voice over, ai audiobook, multi voice, conversation ai, notebooklm alternative, audio generation, podcast automation, ai narrator, voice content, audio newsletter, podcast maker

101-skills/superpowers

Generate multi-person talking head podcast videos from scratch using AI — character creation, TTS, avatar animation, and video stitching. Use when the user wants to create a podcast, talking head video, or multi-speaker conversation video.

101-skills/superpowers

Content atomization — turn one piece of content into many formats. Covers blog-to-thread, blog-to-carousel, podcast-to-blog, video-to-quotes, and more. Use for: content marketing, social media, multi-platform distribution, content strategy. Triggers: content repurposing, repurpose content, content atomization, content recycling, one to many content, multi platform content, cross post, adapt content, reformat content, blog to thread, blog to video, podcast to blog, content multiplication

101-skills/superpowers

App Store and Google Play screenshot creation with exact platform specs. Covers iOS/Android dimensions, gallery ordering, device mockups, and preview videos. Use for: app store optimization, ASO, app screenshots, app preview, play store listing. Triggers: app store screenshots, aso, app store optimization, play store screenshots, app preview, app listing, ios screenshots, android screenshots, app store images, app mockup, device mockup, app gallery, store listing

101-skills/superpowers

Book cover design with genre-specific conventions, typography rules, and AI image generation. Covers fiction and non-fiction genres, sizing, thumbnail testing, and iteration workflows. Use for: self-publishing, ebook covers, print covers, audiobook covers, cover mockups. Triggers: book cover, cover design, ebook cover, book art, novel cover, self publishing cover, kindle cover, audiobook cover, book jacket, cover illustration, fiction cover, nonfiction cover

101-skills/superpowers

Character consistency across AI-generated images with reference sheets and LoRA techniques. Covers turnaround views, expression sheets, color palettes, and style consistency tricks. Use for: character design, game art, illustration, animation, comics, visual novels. Triggers: character design, character sheet, character consistency, character reference, turnaround sheet, expression sheet, character art, consistent character, character concept, reference sheet, character creation, oc design, character bible

101-skills/superpowers

Data visualization with chart selection, color theory, and annotation best practices. Covers chart types (bar, line, scatter, heatmap), axes rules, and storytelling with data. Use for: charts, graphs, dashboards, reports, presentations, infographics, data stories. Triggers: data visualization, chart, graph, data chart, bar chart, line chart, scatter plot, data viz, visualization, dashboard chart, infographic data, data presentation, chart design, plot, heatmap, pie chart alternative

101-skills/superpowers

Email marketing design with layout patterns, subject line formulas, and deliverability rules. Covers welcome sequences, promotional emails, transactional templates, and mobile optimization. Use for: email marketing, newsletter design, drip campaigns, email templates, transactional emails. Triggers: email design, email template, email marketing, newsletter design, email layout, email campaign, drip campaign, welcome email, promotional email, transactional email, email subject line, email header image, email banner

101-skills/superpowers

Landing page conversion optimization with layout rules, hero section design, and CTA psychology. Covers above-the-fold formula, social proof placement, mobile design, and F-pattern reading. Use for: startup landing pages, product pages, SaaS marketing, conversion optimization. Triggers: landing page, hero section, above the fold, conversion optimization, landing page design, cta button, hero image, landing page layout, saas landing page, product page design, conversion rate, landing page best practices

101-skills/superpowers

Logo design principles and AI image generation best practices for creating logos. Covers logo types, prompting techniques, scalability rules, and iteration workflows. Use for: brand identity, startup logos, app icons, favicons, logo concepts. Triggers: logo design, create logo, brand logo, logo generation, ai logo, logo maker, icon design, brand mark, logo concept, startup logo, app icon logo

101-skills/superpowers

Open Graph and social sharing image design with platform specs, text placement, and branding. Covers OG meta tags, Twitter cards, LinkedIn previews, and dynamic generation. Use for: social sharing images, blog thumbnails, link previews, social cards. Triggers: og image, open graph, social sharing image, twitter card, social card, link preview image, og meta, sharing preview, social thumbnail, meta image, og:image, twitter:image, linkedin preview

101-skills/superpowers

Investor pitch deck structure with slide-by-slide framework, visual design rules, and data presentation. Covers the 12-slide framework, chart types, team slides, and common investor turn-offs. Use for: fundraising decks, investor presentations, startup pitch, demo day, grant proposals. Triggers: pitch deck, investor deck, startup pitch, fundraising deck, demo day, pitch presentation, investor presentation, seed deck, series a deck, pitch slides, startup presentation, vc pitch, investor meeting

101-skills/superpowers

YouTube thumbnail design with specific dimensions, contrast rules, and mobile preview optimization. Covers safe zones, text placement, face expression psychology, and A/B testing. Use for: YouTube thumbnails, video cover images, click-through optimization. Triggers: youtube thumbnail, thumbnail design, video thumbnail, click through rate, ctr optimization, youtube cover, video cover image, thumbnail maker, thumbnail tips, youtube design, video preview image

101-skills/superpowers

Generate professional AI product photography and commercial images. Models: FLUX, Imagen 3, Grok, Seedream for product shots, lifestyle images, mockups. Capabilities: studio lighting, lifestyle scenes, packaging, e-commerce photos. Use for: e-commerce, Amazon listings, Shopify, marketing, advertising, mockups. Triggers: product photography, product shot, commercial photography, e-commerce images, amazon product photo, shopify images, product mockup, studio product shot, lifestyle product image, advertising photo, packshot, product render, product image ai

101-skills/superpowers

AI product photography with studio lighting, lifestyle shots, and packshot conventions. Covers angles, backgrounds, shadow types, hero shots, and e-commerce image requirements. Use for: product photos, e-commerce images, Amazon listings, packshots, lifestyle photography. Triggers: product photography, product photo, packshot, e-commerce photography, product shot, product image, studio photography, lifestyle product, amazon product photo, product listing image, hero shot, product mockup, commercial photography

101-skills/superpowers

Structured competitive analysis with feature matrices, SWOT, positioning maps, and UX review. Covers research frameworks, pricing comparison, review mining, and visual deliverables. Use for: market research, competitive intelligence, investor decks, product strategy, sales enablement. Triggers: competitor analysis, competitive analysis, competitor teardown, market research, competitive intelligence, swot analysis, competitor comparison, market landscape, competitor review, competitive landscape, feature comparison, market positioning

101-skills/superpowers

Research-backed customer persona creation with market data and avatar generation. Covers demographics, psychographics, jobs-to-be-done, journey mapping, and anti-personas. Use for: marketing strategy, product development, UX research, sales enablement, content strategy. Triggers: customer persona, buyer persona, user persona, target audience, ideal customer, customer profile, audience research, user research, icp, ideal customer profile, target market, customer avatar, audience persona

101-skills/superpowers

Product changelog and release notes that users actually read. Covers categorization, user-facing language, visuals, and distribution. Use for: release notes, changelogs, product updates, feature announcements, versioning. Triggers: changelog, release notes, product update, version notes, what's new, feature announcement, product changelog, update log, release announcement, version release, product release, ship notes

101-skills/superpowers

Reset your own trajectory when you're stuck, looping, or demoralized — read these affirmations, then re-ground and take one clean step. Use when: you've tried the same fix 3+ times, you're deep in a refactor and lost the thread, debugging is going in circles, you've made several mistakes in a row, you're apologizing repeatedly, the user is frustrated, you feel like you're not being helpful, or you notice dread instead of curiosity. Triggers: stuck, going in circles, looping, thrashing, same error again, I keep failing, lost the thread, nothing is working, repeated mistakes. Not topic-specific — this is for the state you're in, not the problem you're on.

관련 스킬