From cf71067dc62a447fb3a855d86cfc1f8435f3f95a Mon Sep 17 00:00:00 2001 From: Egutierrez Date: Fri, 27 Mar 2026 02:20:58 +0100 Subject: [PATCH] Fix dagu-auto skill: add common errors table for Dagu v2.3+ Added explicit rules for working_dir (not dir), type: graph with depends, and snake_case step IDs. These caused validation failures in practice. Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/skills/dagu-auto/SKILL.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.claude/skills/dagu-auto/SKILL.md b/.claude/skills/dagu-auto/SKILL.md index 4139c5d..44ece9b 100644 --- a/.claude/skills/dagu-auto/SKILL.md +++ b/.claude/skills/dagu-auto/SKILL.md @@ -209,10 +209,23 @@ Test: OK - Usar `retry_policy` en steps que pueden fallar (HTTP, SSH) - Usar `output:` para pasar datos entre steps +## Errores comunes (Dagu v2.3+) + +| Error | Causa | Solución | +|-------|-------|----------| +| `use snake_case keys (dir -> working_dir)` | Usaste `dir:` en un step | Cambiar a `working_dir:` | +| `depends field is not allowed for DAGs with type 'chain'` | Usaste `depends:` sin declarar el tipo de DAG | Añadir `type: graph` al nivel raíz del DAG | +| `invalid step ID format: must match ^[a-zA-Z][a-zA-Z0-9_]*$` | Guiones medios en step IDs | Usar solo `snake_case` en IDs: `git_push`, no `git-push` | + +**Regla de oro: SIEMPRE usar `working_dir` (no `dir`), `type: graph` si hay `depends`, y `snake_case` en step IDs.** + ## Reglas - SIEMPRE verificar que Dagu está instalado antes de crear DAGs - SIEMPRE validar el DAG después de crearlo +- SIEMPRE usar `working_dir` para el directorio de trabajo de un step (NO `dir`) +- SIEMPRE usar `type: graph` cuando algún step tiene `depends` +- SIEMPRE usar snake_case en step IDs (`mi_paso`, no `mi-paso`) - NUNCA crear crontabs — usar Dagu schedule en su lugar - NUNCA usar rutas relativas en commands — usar rutas absolutas - NUNCA hardcodear secretos — usar `secrets:` o `env:` con referencias