Automated summary
Manages the lifecycle of Temporal workflows in Python: starting, stopping, debugging, and troubleshooting.
Strengths
- Automates repetitive tasks (starting server, workers).
- Powerful diagnostics for stalled or failed workflows.
- Handles non-determinism with analysis and fixes.
- Easy worker cleanup to avoid conflicts.
Limitations
- Requires a Python environment with Temporal SDK installed.
- Scripts are designed for local development, not production.
- May be complex for beginners unfamiliar with Temporal.
Use this skill when developing or debugging Temporal workflows in Python locally.
Avoid this skill for production deployments or if you are not using the Temporal Python SDK.
Security analysis
SafeThe skill only runs predefined scripts within a sandboxed directory, managing local development Temporal server and workers. No destructive or data-exfiltrating commands are used.
No concerns found
How this analysis is madeExamples
Start Temporal server, launch a worker, and run the starter to execute a workflow. Then wait for completion and retrieve the result.Find stalled workflows, analyze the error for workflow ID abc123, and check the worker logs for clues.I have a non-determinism error in my Temporal workflow. Analyze the issue and fix it by terminating the old workflow and starting a fresh one.name: temporal-python description: "Start, stop, debug, and troubleshoot Temporal workflows for Python projects. Use when: starting workers, executing workflows, workflow is stalled/failed, non-determinism errors, checking workflow status, or managing temporal server start-dev lifecycle." version: 1.1.0 allowed-tools: "Bash(.claude/skills/temporal/scripts/:), Read"
Temporal Skill
Manage Temporal workflows using local development server (Python SDK, temporal server start-dev).
Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| CLAUDE_TEMPORAL_LOG_DIR | /tmp/claude-temporal-logs | Worker log directory |
| CLAUDE_TEMPORAL_PID_DIR | /tmp/claude-temporal-pids | Worker PID directory |
| TEMPORAL_ADDRESS | localhost:7233 | Temporal server gRPC address |
| TEMPORAL_WORKER_CMD | uv run worker | Command to start worker |
Quick Start
# 1. Start server
./scripts/ensure-server.sh
# 2. Start worker (kills old workers, starts fresh)
./scripts/ensure-worker.sh
# 3. Execute workflow
uv run starter # Capture workflow_id from output
# 4. Wait for completion
./scripts/wait-for-workflow-status.sh --workflow-id <id> --status COMPLETED
# 5. Get result (verify it's correct, not an error message)
./scripts/get-workflow-result.sh --workflow-id <id>
# 6. CLEANUP: Kill workers when done
./scripts/kill-worker.sh
Common Recipes
Clean Start
./scripts/kill-all-workers.sh
./scripts/ensure-server.sh
./scripts/ensure-worker.sh
uv run starter
Debug Stalled Workflow
./scripts/find-stalled-workflows.sh
./scripts/analyze-workflow-error.sh --workflow-id <id>
tail -100 $CLAUDE_TEMPORAL_LOG_DIR/worker-$(basename "$(pwd)").log
# See references/troubleshooting.md for decision tree
Clear Stalled Environment
./scripts/find-stalled-workflows.sh
./scripts/bulk-cancel-workflows.sh
./scripts/kill-worker.sh
./scripts/ensure-worker.sh
Check Recent Results
./scripts/list-recent-workflows.sh --minutes 30
./scripts/get-workflow-result.sh --workflow-id <id>
Key Scripts
| Script | Purpose |
|--------|---------|
| ensure-server.sh | Start dev server if not running |
| ensure-worker.sh | Kill old workers, start fresh one |
| kill-worker.sh | Kill current project's worker |
| kill-all-workers.sh | Kill all workers (--include-server option) |
| find-stalled-workflows.sh | Detect stalled workflows |
| analyze-workflow-error.sh | Extract errors from history |
| wait-for-workflow-status.sh | Block until status reached |
| get-workflow-result.sh | Get workflow output |
See references/tool-reference.md for full details.
References (Load When Needed)
| Reference | When to Read |
|-----------|--------------|
| references/concepts.md | Understanding workflow vs activity tasks, component architecture |
| references/troubleshooting.md | Workflow stalled, failed, or misbehaving - decision tree and fixes |
| references/error-reference.md | Looking up specific error types and recovery steps |
| references/tool-reference.md | Script options and worker management details |
| references/interactive-workflows.md | Signals, updates, queries for human-in-the-loop workflows |
| references/logs.md | Log file locations and search commands |
Critical Rules
- Always kill workers when done - Don't leave stale workers running
- One worker instance only - Multiple workers cause non-determinism
- Capture workflow_id - You need it for all monitoring/troubleshooting
- Verify results - COMPLETED status doesn't mean correct result; check payload
- Non-determinism: analyze first - Use
analyze-workflow-error.shto understand the mismatch. If accidental: fix code to match history. If intentional v2 change: terminate and start fresh. Seereferences/troubleshooting.md
Design-to-Dev Specification Writer
Development
Translate your mockups into technical specifications for developers.
Exports & Barrel Files
Development
Defines conventions for module exports and barrel files: named exports only, no flat wildcards (except `export * as Name` for compound components), sectioned comments, types alongside values, and one export line per source file. Helps maintain consistent, tree-shakeable exports in portal apps using Turbopack or similar bundlers.
Write an Agent Skill
Development
Step-by-step guide to create a structured Agent Skill for coding agents, including directory structure, SKILL.md format, and design principles.