[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PYDEPFP41FDASPCB3Y7M2N":3,"skill-same:01M6PYDEPFP41FDASPCB3Y7M2N":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":6,"ownerDescription":56,"updatedAt":57,"install":58,"resources":71},"01M6PYDEPFP41FDASPCB3Y7M2N","ai-automation-workflows",null,"Build automated AI workflows combining multiple models and services.\nPatterns: batch processing, scheduled tasks, event-driven pipelines, agent loops.\nTools: inference.sh CLI, bash scripting, Python SDK, webhook integration.\nUse for: content automation, data processing, monitoring, scheduled generation.\nTriggers: ai automation, workflow automation, batch processing, ai pipeline,\nautomated content, scheduled ai, ai cron, ai batch job, automated generation,\nai workflow, content at scale, automation script, ai orchestration","Kernel8901\u002Fai-agent-skills-classification","Kernel8901","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F72647553?v=4","01M6KV388J2H5PNC8D8P940BJD","01M6KV38CS5B3AY63RKZB410YM",7,"MIT","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F工作流自动化\u002Fai-automation-workflows\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"ai automation","automation","workflows","ai automation workflows","automation workflows","python sdk","scheduled","loops","processing","webhook","ai pipeline","AI workflow","orchestration","Bash","pipeline","Workflow Automation","monitoring","batch","tasks","workflow","2026-11-10 10:12:30",false,"---\nname: ai-automation-workflows\ndescription: |\n  Build automated AI workflows combining multiple models and services.\n  Patterns: batch processing, scheduled tasks, event-driven pipelines, agent loops.\n  Tools: inference.sh CLI, bash scripting, Python SDK, webhook integration.\n  Use for: content automation, data processing, monitoring, scheduled generation.\n  Triggers: ai automation, workflow automation, batch processing, ai pipeline,\n  automated content, scheduled ai, ai cron, ai batch job, automated generation,\n  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## 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## 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\u002Fagent-skills@ai-content-pipeline\n\n# RAG pipelines\nnpx skills add inference-sh\u002Fagent-skills@ai-rag-pipeline\n\n# Social media automation\nnpx skills add inference-sh\u002Fagent-skills@ai-social-media-content\n\n# Full platform skill\nnpx skills add inference-sh\u002Fagent-skills@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## 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## 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\u002Fagent-skills@ai-content-pipeline\n\n# RAG pipelines\nnpx skills add inference-sh\u002Fagent-skills@ai-rag-pipeline\n\n# Social media automation\nnpx skills add inference-sh\u002Fagent-skills@ai-social-media-content\n\n# Full platform skill\nnpx skills add inference-sh\u002Fagent-skills@inference-sh\n```\n\nBrowse all apps: `infsh app list`\n",{"name":5,"description":48,"allowed-tools":49},"Build automated AI workflows combining multiple models and services.\nPatterns: batch processing, scheduled tasks, event-driven pipelines, agent loops.\nTools: inference.sh CLI, bash scripting, Python SDK, webhook integration.\nUse for: content automation, data processing, monitoring, scheduled generation.\nTriggers: ai automation, workflow automation, batch processing, ai pipeline,\nautomated content, scheduled ai, ai cron, ai batch job, automated generation,\nai workflow, content at scale, automation script, ai orchestration\n","Bash(infsh *)","main","f4cb2d49f7667e79ef7804f50396d5aaffdf1f56","工作流自动化\u002Fai-automation-workflows",1,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification","https:\u002F\u002Fgithub.com\u002FKernel8901","a little little little dobe in life but science geek","2026-04-05 16:43:56",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add Kernel8901\u002Fai-agent-skills-classification --skill ai-automation-workflows",{"tool":64,"command":65},"bunx","bunx skills add Kernel8901\u002Fai-agent-skills-classification --skill ai-automation-workflows",{"tool":67,"command":68},"pnpm","pnpm dlx skills add Kernel8901\u002Fai-agent-skills-classification --skill ai-automation-workflows","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F工作流自动化\u002Fai-automation-workflows\u002FSKILL.md",true,[72],{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"_meta.json","REFERENCE","参考文档",298,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F工作流自动化\u002Fai-automation-workflows\u002F_meta.json",[79,103,135,146,156,186],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":43},"01M6Q5R6WZ06RRB9RQTW54B34B","zyfai","Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit\u002Fwithdraw anytime.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzyfai-sdk\u002FSKILL.md",[],[81,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102],"safe","ethereum","defi","Optimization","user","use","Wallet","base","deposit","withdraw","yield","arbitrum","non-custodial","passive","defi yield","earn","yield optimization",{"skillNo":104,"name":105,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":117,"publishedAt":43},"01M6Q5R337B5JSNER4P4YS03TN","zerion-api","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api\u002FSKILL.md",[108,111,112],{"categoryNo":109,"categoryName":110,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":113,"categoryName":114,"taxonomyType":115,"taxonomyTypeDesc":116},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[118,119,120,121,122,123,124,88,125,92,126,127,128,129,130,131,132,133,134],"api","zerion api","zerion","MCP","mcp server","server","blockchain","transactions","crypto wallet","crypto","evm","solana","query","across","positions","token","prices",{"skillNo":136,"name":137,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":143,"publishedAt":43},"01M6Q5QZFYTDAZMZ27BN5VZXAR","zerion-api-skill","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-skill\u002FSKILL.md",[140,141,142],{"categoryNo":109,"categoryName":110,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":113,"categoryName":114,"taxonomyType":115,"taxonomyTypeDesc":116},[118,144,145,119,120,121,122,123,124,88,125,92,127,128,129,130,131,132,133,134],"api skill","zerion api skill",{"skillNo":147,"name":148,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":154,"publishedAt":43},"01M6Q5QW17QW98RA3FE45E4RD8","zerion-api-mcp","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-mcp\u002FSKILL.md",[151,152,153],{"categoryNo":109,"categoryName":110,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":113,"categoryName":114,"taxonomyType":115,"taxonomyTypeDesc":116},[121,118,155,119,120,122,123,88,125,92,126,127,128,129,130,131,132,133,134],"zerion api mcp",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":165,"publishedAt":43},"01M6Q5QQYZB7A501BDEQWKGSJT","yahoo-finance-forex","Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR\u002FUSD, GBP\u002FUSD, USD\u002FJPY, etc.). Analyzes sentiment and provides trading context.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-forex\u002FSKILL.md",[162],{"categoryNo":163,"categoryName":164,"taxonomyType":115,"taxonomyTypeDesc":116},"01JBSEEDCAT000000000000040","财务",[166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185],"finance","yahoo finance","forex","yahoo","yahoo finance forex","github","https","sentiment","real-time","python3","install","Market","usd","news","time","currency","gbp","pip","market data","for",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":193,"publishedAt":43},"01M6Q5QM6VS84WZVM7BKXXPF32","yahoo-finance","This skill should be used when the user asks to \"get stock prices\", \"check stock quotes\", \"look up earnings\", \"get financial data\", \"find trending stocks\", or needs stock market data from Yahoo Finance.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-cli\u002FSKILL.md",[192],{"categoryNo":163,"categoryName":164,"taxonomyType":115,"taxonomyTypeDesc":116},[166,167,169,194,195,196,197,198,199,177,200,201,202,203,204,205,206,207,134,184],"cli","homebrew","find","check","brew","up","local","get","stock","link","trending","sf","quotes","ln"]