[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EVCS48586J2Y09HA48K7AV":3,"skill-same:01M6EVCS48586J2Y09HA48K7AV":79},{"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":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":6,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M6EVCS48586J2Y09HA48K7AV","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","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Finference-sh-9\u002Fai-automation-workflows\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"ai automation workflows","automation","workflows","automation workflows","pipeline","loops","processing","webhook","ai pipeline","AI workflow","python sdk","Bash","cli","data","Workflow Automation","monitoring","batch","tasks","workflow","orchestration","2026-11-10 10:12:30",false,"---\nname: ai-automation-workflows\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\"\nallowed-tools: Bash(infsh *)\n---\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```bash\ncurl -fsSL https:\u002F\u002Fcli.inference.sh | sh && infsh login\n\n# Simple automation: Generate daily image\ninfsh app run falai\u002Fflux-dev --input '{\n  \"prompt\": \"Inspirational quote background, minimalist design, date: '\"$(date +%Y-%m-%d)\"'\"\n}'\n```\n\n> **Install note:** The [install script](https:\u002F\u002Fcli.inference.sh) only detects your OS\u002Farchitecture, downloads the matching binary from `dist.inference.sh`, and verifies its SHA-256 checksum. No elevated permissions or background processes. [Manual install & verification](https:\u002F\u002Fdist.inference.sh\u002Fcli\u002Fchecksums.txt) available.\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  infsh 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=$(infsh app run tavily\u002Fsearch-assistant --input \"{\n  \\\"query\\\": \\\"$TOPIC latest developments\\\"\n}\")\n\n# Step 2: Write article\necho \"Writing article...\"\nARTICLE=$(infsh 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=$(infsh 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=$(infsh 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\ninfsh app run falai\u002Fflux-dev --input '{\"prompt\": \"Hero image...\"}' > hero.json &\nPID1=$!\n\ninfsh app run falai\u002Fflux-dev --input '{\"prompt\": \"Feature image 1...\"}' > feature1.json &\nPID2=$!\n\ninfsh 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=$(infsh 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    infsh app run falai\u002Fflux-dev --input '{\"prompt\": \"Celebration, success, happy\"}'\n    ;;\n  *negative*)\n    echo \"Generating supportive message...\"\n    infsh 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=$(infsh 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  infsh 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\ninfsh 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\ninfsh 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# infsh 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=$(infsh 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 infsh 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        [\"infsh\", \"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  infsh 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  infsh 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  infsh 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@inference-sh\n```\n\nBrowse all apps: `infsh app list`\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```bash\ncurl -fsSL https:\u002F\u002Fcli.inference.sh | sh && infsh login\n\n# Simple automation: Generate daily image\ninfsh app run falai\u002Fflux-dev --input '{\n  \"prompt\": \"Inspirational quote background, minimalist design, date: '\"$(date +%Y-%m-%d)\"'\"\n}'\n```\n\n> **Install note:** The [install script](https:\u002F\u002Fcli.inference.sh) only detects your OS\u002Farchitecture, downloads the matching binary from `dist.inference.sh`, and verifies its SHA-256 checksum. No elevated permissions or background processes. [Manual install & verification](https:\u002F\u002Fdist.inference.sh\u002Fcli\u002Fchecksums.txt) available.\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  infsh 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=$(infsh app run tavily\u002Fsearch-assistant --input \"{\n  \\\"query\\\": \\\"$TOPIC latest developments\\\"\n}\")\n\n# Step 2: Write article\necho \"Writing article...\"\nARTICLE=$(infsh 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=$(infsh 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=$(infsh 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\ninfsh app run falai\u002Fflux-dev --input '{\"prompt\": \"Hero image...\"}' > hero.json &\nPID1=$!\n\ninfsh app run falai\u002Fflux-dev --input '{\"prompt\": \"Feature image 1...\"}' > feature1.json &\nPID2=$!\n\ninfsh 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=$(infsh 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    infsh app run falai\u002Fflux-dev --input '{\"prompt\": \"Celebration, success, happy\"}'\n    ;;\n  *negative*)\n    echo \"Generating supportive message...\"\n    infsh 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=$(infsh 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  infsh 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\ninfsh 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\ninfsh 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# infsh 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=$(infsh 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 infsh 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        [\"infsh\", \"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  infsh 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  infsh 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  infsh 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@inference-sh\n```\n\nBrowse all apps: `infsh app list`\n",{"name":5,"description":7,"allowed-tools":49},"Bash(infsh *)","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Finference-sh-9\u002Fai-automation-workflows",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill ai-automation-workflows",{"tool":65,"command":66},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill ai-automation-workflows",{"tool":68,"command":69},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill ai-automation-workflows","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Finference-sh-9\u002Fai-automation-workflows\u002FSKILL.md",true,[73],{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"skill-report.json","REFERENCE","参考文档",12010,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Finference-sh-9\u002Fai-automation-workflows\u002Fskill-report.json",[80,90,100,109,115,122],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":86,"publishedAt":44},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[85],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[87,88,89],"model","model hierarchy","model hierarchy skill",{"skillNo":91,"name":92,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":96,"publishedAt":44},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[95],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[97,98,99],"MCP","zoom","zoom mcp",{"skillNo":101,"name":102,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":44},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[106,107,108,98],"sdk","zoom apps sdk","apps",{"skillNo":110,"name":111,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":44},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[111],{"skillNo":116,"name":117,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":121,"publishedAt":44},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[120],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[117],{"skillNo":123,"name":124,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":44},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[124]]