[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77NPDHHYTYW5DK21M7GPCZ9":3,"skill-same:01M77NPDHHYTYW5DK21M7GPCZ9":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M77NPDHHYTYW5DK21M7GPCZ9","ai-automation-workflows",null,"Build automated AI workflows combining multiple models and services. Patterns: batch processing, scheduled tasks, event-driven pipelines, agent loops. Tools: inference.sh CLI, bash scripting, Python SDK, webhook integration. Use for: content automation, data processing, monitoring, scheduled generation. Triggers: ai automation, workflow automation, batch processing, ai pipeline, automated content, scheduled ai, ai cron, ai batch job, automated generation, ai workflow, content at scale, automation script, ai orchestration","Reihantt6\u002Fsns-myagent","Reihantt6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F219822095?v=4","01M77KK94PV8B7C2D9XWXNS8DJ","Mohamad Reihan tegar prasetya","01M77KK958QFMTHYXGXFV7KZ79",2,"MIT","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fai-automation-workflows\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: \"Build automated AI workflows combining multiple models and services. Patterns: batch processing, scheduled tasks, event-driven pipelines, agent loops. Tools: inference.sh CLI, bash scripting, Python SDK, webhook integration. Use for: content automation, data processing, monitoring, scheduled generation. Triggers: ai automation, workflow automation, batch processing, ai pipeline, automated content, scheduled ai, ai cron, ai batch job, automated generation, ai workflow, content at scale, automation script, ai orchestration\"\n---\n> **Install the belt CLI skill:** `npx skills add belt-sh\u002Fcli`\n\n# AI Automation Workflows\n\nBuild automated AI workflows via [inference.sh](https:\u002F\u002Finference.sh) CLI.\n\n![AI Automation Workflows](https:\u002F\u002Fcloud.inference.sh\u002Fapp\u002Ffiles\u002Fu\u002F4mg21r6ta37mpaz6ktzwtt8krr\u002F01kg0v0nz7wv0qwqjtq1cam52z.jpeg)\n\n## Quick Start\n\n> Requires inference.sh CLI (`belt`). [Install instructions](https:\u002F\u002Fraw.githubusercontent.com\u002Finference-sh\u002Fskills\u002Frefs\u002Fheads\u002Fmain\u002Fcli-install.md)\n\n```bash\nbelt login\n\n# Simple automation: Generate daily image\nbelt app run falai\u002Fflux-dev --input '{\n  \"prompt\": \"Inspirational quote background, minimalist design, date: '\"$(date +%Y-%m-%d)\"'\"\n}'\n```\n\n\n## Automation Patterns\n\n### Pattern 1: Batch Processing\n\nProcess multiple items with the same workflow.\n\n```bash\n#!\u002Fbin\u002Fbash\n# batch_images.sh - Generate images for multiple prompts\n\nPROMPTS=(\n  \"Mountain landscape at sunrise\"\n  \"Ocean waves at sunset\"\n  \"Forest path in autumn\"\n  \"Desert dunes at night\"\n)\n\nfor prompt in \"${PROMPTS[@]}\"; do\n  echo \"Generating: $prompt\"\n  belt app run falai\u002Fflux-dev --input \"{\n    \\\"prompt\\\": \\\"$prompt, professional photography, 4K\\\"\n  }\" > \"output_${prompt\u002F\u002F \u002F_}.json\"\n  sleep 2  # Rate limiting\ndone\n```\n\n### Pattern 2: Sequential Pipeline\n\nChain multiple AI operations.\n\n```bash\n#!\u002Fbin\u002Fbash\n# content_pipeline.sh - Full content creation pipeline\n\nTOPIC=\"AI in healthcare\"\n\n# Step 1: Research\necho \"Researching...\"\nRESEARCH=$(belt app run tavily\u002Fsearch-assistant --input \"{\n  \\\"query\\\": \\\"$TOPIC latest developments\\\"\n}\")\n\n# Step 2: Write article\necho \"Writing article...\"\nARTICLE=$(belt app run openrouter\u002Fclaude-sonnet-45 --input \"{\n  \\\"prompt\\\": \\\"Write a 500-word blog post about $TOPIC based on: $RESEARCH\\\"\n}\")\n\n# Step 3: Generate image\necho \"Generating image...\"\nIMAGE=$(belt app run falai\u002Fflux-dev --input \"{\n  \\\"prompt\\\": \\\"Blog header image for article about $TOPIC, modern, professional\\\"\n}\")\n\n# Step 4: Generate social post\necho \"Creating social post...\"\nSOCIAL=$(belt app run openrouter\u002Fclaude-haiku-45 --input \"{\n  \\\"prompt\\\": \\\"Write a Twitter thread (5 tweets) summarizing: $ARTICLE\\\"\n}\")\n\necho \"Pipeline complete!\"\n```\n\n### Pattern 3: Parallel Processing\n\nRun multiple operations simultaneously.\n\n```bash\n#!\u002Fbin\u002Fbash\n# parallel_generation.sh - Generate multiple assets in parallel\n\n# Start all jobs in background\nbelt app run falai\u002Fflux-dev --input '{\"prompt\": \"Hero image...\"}' > hero.json &\nPID1=$!\n\nbelt app run falai\u002Fflux-dev --input '{\"prompt\": \"Feature image 1...\"}' > feature1.json &\nPID2=$!\n\nbelt app run falai\u002Fflux-dev --input '{\"prompt\": \"Feature image 2...\"}' > feature2.json &\nPID3=$!\n\n# Wait for all to complete\nwait $PID1 $PID2 $PID3\necho \"All images generated!\"\n```\n\n### Pattern 4: Conditional Workflow\n\nBranch based on results.\n\n```bash\n#!\u002Fbin\u002Fbash\n# conditional_workflow.sh - Process based on content analysis\n\nINPUT_TEXT=\"$1\"\n\n# Analyze content\nANALYSIS=$(belt app run openrouter\u002Fclaude-haiku-45 --input \"{\n  \\\"prompt\\\": \\\"Classify this text as: positive, negative, or neutral. Return only the classification.\\n\\n$INPUT_TEXT\\\"\n}\")\n\n# Branch based on result\ncase \"$ANALYSIS\" in\n  *positive*)\n    echo \"Generating celebration image...\"\n    belt app run falai\u002Fflux-dev --input '{\"prompt\": \"Celebration, success, happy\"}'\n    ;;\n  *negative*)\n    echo \"Generating supportive message...\"\n    belt app run openrouter\u002Fclaude-sonnet-45 --input \"{\n      \\\"prompt\\\": \\\"Write a supportive, encouraging response to: $INPUT_TEXT\\\"\n    }\"\n    ;;\n  *)\n    echo \"Generating neutral acknowledgment...\"\n    ;;\nesac\n```\n\n### Pattern 5: Retry with Fallback\n\nHandle failures gracefully.\n\n```bash\n#!\u002Fbin\u002Fbash\n# retry_workflow.sh - Retry failed operations\n\ngenerate_with_retry() {\n  local prompt=\"$1\"\n  local max_attempts=3\n  local attempt=1\n\n  while [ $attempt -le $max_attempts ]; do\n    echo \"Attempt $attempt...\"\n\n    result=$(belt app run falai\u002Fflux-dev --input \"{\\\"prompt\\\": \\\"$prompt\\\"}\" 2>&1)\n\n    if [ $? -eq 0 ]; then\n      echo \"$result\"\n      return 0\n    fi\n\n    echo \"Failed, retrying...\"\n    ((attempt++))\n    sleep $((attempt * 2))  # Exponential backoff\n  done\n\n  # Fallback to different model\n  echo \"Falling back to alternative model...\"\n  belt app run google\u002Fimagen-3 --input \"{\\\"prompt\\\": \\\"$prompt\\\"}\"\n}\n\ngenerate_with_retry \"A beautiful sunset over mountains\"\n```\n\n## Scheduled Automation\n\n### Cron Job Setup\n\n```bash\n# Edit crontab\ncrontab -e\n\n# Daily content generation at 9 AM\n0 9 * * * \u002Fpath\u002Fto\u002Fdaily_content.sh >> \u002Fvar\u002Flog\u002Fai-automation.log 2>&1\n\n# Weekly report every Monday at 8 AM\n0 8 * * 1 \u002Fpath\u002Fto\u002Fweekly_report.sh >> \u002Fvar\u002Flog\u002Fai-automation.log 2>&1\n\n# Every 6 hours: social media content\n0 *\u002F6 * * * \u002Fpath\u002Fto\u002Fsocial_content.sh >> \u002Fvar\u002Flog\u002Fai-automation.log 2>&1\n```\n\n### Daily Content Script\n\n```bash\n#!\u002Fbin\u002Fbash\n# daily_content.sh - Run daily at 9 AM\n\nDATE=$(date +%Y-%m-%d)\nOUTPUT_DIR=\"\u002Foutput\u002F$DATE\"\nmkdir -p \"$OUTPUT_DIR\"\n\n# Generate daily quote image\nbelt app run falai\u002Fflux-dev --input '{\n  \"prompt\": \"Motivational quote background, minimalist, morning vibes\"\n}' > \"$OUTPUT_DIR\u002Fquote_image.json\"\n\n# Generate daily tip\nbelt app run openrouter\u002Fclaude-haiku-45 --input '{\n  \"prompt\": \"Give me one actionable productivity tip for today. Be concise.\"\n}' > \"$OUTPUT_DIR\u002Fdaily_tip.json\"\n\n# Post to social (optional)\n# belt app run twitter\u002Fpost-tweet --input \"{...}\"\n\necho \"Daily content generated: $DATE\"\n```\n\n## Monitoring and Logging\n\n### Logging Wrapper\n\n```bash\n#!\u002Fbin\u002Fbash\n# logged_workflow.sh - With comprehensive logging\n\nLOG_FILE=\"\u002Fvar\u002Flog\u002Fai-workflow-$(date +%Y%m%d).log\"\n\nlog() {\n  echo \"[$(date '+%Y-%m-%d %H:%M:%S')] $1\" | tee -a \"$LOG_FILE\"\n}\n\nlog \"Starting workflow\"\n\n# Track execution time\nSTART_TIME=$(date +%s)\n\n# Run workflow\nlog \"Generating image...\"\nRESULT=$(belt app run falai\u002Fflux-dev --input '{\"prompt\": \"test\"}' 2>&1)\nSTATUS=$?\n\nif [ $STATUS -eq 0 ]; then\n  log \"Success: Image generated\"\nelse\n  log \"Error: $RESULT\"\nfi\n\nEND_TIME=$(date +%s)\nDURATION=$((END_TIME - START_TIME))\nlog \"Completed in ${DURATION}s\"\n```\n\n### Error Alerting\n\n```bash\n#!\u002Fbin\u002Fbash\n# monitored_workflow.sh - With error alerts\n\nrun_with_alert() {\n  local result\n  result=$(\"$@\" 2>&1)\n  local status=$?\n\n  if [ $status -ne 0 ]; then\n    # Send alert (webhook, email, etc.)\n    curl -X POST \"https:\u002F\u002Fyour-webhook.com\u002Falert\" \\\n      -H \"Content-Type: application\u002Fjson\" \\\n      -d \"{\\\"error\\\": \\\"$result\\\", \\\"command\\\": \\\"$*\\\"}\"\n  fi\n\n  echo \"$result\"\n  return $status\n}\n\nrun_with_alert belt app run falai\u002Fflux-dev --input '{\"prompt\": \"test\"}'\n```\n\n## Python SDK Automation\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n# automation.py - Python-based workflow\n\nimport subprocess\nimport json\nfrom datetime import datetime\nfrom pathlib import Path\n\ndef run_infsh(app_id: str, input_data: dict) -> dict:\n    \"\"\"Run inference.sh app and return result.\"\"\"\n    result = subprocess.run(\n        [\"belt\", \"app\", \"run\", app_id, \"--input\", json.dumps(input_data)],\n        capture_output=True,\n        text=True\n    )\n    return json.loads(result.stdout) if result.returncode == 0 else None\n\ndef daily_content_pipeline():\n    \"\"\"Generate daily content.\"\"\"\n    date_str = datetime.now().strftime(\"%Y-%m-%d\")\n    output_dir = Path(f\"output\u002F{date_str}\")\n    output_dir.mkdir(parents=True, exist_ok=True)\n\n    # Generate image\n    image = run_infsh(\"falai\u002Fflux-dev\", {\n        \"prompt\": f\"Daily inspiration for {date_str}, beautiful, uplifting\"\n    })\n    (output_dir \u002F \"image.json\").write_text(json.dumps(image))\n\n    # Generate caption\n    caption = run_infsh(\"openrouter\u002Fclaude-haiku-45\", {\n        \"prompt\": \"Write an inspiring caption for a daily motivation post. 2-3 sentences.\"\n    })\n    (output_dir \u002F \"caption.json\").write_text(json.dumps(caption))\n\n    print(f\"Generated content for {date_str}\")\n\nif __name__ == \"__main__\":\n    daily_content_pipeline()\n```\n\n## Workflow Templates\n\n### Content Calendar Automation\n\n```bash\n#!\u002Fbin\u002Fbash\n# content_calendar.sh - Generate week of content\n\nTOPICS=(\"productivity\" \"wellness\" \"technology\" \"creativity\" \"leadership\")\nDAYS=(\"Monday\" \"Tuesday\" \"Wednesday\" \"Thursday\" \"Friday\")\n\nfor i in \"${!DAYS[@]}\"; do\n  DAY=${DAYS[$i]}\n  TOPIC=${TOPICS[$i]}\n\n  echo \"Generating $DAY content about $TOPIC...\"\n\n  # Image\n  belt app run falai\u002Fflux-dev --input \"{\n    \\\"prompt\\\": \\\"$TOPIC theme, $DAY motivation, social media style\\\"\n  }\" > \"content\u002F${DAY}_image.json\"\n\n  # Caption\n  belt app run openrouter\u002Fclaude-haiku-45 --input \"{\n    \\\"prompt\\\": \\\"Write a $DAY motivation post about $TOPIC. Include hashtags.\\\"\n  }\" > \"content\u002F${DAY}_caption.json\"\ndone\n```\n\n### Data Processing Pipeline\n\n```bash\n#!\u002Fbin\u002Fbash\n# data_processing.sh - Process and analyze data files\n\nINPUT_DIR=\".\u002Fdata\u002Fraw\"\nOUTPUT_DIR=\".\u002Fdata\u002Fprocessed\"\n\nfor file in \"$INPUT_DIR\"\u002F*.txt; do\n  filename=$(basename \"$file\" .txt)\n\n  # Analyze content\n  belt app run openrouter\u002Fclaude-haiku-45 --input \"{\n    \\\"prompt\\\": \\\"Analyze this data and provide key insights in JSON format: $(cat $file)\\\"\n  }\" > \"$OUTPUT_DIR\u002F${filename}_analysis.json\"\n\ndone\n```\n\n## Best Practices\n\n1. **Rate limiting** - Add delays between API calls\n2. **Error handling** - Always check return codes\n3. **Logging** - Track all operations\n4. **Idempotency** - Design for safe re-runs\n5. **Monitoring** - Alert on failures\n6. **Backups** - Save intermediate results\n7. **Timeouts** - Set reasonable limits\n\n## Related Skills\n\n```bash\n# Content pipelines\nnpx skills add inference-sh\u002Fskills@ai-content-pipeline\n\n# RAG pipelines\nnpx skills add inference-sh\u002Fskills@ai-rag-pipeline\n\n# Social media automation\nnpx skills add inference-sh\u002Fskills@ai-social-media-content\n\n# Full platform skill\nnpx skills add inference-sh\u002Fskills@infsh-cli\n```\n\nBrowse all apps: `belt app list`\n\n","> **Install the belt CLI skill:** `npx skills add belt-sh\u002Fcli`\n\n# AI Automation Workflows\n\nBuild automated AI workflows via [inference.sh](https:\u002F\u002Finference.sh) CLI.\n\n![AI Automation Workflows](https:\u002F\u002Fcloud.inference.sh\u002Fapp\u002Ffiles\u002Fu\u002F4mg21r6ta37mpaz6ktzwtt8krr\u002F01kg0v0nz7wv0qwqjtq1cam52z.jpeg)\n\n## Quick Start\n\n> Requires inference.sh CLI (`belt`). [Install instructions](https:\u002F\u002Fraw.githubusercontent.com\u002Finference-sh\u002Fskills\u002Frefs\u002Fheads\u002Fmain\u002Fcli-install.md)\n\n```bash\nbelt login\n\n# Simple automation: Generate daily image\nbelt app run falai\u002Fflux-dev --input '{\n  \"prompt\": \"Inspirational quote background, minimalist design, date: '\"$(date +%Y-%m-%d)\"'\"\n}'\n```\n\n\n## Automation Patterns\n\n### Pattern 1: Batch Processing\n\nProcess multiple items with the same workflow.\n\n```bash\n#!\u002Fbin\u002Fbash\n# batch_images.sh - Generate images for multiple prompts\n\nPROMPTS=(\n  \"Mountain landscape at sunrise\"\n  \"Ocean waves at sunset\"\n  \"Forest path in autumn\"\n  \"Desert dunes at night\"\n)\n\nfor prompt in \"${PROMPTS[@]}\"; do\n  echo \"Generating: $prompt\"\n  belt app run falai\u002Fflux-dev --input \"{\n    \\\"prompt\\\": \\\"$prompt, professional photography, 4K\\\"\n  }\" > \"output_${prompt\u002F\u002F \u002F_}.json\"\n  sleep 2  # Rate limiting\ndone\n```\n\n### Pattern 2: Sequential Pipeline\n\nChain multiple AI operations.\n\n```bash\n#!\u002Fbin\u002Fbash\n# content_pipeline.sh - Full content creation pipeline\n\nTOPIC=\"AI in healthcare\"\n\n# Step 1: Research\necho \"Researching...\"\nRESEARCH=$(belt app run tavily\u002Fsearch-assistant --input \"{\n  \\\"query\\\": \\\"$TOPIC latest developments\\\"\n}\")\n\n# Step 2: Write article\necho \"Writing article...\"\nARTICLE=$(belt app run openrouter\u002Fclaude-sonnet-45 --input \"{\n  \\\"prompt\\\": \\\"Write a 500-word blog post about $TOPIC based on: $RESEARCH\\\"\n}\")\n\n# Step 3: Generate image\necho \"Generating image...\"\nIMAGE=$(belt app run falai\u002Fflux-dev --input \"{\n  \\\"prompt\\\": \\\"Blog header image for article about $TOPIC, modern, professional\\\"\n}\")\n\n# Step 4: Generate social post\necho \"Creating social post...\"\nSOCIAL=$(belt app run openrouter\u002Fclaude-haiku-45 --input \"{\n  \\\"prompt\\\": \\\"Write a Twitter thread (5 tweets) summarizing: $ARTICLE\\\"\n}\")\n\necho \"Pipeline complete!\"\n```\n\n### Pattern 3: Parallel Processing\n\nRun multiple operations simultaneously.\n\n```bash\n#!\u002Fbin\u002Fbash\n# parallel_generation.sh - Generate multiple assets in parallel\n\n# Start all jobs in background\nbelt app run falai\u002Fflux-dev --input '{\"prompt\": \"Hero image...\"}' > hero.json &\nPID1=$!\n\nbelt app run falai\u002Fflux-dev --input '{\"prompt\": \"Feature image 1...\"}' > feature1.json &\nPID2=$!\n\nbelt app run falai\u002Fflux-dev --input '{\"prompt\": \"Feature image 2...\"}' > feature2.json &\nPID3=$!\n\n# Wait for all to complete\nwait $PID1 $PID2 $PID3\necho \"All images generated!\"\n```\n\n### Pattern 4: Conditional Workflow\n\nBranch based on results.\n\n```bash\n#!\u002Fbin\u002Fbash\n# conditional_workflow.sh - Process based on content analysis\n\nINPUT_TEXT=\"$1\"\n\n# Analyze content\nANALYSIS=$(belt app run openrouter\u002Fclaude-haiku-45 --input \"{\n  \\\"prompt\\\": \\\"Classify this text as: positive, negative, or neutral. Return only the classification.\\n\\n$INPUT_TEXT\\\"\n}\")\n\n# Branch based on result\ncase \"$ANALYSIS\" in\n  *positive*)\n    echo \"Generating celebration image...\"\n    belt app run falai\u002Fflux-dev --input '{\"prompt\": \"Celebration, success, happy\"}'\n    ;;\n  *negative*)\n    echo \"Generating supportive message...\"\n    belt app run openrouter\u002Fclaude-sonnet-45 --input \"{\n      \\\"prompt\\\": \\\"Write a supportive, encouraging response to: $INPUT_TEXT\\\"\n    }\"\n    ;;\n  *)\n    echo \"Generating neutral acknowledgment...\"\n    ;;\nesac\n```\n\n### Pattern 5: Retry with Fallback\n\nHandle failures gracefully.\n\n```bash\n#!\u002Fbin\u002Fbash\n# retry_workflow.sh - Retry failed operations\n\ngenerate_with_retry() {\n  local prompt=\"$1\"\n  local max_attempts=3\n  local attempt=1\n\n  while [ $attempt -le $max_attempts ]; do\n    echo \"Attempt $attempt...\"\n\n    result=$(belt app run falai\u002Fflux-dev --input \"{\\\"prompt\\\": \\\"$prompt\\\"}\" 2>&1)\n\n    if [ $? -eq 0 ]; then\n      echo \"$result\"\n      return 0\n    fi\n\n    echo \"Failed, retrying...\"\n    ((attempt++))\n    sleep $((attempt * 2))  # Exponential backoff\n  done\n\n  # Fallback to different model\n  echo \"Falling back to alternative model...\"\n  belt app run google\u002Fimagen-3 --input \"{\\\"prompt\\\": \\\"$prompt\\\"}\"\n}\n\ngenerate_with_retry \"A beautiful sunset over mountains\"\n```\n\n## Scheduled Automation\n\n### Cron Job Setup\n\n```bash\n# Edit crontab\ncrontab -e\n\n# Daily content generation at 9 AM\n0 9 * * * \u002Fpath\u002Fto\u002Fdaily_content.sh >> \u002Fvar\u002Flog\u002Fai-automation.log 2>&1\n\n# Weekly report every Monday at 8 AM\n0 8 * * 1 \u002Fpath\u002Fto\u002Fweekly_report.sh >> \u002Fvar\u002Flog\u002Fai-automation.log 2>&1\n\n# Every 6 hours: social media content\n0 *\u002F6 * * * \u002Fpath\u002Fto\u002Fsocial_content.sh >> \u002Fvar\u002Flog\u002Fai-automation.log 2>&1\n```\n\n### Daily Content Script\n\n```bash\n#!\u002Fbin\u002Fbash\n# daily_content.sh - Run daily at 9 AM\n\nDATE=$(date +%Y-%m-%d)\nOUTPUT_DIR=\"\u002Foutput\u002F$DATE\"\nmkdir -p \"$OUTPUT_DIR\"\n\n# Generate daily quote image\nbelt app run falai\u002Fflux-dev --input '{\n  \"prompt\": \"Motivational quote background, minimalist, morning vibes\"\n}' > \"$OUTPUT_DIR\u002Fquote_image.json\"\n\n# Generate daily tip\nbelt app run openrouter\u002Fclaude-haiku-45 --input '{\n  \"prompt\": \"Give me one actionable productivity tip for today. Be concise.\"\n}' > \"$OUTPUT_DIR\u002Fdaily_tip.json\"\n\n# Post to social (optional)\n# belt app run twitter\u002Fpost-tweet --input \"{...}\"\n\necho \"Daily content generated: $DATE\"\n```\n\n## Monitoring and Logging\n\n### Logging Wrapper\n\n```bash\n#!\u002Fbin\u002Fbash\n# logged_workflow.sh - With comprehensive logging\n\nLOG_FILE=\"\u002Fvar\u002Flog\u002Fai-workflow-$(date +%Y%m%d).log\"\n\nlog() {\n  echo \"[$(date '+%Y-%m-%d %H:%M:%S')] $1\" | tee -a \"$LOG_FILE\"\n}\n\nlog \"Starting workflow\"\n\n# Track execution time\nSTART_TIME=$(date +%s)\n\n# Run workflow\nlog \"Generating image...\"\nRESULT=$(belt app run falai\u002Fflux-dev --input '{\"prompt\": \"test\"}' 2>&1)\nSTATUS=$?\n\nif [ $STATUS -eq 0 ]; then\n  log \"Success: Image generated\"\nelse\n  log \"Error: $RESULT\"\nfi\n\nEND_TIME=$(date +%s)\nDURATION=$((END_TIME - START_TIME))\nlog \"Completed in ${DURATION}s\"\n```\n\n### Error Alerting\n\n```bash\n#!\u002Fbin\u002Fbash\n# monitored_workflow.sh - With error alerts\n\nrun_with_alert() {\n  local result\n  result=$(\"$@\" 2>&1)\n  local status=$?\n\n  if [ $status -ne 0 ]; then\n    # Send alert (webhook, email, etc.)\n    curl -X POST \"https:\u002F\u002Fyour-webhook.com\u002Falert\" \\\n      -H \"Content-Type: application\u002Fjson\" \\\n      -d \"{\\\"error\\\": \\\"$result\\\", \\\"command\\\": \\\"$*\\\"}\"\n  fi\n\n  echo \"$result\"\n  return $status\n}\n\nrun_with_alert belt app run falai\u002Fflux-dev --input '{\"prompt\": \"test\"}'\n```\n\n## Python SDK Automation\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n# automation.py - Python-based workflow\n\nimport subprocess\nimport json\nfrom datetime import datetime\nfrom pathlib import Path\n\ndef run_infsh(app_id: str, input_data: dict) -> dict:\n    \"\"\"Run inference.sh app and return result.\"\"\"\n    result = subprocess.run(\n        [\"belt\", \"app\", \"run\", app_id, \"--input\", json.dumps(input_data)],\n        capture_output=True,\n        text=True\n    )\n    return json.loads(result.stdout) if result.returncode == 0 else None\n\ndef daily_content_pipeline():\n    \"\"\"Generate daily content.\"\"\"\n    date_str = datetime.now().strftime(\"%Y-%m-%d\")\n    output_dir = Path(f\"output\u002F{date_str}\")\n    output_dir.mkdir(parents=True, exist_ok=True)\n\n    # Generate image\n    image = run_infsh(\"falai\u002Fflux-dev\", {\n        \"prompt\": f\"Daily inspiration for {date_str}, beautiful, uplifting\"\n    })\n    (output_dir \u002F \"image.json\").write_text(json.dumps(image))\n\n    # Generate caption\n    caption = run_infsh(\"openrouter\u002Fclaude-haiku-45\", {\n        \"prompt\": \"Write an inspiring caption for a daily motivation post. 2-3 sentences.\"\n    })\n    (output_dir \u002F \"caption.json\").write_text(json.dumps(caption))\n\n    print(f\"Generated content for {date_str}\")\n\nif __name__ == \"__main__\":\n    daily_content_pipeline()\n```\n\n## Workflow Templates\n\n### Content Calendar Automation\n\n```bash\n#!\u002Fbin\u002Fbash\n# content_calendar.sh - Generate week of content\n\nTOPICS=(\"productivity\" \"wellness\" \"technology\" \"creativity\" \"leadership\")\nDAYS=(\"Monday\" \"Tuesday\" \"Wednesday\" \"Thursday\" \"Friday\")\n\nfor i in \"${!DAYS[@]}\"; do\n  DAY=${DAYS[$i]}\n  TOPIC=${TOPICS[$i]}\n\n  echo \"Generating $DAY content about $TOPIC...\"\n\n  # Image\n  belt app run falai\u002Fflux-dev --input \"{\n    \\\"prompt\\\": \\\"$TOPIC theme, $DAY motivation, social media style\\\"\n  }\" > \"content\u002F${DAY}_image.json\"\n\n  # Caption\n  belt app run openrouter\u002Fclaude-haiku-45 --input \"{\n    \\\"prompt\\\": \\\"Write a $DAY motivation post about $TOPIC. Include hashtags.\\\"\n  }\" > \"content\u002F${DAY}_caption.json\"\ndone\n```\n\n### Data Processing Pipeline\n\n```bash\n#!\u002Fbin\u002Fbash\n# data_processing.sh - Process and analyze data files\n\nINPUT_DIR=\".\u002Fdata\u002Fraw\"\nOUTPUT_DIR=\".\u002Fdata\u002Fprocessed\"\n\nfor file in \"$INPUT_DIR\"\u002F*.txt; do\n  filename=$(basename \"$file\" .txt)\n\n  # Analyze content\n  belt app run openrouter\u002Fclaude-haiku-45 --input \"{\n    \\\"prompt\\\": \\\"Analyze this data and provide key insights in JSON format: $(cat $file)\\\"\n  }\" > \"$OUTPUT_DIR\u002F${filename}_analysis.json\"\n\ndone\n```\n\n## Best Practices\n\n1. **Rate limiting** - Add delays between API calls\n2. **Error handling** - Always check return codes\n3. **Logging** - Track all operations\n4. **Idempotency** - Design for safe re-runs\n5. **Monitoring** - Alert on failures\n6. **Backups** - Save intermediate results\n7. **Timeouts** - Set reasonable limits\n\n## Related Skills\n\n```bash\n# Content pipelines\nnpx skills add inference-sh\u002Fskills@ai-content-pipeline\n\n# RAG pipelines\nnpx skills add inference-sh\u002Fskills@ai-rag-pipeline\n\n# Social media automation\nnpx skills add inference-sh\u002Fskills@ai-social-media-content\n\n# Full platform skill\nnpx skills add inference-sh\u002Fskills@infsh-cli\n```\n\nBrowse all apps: `belt app list`\n\n",{"description":7},"main","58843b159d7a4050d6b785a98b908cce505c0b92","agent\u002Fskills\u002Fai-automation-workflows",0,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent","https:\u002F\u002Fgithub.com\u002FReihantt6","reihsns.web.id","2026-08-19 20:08:18",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Reihantt6\u002Fsns-myagent --skill ai-automation-workflows",{"tool":38,"command":39},"bunx","bunx skills add Reihantt6\u002Fsns-myagent --skill ai-automation-workflows",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Reihantt6\u002Fsns-myagent --skill ai-automation-workflows","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fai-automation-workflows\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M77XDCYZ407XYMF2T4P6F7VT","youtube-transcript","Extract transcripts from YouTube videos. Use when the user asks for a transcript, subtitles, or captions of a YouTube video and provides a YouTube URL (youtube.com\u002Fwatch?v=, youtu.be\u002F, or similar). Supports output with or without timestamps.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-transcript\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M77XD7PBC98J6MXGJJ2TJ8DX","youtube-thumbnail-design","YouTube thumbnail design with specific dimensions, contrast rules, and mobile preview optimization. Covers safe zones, text placement, face expression psychology, and A\u002FB 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","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-thumbnail-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M77XD2541C8HXJ6RHYZP4NGJ","youtube-short-maker","Make YouTube Shorts that hold attention with Pexo — vertical 9:16, fast-paced, hook in the first 3 seconds. Describe your topic and Pexo writes the script, generates the shots, picks the models, and assembles a finished Short with music and captions. Use for YouTube Shorts: \"youtube short\", \"make a youtube short\", \"shorts video\", \"short-form video\". NOT for long-form or landscape video.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-short-maker\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M77XCXKVSYK7KTZ3PQBVVGFD","xcode-project-setup","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fxcode-project-setup\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M77XCR1DV8ZQK2NHWKVY4EWX","x402","Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — \"just use it\" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing touches your codebase) or \"build it in\" (install the SDK and write the key + code into your project). Walks through wallet setup, funding, .env, and a ~$1 test run. Use when the user asks about x402, pay-per-use, USDC payments, or wants Browser Use Cloud without an API key. For the free-tier signup (reverse-CAPTCHA → API key), use `browser-use cloud signup` or the `cloud` skill instead.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx402\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M77XCMD3R3ZBZQQSW6E0793B","x-twitter-scraper","Build GitHub Copilot workflows with Xquik X API SDKs, REST endpoints, hosted Apify Actor runs, MCP tools, TweetClaw OpenClaw plugin installs, signed webhooks, tweet search, user lookup, follower exports, media actions, and agent automation.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx-twitter-scraper\u002FSKILL.md",[],[]]