[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EFXAAGVCWCE2HE7JGYAN5V":3,"skill-same:01M6EFXAAGVCWCE2HE7JGYAN5V":59},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M6EFXAAGVCWCE2HE7JGYAN5V","prefect",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fprefect\u002FSKILL.md",[],[5],"2026-11-10 10:12:30",false,"# Prefect\n\nPrefect turns Python functions into observable, schedulable workflows with minimal boilerplate. Add `@flow` and `@task` decorators to get retries, logging, caching, and a monitoring UI.\n\n## Installation\n\n```bash\n# Install Prefect\npip install prefect\n\n# Start the local Prefect server (UI + API)\nprefect server start\n# UI at http:\u002F\u002Flocalhost:4200\n\n# Or use Prefect Cloud (managed)\nprefect cloud login\n```\n\n## Basic Flow\n\n```python\n# flows\u002Fhello.py: Simple flow with tasks\nfrom prefect import flow, task, get_run_logger\nfrom datetime import timedelta\n\n@task(retries=3, retry_delay_seconds=10)\ndef fetch_data(url: str) -> dict:\n    import httpx\n    logger = get_run_logger()\n    logger.info(f\"Fetching {url}\")\n    response = httpx.get(url)\n    response.raise_for_status()\n    return response.json()\n\n@task(cache_expiration=timedelta(hours=1))\ndef transform(data: dict) -> list:\n    return [\n        {\"id\": item[\"id\"], \"value\": item[\"amount\"] * 100}\n        for item in data[\"results\"]\n    ]\n\n@task\ndef load(records: list) -> int:\n    logger = get_run_logger()\n    logger.info(f\"Loading {len(records)} records\")\n    # Insert into database...\n    return len(records)\n\n@flow(name=\"etl-pipeline\", log_prints=True)\ndef etl_pipeline(api_url: str = \"https:\u002F\u002Fapi.example.com\u002Fdata\"):\n    raw = fetch_data(api_url)\n    cleaned = transform(raw)\n    count = load(cleaned)\n    print(f\"Processed {count} records\")\n    return count\n\nif __name__ == \"__main__\":\n    etl_pipeline()\n```\n\n## Scheduling and Deployments\n\n```python\n# flows\u002Fdeploy.py: Create a deployment with schedule\nfrom prefect import flow\nfrom prefect.deployments import Deployment\nfrom prefect.server.schemas.schedules import CronSchedule\n\n@flow\ndef daily_report():\n    print(\"Generating daily report...\")\n\nif __name__ == \"__main__\":\n    # Deploy via Python\n    daily_report.serve(\n        name=\"daily-report-deployment\",\n        cron=\"0 8 * * *\",  # Every day at 8 AM\n        tags=[\"reporting\"],\n        parameters={\"param1\": \"value1\"},\n    )\n```\n\n```bash\n# deploy.sh: Deploy and manage via CLI\n# Create deployment from flow file\nprefect deploy flows\u002Fhello.py:etl_pipeline \\\n  --name etl-prod \\\n  --pool default-agent-pool \\\n  --cron \"*\u002F30 * * * *\"\n\n# Start a worker to execute deployments\nprefect worker start --pool default-agent-pool\n\n# Trigger a deployment run\nprefect deployment run \"etl-pipeline\u002Fetl-prod\" --param api_url=https:\u002F\u002Fapi.example.com\n```\n\n## Error Handling and Concurrency\n\n```python\n# flows\u002Fadvanced.py: Concurrent tasks, error handling, and sub-flows\nfrom prefect import flow, task\nfrom prefect.tasks import task_input_hash\nimport asyncio\n\n@task(\n    retries=2,\n    retry_delay_seconds=[10, 60],  # Exponential backoff\n    cache_key_fn=task_input_hash,\n    timeout_seconds=300,\n)\ndef process_item(item_id: int) -> dict:\n    # Process a single item\n    return {\"id\": item_id, \"status\": \"done\"}\n\n@flow\ndef batch_process(item_ids: list[int]):\n    # Submit tasks concurrently\n    futures = [process_item.submit(id) for id in item_ids]\n    results = [f.result() for f in futures]\n\n    succeeded = [r for r in results if r[\"status\"] == \"done\"]\n    print(f\"Processed {len(succeeded)}\u002F{len(item_ids)} items\")\n\n@flow\nasync def async_pipeline():\n    # Async flow for I\u002FO-bound work\n    results = await asyncio.gather(\n        fetch_from_api(\"source_a\"),\n        fetch_from_api(\"source_b\"),\n    )\n    return results\n```\n\n## Blocks and Infrastructure\n\n```python\n# flows\u002Fblocks.py: Use blocks for reusable configuration\nfrom prefect.blocks.system import Secret, JSON\nfrom prefect_sqlalchemy import SqlAlchemyConnector\n\n# Store secrets (set via UI or CLI)\n# prefect block register -m prefect_sqlalchemy\n# Then configure in UI at http:\u002F\u002Flocalhost:4200\u002Fblocks\n\n# Use in flows\n@flow\ndef db_flow():\n    api_key = Secret.load(\"my-api-key\").get()\n    config = JSON.load(\"pipeline-config\").value\n\n    with SqlAlchemyConnector.load(\"prod-db\") as conn:\n        result = conn.fetch_all(\"SELECT count(*) FROM users\")\n        print(result)\n```\n\n## Notifications\n\n```python\n# flows\u002Fnotifications.py: Send alerts on failure\nfrom prefect import flow\nfrom prefect.blocks.notifications import SlackWebhook\n\n@flow\ndef monitored_flow():\n    try:\n        # ... do work\n        pass\n    except Exception as e:\n        slack = SlackWebhook.load(\"alerts-channel\")\n        slack.notify(f\"❌ Pipeline failed: {e}\")\n        raise\n\n# Or use automations in Prefect UI:\n# Automations → Create → Trigger: Flow run failed → Action: Send Slack notification\n```\n\n## CLI Reference\n\n```bash\n# cli.sh: Common Prefect CLI commands\n# Check connection\nprefect version\nprefect config view\n\n# List flows and deployments\nprefect flow-run ls\nprefect deployment ls\n\n# View logs\nprefect flow-run logs \u003Cflow-run-id>\n\n# Manage work pools\nprefect work-pool create my-pool --type process\nprefect work-pool ls\n```\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Fprefect",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":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill prefect",{"tool":37,"command":38},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill prefect",{"tool":40,"command":41},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill prefect","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fprefect\u002FSKILL.md",true,[45,51,55],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"code-quality-reviewer-prompt.md","REFERENCE","参考文档",630,"https:\u002F\u002Fgithub.com\u002FThamielis\u002F.agents\u002Fblob\u002Fmain\u002Fskills\u002Fsubagent-driven-development\u002Fcode-quality-reviewer-prompt.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"implementer-prompt.md",2195,"https:\u002F\u002Fgithub.com\u002FThamielis\u002F.agents\u002Fblob\u002Fmain\u002Fskills\u002Fsubagent-driven-development\u002Fimplementer-prompt.md",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"spec-reviewer-prompt.md",1999,"https:\u002F\u002Fgithub.com\u002FThamielis\u002F.agents\u002Fblob\u002Fmain\u002Fskills\u002Fsubagent-driven-development\u002Fspec-reviewer-prompt.md",[60,74,84,93,99,106],{"skillNo":61,"name":62,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":70,"publishedAt":18},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[65],{"categoryNo":66,"categoryName":67,"taxonomyType":68,"taxonomyTypeDesc":69},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[71,72,73],"model","model hierarchy","model hierarchy skill",{"skillNo":75,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":80,"publishedAt":18},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[79],{"categoryNo":66,"categoryName":67,"taxonomyType":68,"taxonomyTypeDesc":69},[81,82,83],"MCP","zoom","zoom mcp",{"skillNo":85,"name":86,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":18},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[90,91,92,82],"sdk","zoom apps sdk","apps",{"skillNo":94,"name":95,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[95],{"skillNo":100,"name":101,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":105,"publishedAt":18},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[104],{"categoryNo":66,"categoryName":67,"taxonomyType":68,"taxonomyTypeDesc":69},[101],{"skillNo":107,"name":108,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":18},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[108]]