{"id":"28c8e7e7-1121-42cf-baf0-b0b3a0ca9a47","shortId":"jbVsPR","kind":"skill","title":"python-temporal","tagline":"Temporal workflow orchestration in Python. Use when designing workflows, implementing activities, handling retries, managing workflow state, or building durable distributed systems.","description":"# Temporal Workflow Orchestration\n\nTemporal SDK patterns for building durable, distributed workflows in Python.\n\n## Worker Setup\n\n```python\nfrom temporalio.client import Client\nfrom temporalio.worker import Worker\n\nasync def main():\n    client = await Client.connect(\"localhost:7233\")\n\n    worker = Worker(\n        client,\n        task_queue=\"my-task-queue\",\n        workflows=[MyWorkflow],\n        activities=[my_activity],\n    )\n\n    await worker.run()\n```\n\n## Workflow Definition\n\n```python\nfrom temporalio import workflow\nfrom datetime import timedelta\n\n@workflow.defn\nclass MyWorkflow:\n    @workflow.run\n    async def run(self, name: str) -> str:\n        \"\"\"Workflow run method\"\"\"\n        # Execute activity\n        result = await workflow.execute_activity(\n            my_activity,\n            name,\n            start_to_close_timeout=timedelta(seconds=30),\n        )\n\n        return f\"Hello {result}\"\n```\n\n## Activity Implementation\n\n```python\nfrom temporalio import activity\n\n@activity.defn\nasync def my_activity(name: str) -> str:\n    \"\"\"Activity - can fail and retry\"\"\"\n    # Do work (database, API, etc.)\n    return name.upper()\n```\n\n## Starting Workflows\n\n```python\nfrom temporalio.client import Client\n\nasync def start_workflow():\n    client = await Client.connect(\"localhost:7233\")\n\n    handle = await client.start_workflow(\n        MyWorkflow.run,\n        \"World\",\n        id=\"my-workflow-id\",\n        task_queue=\"my-task-queue\",\n    )\n\n    result = await handle.result()\n    print(result)  # \"Hello WORLD\"\n```\n\n## Error Handling\n\n```python\nfrom temporalio.exceptions import ActivityError\n\n@workflow.defn\nclass MyWorkflow:\n    @workflow.run\n    async def run(self) -> str:\n        try:\n            result = await workflow.execute_activity(\n                risky_activity,\n                start_to_close_timeout=timedelta(seconds=30),\n                retry_policy=RetryPolicy(maximum_attempts=3),\n            )\n        except ActivityError as e:\n            # Handle failure after retries exhausted\n            return \"Failed\"\n\n        return result\n```\n\n## Signals and Queries\n\n```python\n@workflow.defn\nclass OrderWorkflow:\n    def __init__(self):\n        self.status = \"pending\"\n\n    @workflow.run\n    async def run(self, order_id: str) -> str:\n        await workflow.wait_condition(lambda: self.status == \"approved\")\n        return \"Order processed\"\n\n    @workflow.signal\n    def approve(self):\n        \"\"\"Signal to approve order\"\"\"\n        self.status = \"approved\"\n\n    @workflow.query\n    def get_status(self) -> str:\n        \"\"\"Query current status\"\"\"\n        return self.status\n```\n\nSee references/ for testing patterns and common workflow patterns.","tags":["python","temporal","atelier","martinffx","agent-skills","agentic-coding","anthropic","claude-code","claude-skills","code-review","codex","codex-skill"],"capabilities":["skill","source-martinffx","skill-python-temporal","topic-agent-skills","topic-agentic-coding","topic-anthropic","topic-claude-code","topic-claude-skills","topic-code-review","topic-codex","topic-codex-skill","topic-opencode","topic-prompt-engineering","topic-sdd","topic-spec-driven-development"],"categories":["atelier"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/martinffx/atelier/python-temporal","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add martinffx/atelier","source_repo":"https://github.com/martinffx/atelier","install_from":"skills.sh"}},"qualityScore":"0.461","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 23 github stars · SKILL.md body (2,670 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:05:23.736Z","embedding":null,"createdAt":"2026-05-10T07:03:12.508Z","updatedAt":"2026-05-18T19:05:23.736Z","lastSeenAt":"2026-05-18T19:05:23.736Z","tsv":"'3':220 '30':113,214 '7233':56,160 'activ':14,68,70,99,103,105,118,124,129,133,205,207 'activity.defn':125 'activityerror':191,222 'api':141 'approv':260,266,270,273 'async':49,88,126,152,196,247 'attempt':219 'await':53,71,101,157,162,179,203,255 'build':21,32 'class':85,193,239 'client':44,52,59,151,156 'client.connect':54,158 'client.start':163 'close':109,210 'common':291 'condit':257 'current':281 'databas':140 'datetim':81 'def':50,89,127,153,197,241,248,265,275 'definit':74 'design':11 'distribut':23,34 'durabl':22,33 'e':224 'error':185 'etc':142 'except':221 'execut':98 'exhaust':229 'f':115 'fail':135,231 'failur':226 'get':276 'handl':15,161,186,225 'handle.result':180 'hello':116,183 'id':167,171,252 'implement':13,119 'import':43,47,78,82,123,150,190 'init':242 'lambda':258 'localhost':55,159 'main':51 'manag':17 'maximum':218 'method':97 'my-task-queu':62,174 'my-workflow-id':168 'myworkflow':67,86,194 'myworkflow.run':165 'name':92,106,130 'name.upper':144 'orchestr':6,27 'order':251,262,271 'orderworkflow':240 'pattern':30,289,293 'pend':245 'polici':216 'print':181 'process':263 'python':2,8,37,40,75,120,147,187,237 'python-tempor':1 'queri':236,280 'queue':61,65,173,177 'refer':286 'result':100,117,178,182,202,233 'retri':16,137,215,228 'retrypolici':217 'return':114,143,230,232,261,283 'riski':206 'run':90,96,198,249 'sdk':29 'second':112,213 'see':285 'self':91,199,243,250,267,278 'self.status':244,259,272,284 'setup':39 'signal':234,268 'skill' 'skill-python-temporal' 'source-martinffx' 'start':107,145,154,208 'state':19 'status':277,282 'str':93,94,131,132,200,253,254,279 'system':24 'task':60,64,172,176 'tempor':3,4,25,28 'temporalio':77,122 'temporalio.client':42,149 'temporalio.exceptions':189 'temporalio.worker':46 'test':288 'timedelta':83,111,212 'timeout':110,211 'topic-agent-skills' 'topic-agentic-coding' 'topic-anthropic' 'topic-claude-code' 'topic-claude-skills' 'topic-code-review' 'topic-codex' 'topic-codex-skill' 'topic-opencode' 'topic-prompt-engineering' 'topic-sdd' 'topic-spec-driven-development' 'tri':201 'use':9 'work':139 'worker':38,48,57,58 'worker.run':72 'workflow':5,12,18,26,35,66,73,79,95,146,155,164,170,292 'workflow.defn':84,192,238 'workflow.execute':102,204 'workflow.query':274 'workflow.run':87,195,246 'workflow.signal':264 'workflow.wait':256 'world':166,184","prices":[{"id":"ce95779d-6665-4a1f-8129-bac91ed1a075","listingId":"28c8e7e7-1121-42cf-baf0-b0b3a0ca9a47","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"martinffx","category":"atelier","install_from":"skills.sh"},"createdAt":"2026-05-10T07:03:12.508Z"}],"sources":[{"listingId":"28c8e7e7-1121-42cf-baf0-b0b3a0ca9a47","source":"github","sourceId":"martinffx/atelier/python-temporal","sourceUrl":"https://github.com/martinffx/atelier/tree/main/skills/python-temporal","isPrimary":false,"firstSeenAt":"2026-05-10T07:03:12.508Z","lastSeenAt":"2026-05-18T19:05:23.736Z"}],"details":{"listingId":"28c8e7e7-1121-42cf-baf0-b0b3a0ca9a47","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"martinffx","slug":"python-temporal","github":{"repo":"martinffx/atelier","stars":23,"topics":["agent-skills","agentic-coding","anthropic","claude-code","claude-skills","code-review","codex","codex-skill","opencode","prompt-engineering","sdd","spec-driven-development"],"license":"mit","html_url":"https://github.com/martinffx/atelier","pushed_at":"2026-05-18T06:56:45Z","description":"An atelier for Opencode, Claude Code, and other coding agents: spec-driven workflows, deep thinking, and code quality.","skill_md_sha":"fd9faccab384174a81c42710139be54541d05d83","skill_md_path":"skills/python-temporal/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/martinffx/atelier/tree/main/skills/python-temporal"},"layout":"multi","source":"github","category":"atelier","frontmatter":{"name":"python-temporal","description":"Temporal workflow orchestration in Python. Use when designing workflows, implementing activities, handling retries, managing workflow state, or building durable distributed systems."},"skills_sh_url":"https://skills.sh/martinffx/atelier/python-temporal"},"updatedAt":"2026-05-18T19:05:23.736Z"}}