Synthèse automatique
Gère le cycle de vie de workflows Temporal en Python : démarrage, arrêt, débogage et résolution de problèmes.
Points forts
- Automatisation des tâches répétitives (démarrage du serveur, des workers).
- Outils de diagnostic puissants pour workflows bloqués ou en échec.
- Gestion des non-déterminismes avec analyse et correction.
- Nettoyage facile des workers pour éviter les conflits.
Limites
- Nécessite un environnement Python avec Temporal SDK installé.
- Les scripts sont conçus pour un usage local, pas pour la production.
- Peut être complexe pour les débutants non familiers avec Temporal.
Utilisez cette compétence lorsque vous développez ou dépannez des workflows Temporal en Python localement.
Évitez cette compétence pour des déploiements en production ou si vous n'utilisez pas le SDK Python de Temporal.
Analyse de sécurité
SûrThe skill only runs predefined scripts within a sandboxed directory, managing local development Temporal server and workers. No destructive or data-exfiltrating commands are used.
Aucun point d'attention détecté
Comment cette analyse est faiteExemples
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
Specification Design-to-Dev
Developpement
Traduisez vos maquettes en specifications techniques pour les developpeurs.
Patterns d'exports et fichiers barrel
Developpement
Définit les conventions pour les exports de modules et les fichiers baril : exports nommés uniquement, pas de wildcards plats (sauf `export * as Name` pour les composants composés), commentaires par section, types exportés avec les valeurs, et une ligne d'export par fichier source. Aide à maintenir des exports cohérents et optimisés pour le tree-shaking dans les applications portal utilisant Turbopack ou des bundlers similaires.
Créer une compétence d'agent
Developpement
Guide étape par étape pour créer une compétence d'agent structurée, incluant structure de répertoire, format SKILL.md et principes de conception.