{
  "schemaVersion": "1.0",
  "item": {
    "slug": "ai-automation-workflows",
    "name": "Ai Automation Workflows",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/okaris/ai-automation-workflows",
    "canonicalUrl": "https://clawhub.ai/okaris/ai-automation-workflows",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/ai-automation-workflows",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ai-automation-workflows",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/ai-automation-workflows"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/ai-automation-workflows",
    "agentPageUrl": "https://openagent3.xyz/skills/ai-automation-workflows/agent",
    "manifestUrl": "https://openagent3.xyz/skills/ai-automation-workflows/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/ai-automation-workflows/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "AI Automation Workflows",
        "body": "Build automated AI workflows via inference.sh CLI."
      },
      {
        "title": "Quick Start",
        "body": "curl -fsSL https://cli.inference.sh | sh && infsh login\n\n# Simple automation: Generate daily image\ninfsh app run falai/flux-dev --input '{\n  \"prompt\": \"Inspirational quote background, minimalist design, date: '\"$(date +%Y-%m-%d)\"'\"\n}'\n\nInstall note: The install script only detects your OS/architecture, downloads the matching binary from dist.inference.sh, and verifies its SHA-256 checksum. No elevated permissions or background processes. Manual install & verification available."
      },
      {
        "title": "Pattern 1: Batch Processing",
        "body": "Process multiple items with the same workflow.\n\n#!/bin/bash\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/flux-dev --input \"{\n    \\\"prompt\\\": \\\"$prompt, professional photography, 4K\\\"\n  }\" > \"output_${prompt// /_}.json\"\n  sleep 2  # Rate limiting\ndone"
      },
      {
        "title": "Pattern 2: Sequential Pipeline",
        "body": "Chain multiple AI operations.\n\n#!/bin/bash\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/search-assistant --input \"{\n  \\\"query\\\": \\\"$TOPIC latest developments\\\"\n}\")\n\n# Step 2: Write article\necho \"Writing article...\"\nARTICLE=$(infsh app run openrouter/claude-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/flux-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/claude-haiku-45 --input \"{\n  \\\"prompt\\\": \\\"Write a Twitter thread (5 tweets) summarizing: $ARTICLE\\\"\n}\")\n\necho \"Pipeline complete!\""
      },
      {
        "title": "Pattern 3: Parallel Processing",
        "body": "Run multiple operations simultaneously.\n\n#!/bin/bash\n# parallel_generation.sh - Generate multiple assets in parallel\n\n# Start all jobs in background\ninfsh app run falai/flux-dev --input '{\"prompt\": \"Hero image...\"}' > hero.json &\nPID1=$!\n\ninfsh app run falai/flux-dev --input '{\"prompt\": \"Feature image 1...\"}' > feature1.json &\nPID2=$!\n\ninfsh app run falai/flux-dev --input '{\"prompt\": \"Feature image 2...\"}' > feature2.json &\nPID3=$!\n\n# Wait for all to complete\nwait $PID1 $PID2 $PID3\necho \"All images generated!\""
      },
      {
        "title": "Pattern 4: Conditional Workflow",
        "body": "Branch based on results.\n\n#!/bin/bash\n# conditional_workflow.sh - Process based on content analysis\n\nINPUT_TEXT=\"$1\"\n\n# Analyze content\nANALYSIS=$(infsh app run openrouter/claude-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/flux-dev --input '{\"prompt\": \"Celebration, success, happy\"}'\n    ;;\n  *negative*)\n    echo \"Generating supportive message...\"\n    infsh app run openrouter/claude-sonnet-45 --input \"{\n      \\\"prompt\\\": \\\"Write a supportive, encouraging response to: $INPUT_TEXT\\\"\n    }\"\n    ;;\n  *)\n    echo \"Generating neutral acknowledgment...\"\n    ;;\nesac"
      },
      {
        "title": "Pattern 5: Retry with Fallback",
        "body": "Handle failures gracefully.\n\n#!/bin/bash\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/flux-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/imagen-3 --input \"{\\\"prompt\\\": \\\"$prompt\\\"}\"\n}\n\ngenerate_with_retry \"A beautiful sunset over mountains\""
      },
      {
        "title": "Cron Job Setup",
        "body": "# Edit crontab\ncrontab -e\n\n# Daily content generation at 9 AM\n0 9 * * * /path/to/daily_content.sh >> /var/log/ai-automation.log 2>&1\n\n# Weekly report every Monday at 8 AM\n0 8 * * 1 /path/to/weekly_report.sh >> /var/log/ai-automation.log 2>&1\n\n# Every 6 hours: social media content\n0 */6 * * * /path/to/social_content.sh >> /var/log/ai-automation.log 2>&1"
      },
      {
        "title": "Daily Content Script",
        "body": "#!/bin/bash\n# daily_content.sh - Run daily at 9 AM\n\nDATE=$(date +%Y-%m-%d)\nOUTPUT_DIR=\"/output/$DATE\"\nmkdir -p \"$OUTPUT_DIR\"\n\n# Generate daily quote image\ninfsh app run falai/flux-dev --input '{\n  \"prompt\": \"Motivational quote background, minimalist, morning vibes\"\n}' > \"$OUTPUT_DIR/quote_image.json\"\n\n# Generate daily tip\ninfsh app run openrouter/claude-haiku-45 --input '{\n  \"prompt\": \"Give me one actionable productivity tip for today. Be concise.\"\n}' > \"$OUTPUT_DIR/daily_tip.json\"\n\n# Post to social (optional)\n# infsh app run twitter/post-tweet --input \"{...}\"\n\necho \"Daily content generated: $DATE\""
      },
      {
        "title": "Logging Wrapper",
        "body": "#!/bin/bash\n# logged_workflow.sh - With comprehensive logging\n\nLOG_FILE=\"/var/log/ai-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/flux-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\""
      },
      {
        "title": "Error Alerting",
        "body": "#!/bin/bash\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://your-webhook.com/alert\" \\\n      -H \"Content-Type: application/json\" \\\n      -d \"{\\\"error\\\": \\\"$result\\\", \\\"command\\\": \\\"$*\\\"}\"\n  fi\n\n  echo \"$result\"\n  return $status\n}\n\nrun_with_alert infsh app run falai/flux-dev --input '{\"prompt\": \"test\"}'"
      },
      {
        "title": "Python SDK Automation",
        "body": "#!/usr/bin/env 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/{date_str}\")\n    output_dir.mkdir(parents=True, exist_ok=True)\n\n    # Generate image\n    image = run_infsh(\"falai/flux-dev\", {\n        \"prompt\": f\"Daily inspiration for {date_str}, beautiful, uplifting\"\n    })\n    (output_dir / \"image.json\").write_text(json.dumps(image))\n\n    # Generate caption\n    caption = run_infsh(\"openrouter/claude-haiku-45\", {\n        \"prompt\": \"Write an inspiring caption for a daily motivation post. 2-3 sentences.\"\n    })\n    (output_dir / \"caption.json\").write_text(json.dumps(caption))\n\n    print(f\"Generated content for {date_str}\")\n\nif __name__ == \"__main__\":\n    daily_content_pipeline()"
      },
      {
        "title": "Content Calendar Automation",
        "body": "#!/bin/bash\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/flux-dev --input \"{\n    \\\"prompt\\\": \\\"$TOPIC theme, $DAY motivation, social media style\\\"\n  }\" > \"content/${DAY}_image.json\"\n\n  # Caption\n  infsh app run openrouter/claude-haiku-45 --input \"{\n    \\\"prompt\\\": \\\"Write a $DAY motivation post about $TOPIC. Include hashtags.\\\"\n  }\" > \"content/${DAY}_caption.json\"\ndone"
      },
      {
        "title": "Data Processing Pipeline",
        "body": "#!/bin/bash\n# data_processing.sh - Process and analyze data files\n\nINPUT_DIR=\"./data/raw\"\nOUTPUT_DIR=\"./data/processed\"\n\nfor file in \"$INPUT_DIR\"/*.txt; do\n  filename=$(basename \"$file\" .txt)\n\n  # Analyze content\n  infsh app run openrouter/claude-haiku-45 --input \"{\n    \\\"prompt\\\": \\\"Analyze this data and provide key insights in JSON format: $(cat $file)\\\"\n  }\" > \"$OUTPUT_DIR/${filename}_analysis.json\"\n\ndone"
      },
      {
        "title": "Best Practices",
        "body": "Rate limiting - Add delays between API calls\nError handling - Always check return codes\nLogging - Track all operations\nIdempotency - Design for safe re-runs\nMonitoring - Alert on failures\nBackups - Save intermediate results\nTimeouts - Set reasonable limits"
      },
      {
        "title": "Related Skills",
        "body": "# Content pipelines\nnpx skills add inference-sh/skills@ai-content-pipeline\n\n# RAG pipelines\nnpx skills add inference-sh/skills@ai-rag-pipeline\n\n# Social media automation\nnpx skills add inference-sh/skills@ai-social-media-content\n\n# Full platform skill\nnpx skills add inference-sh/skills@inference-sh\n\nBrowse all apps: infsh app list"
      }
    ],
    "body": "AI Automation Workflows\n\nBuild automated AI workflows via inference.sh CLI.\n\nQuick Start\ncurl -fsSL https://cli.inference.sh | sh && infsh login\n\n# Simple automation: Generate daily image\ninfsh app run falai/flux-dev --input '{\n  \"prompt\": \"Inspirational quote background, minimalist design, date: '\"$(date +%Y-%m-%d)\"'\"\n}'\n\n\nInstall note: The install script only detects your OS/architecture, downloads the matching binary from dist.inference.sh, and verifies its SHA-256 checksum. No elevated permissions or background processes. Manual install & verification available.\n\nAutomation Patterns\nPattern 1: Batch Processing\n\nProcess multiple items with the same workflow.\n\n#!/bin/bash\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/flux-dev --input \"{\n    \\\"prompt\\\": \\\"$prompt, professional photography, 4K\\\"\n  }\" > \"output_${prompt// /_}.json\"\n  sleep 2  # Rate limiting\ndone\n\nPattern 2: Sequential Pipeline\n\nChain multiple AI operations.\n\n#!/bin/bash\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/search-assistant --input \"{\n  \\\"query\\\": \\\"$TOPIC latest developments\\\"\n}\")\n\n# Step 2: Write article\necho \"Writing article...\"\nARTICLE=$(infsh app run openrouter/claude-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/flux-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/claude-haiku-45 --input \"{\n  \\\"prompt\\\": \\\"Write a Twitter thread (5 tweets) summarizing: $ARTICLE\\\"\n}\")\n\necho \"Pipeline complete!\"\n\nPattern 3: Parallel Processing\n\nRun multiple operations simultaneously.\n\n#!/bin/bash\n# parallel_generation.sh - Generate multiple assets in parallel\n\n# Start all jobs in background\ninfsh app run falai/flux-dev --input '{\"prompt\": \"Hero image...\"}' > hero.json &\nPID1=$!\n\ninfsh app run falai/flux-dev --input '{\"prompt\": \"Feature image 1...\"}' > feature1.json &\nPID2=$!\n\ninfsh app run falai/flux-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\nPattern 4: Conditional Workflow\n\nBranch based on results.\n\n#!/bin/bash\n# conditional_workflow.sh - Process based on content analysis\n\nINPUT_TEXT=\"$1\"\n\n# Analyze content\nANALYSIS=$(infsh app run openrouter/claude-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/flux-dev --input '{\"prompt\": \"Celebration, success, happy\"}'\n    ;;\n  *negative*)\n    echo \"Generating supportive message...\"\n    infsh app run openrouter/claude-sonnet-45 --input \"{\n      \\\"prompt\\\": \\\"Write a supportive, encouraging response to: $INPUT_TEXT\\\"\n    }\"\n    ;;\n  *)\n    echo \"Generating neutral acknowledgment...\"\n    ;;\nesac\n\nPattern 5: Retry with Fallback\n\nHandle failures gracefully.\n\n#!/bin/bash\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/flux-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/imagen-3 --input \"{\\\"prompt\\\": \\\"$prompt\\\"}\"\n}\n\ngenerate_with_retry \"A beautiful sunset over mountains\"\n\nScheduled Automation\nCron Job Setup\n# Edit crontab\ncrontab -e\n\n# Daily content generation at 9 AM\n0 9 * * * /path/to/daily_content.sh >> /var/log/ai-automation.log 2>&1\n\n# Weekly report every Monday at 8 AM\n0 8 * * 1 /path/to/weekly_report.sh >> /var/log/ai-automation.log 2>&1\n\n# Every 6 hours: social media content\n0 */6 * * * /path/to/social_content.sh >> /var/log/ai-automation.log 2>&1\n\nDaily Content Script\n#!/bin/bash\n# daily_content.sh - Run daily at 9 AM\n\nDATE=$(date +%Y-%m-%d)\nOUTPUT_DIR=\"/output/$DATE\"\nmkdir -p \"$OUTPUT_DIR\"\n\n# Generate daily quote image\ninfsh app run falai/flux-dev --input '{\n  \"prompt\": \"Motivational quote background, minimalist, morning vibes\"\n}' > \"$OUTPUT_DIR/quote_image.json\"\n\n# Generate daily tip\ninfsh app run openrouter/claude-haiku-45 --input '{\n  \"prompt\": \"Give me one actionable productivity tip for today. Be concise.\"\n}' > \"$OUTPUT_DIR/daily_tip.json\"\n\n# Post to social (optional)\n# infsh app run twitter/post-tweet --input \"{...}\"\n\necho \"Daily content generated: $DATE\"\n\nMonitoring and Logging\nLogging Wrapper\n#!/bin/bash\n# logged_workflow.sh - With comprehensive logging\n\nLOG_FILE=\"/var/log/ai-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/flux-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\nError Alerting\n#!/bin/bash\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://your-webhook.com/alert\" \\\n      -H \"Content-Type: application/json\" \\\n      -d \"{\\\"error\\\": \\\"$result\\\", \\\"command\\\": \\\"$*\\\"}\"\n  fi\n\n  echo \"$result\"\n  return $status\n}\n\nrun_with_alert infsh app run falai/flux-dev --input '{\"prompt\": \"test\"}'\n\nPython SDK Automation\n#!/usr/bin/env 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/{date_str}\")\n    output_dir.mkdir(parents=True, exist_ok=True)\n\n    # Generate image\n    image = run_infsh(\"falai/flux-dev\", {\n        \"prompt\": f\"Daily inspiration for {date_str}, beautiful, uplifting\"\n    })\n    (output_dir / \"image.json\").write_text(json.dumps(image))\n\n    # Generate caption\n    caption = run_infsh(\"openrouter/claude-haiku-45\", {\n        \"prompt\": \"Write an inspiring caption for a daily motivation post. 2-3 sentences.\"\n    })\n    (output_dir / \"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\nWorkflow Templates\nContent Calendar Automation\n#!/bin/bash\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/flux-dev --input \"{\n    \\\"prompt\\\": \\\"$TOPIC theme, $DAY motivation, social media style\\\"\n  }\" > \"content/${DAY}_image.json\"\n\n  # Caption\n  infsh app run openrouter/claude-haiku-45 --input \"{\n    \\\"prompt\\\": \\\"Write a $DAY motivation post about $TOPIC. Include hashtags.\\\"\n  }\" > \"content/${DAY}_caption.json\"\ndone\n\nData Processing Pipeline\n#!/bin/bash\n# data_processing.sh - Process and analyze data files\n\nINPUT_DIR=\"./data/raw\"\nOUTPUT_DIR=\"./data/processed\"\n\nfor file in \"$INPUT_DIR\"/*.txt; do\n  filename=$(basename \"$file\" .txt)\n\n  # Analyze content\n  infsh app run openrouter/claude-haiku-45 --input \"{\n    \\\"prompt\\\": \\\"Analyze this data and provide key insights in JSON format: $(cat $file)\\\"\n  }\" > \"$OUTPUT_DIR/${filename}_analysis.json\"\n\ndone\n\nBest Practices\nRate limiting - Add delays between API calls\nError handling - Always check return codes\nLogging - Track all operations\nIdempotency - Design for safe re-runs\nMonitoring - Alert on failures\nBackups - Save intermediate results\nTimeouts - Set reasonable limits\nRelated Skills\n# Content pipelines\nnpx skills add inference-sh/skills@ai-content-pipeline\n\n# RAG pipelines\nnpx skills add inference-sh/skills@ai-rag-pipeline\n\n# Social media automation\nnpx skills add inference-sh/skills@ai-social-media-content\n\n# Full platform skill\nnpx skills add inference-sh/skills@inference-sh\n\n\nBrowse all apps: infsh app list"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/okaris/ai-automation-workflows",
    "publisherUrl": "https://clawhub.ai/okaris/ai-automation-workflows",
    "owner": "okaris",
    "version": "0.1.5",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/ai-automation-workflows",
    "downloadUrl": "https://openagent3.xyz/downloads/ai-automation-workflows",
    "agentUrl": "https://openagent3.xyz/skills/ai-automation-workflows/agent",
    "manifestUrl": "https://openagent3.xyz/skills/ai-automation-workflows/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/ai-automation-workflows/agent.md"
  }
}