Taskfile Setup
Install Taskfile and scaffold or audit Taskfile.yml configurations with ecosystem-aware templates.
Pre-flight
Run the detection script to understand current state:
python3 ${CLAUDE_SKILL_DIR}/scripts/detect_taskfile.py <project-root>
Decision Flow
Run detector
|
├── task_binary.installed = false → Install Task first
|
├── taskfile.exists = true → Phase 1: Audit
|
└── taskfile.exists = false → Phase 2: Scaffold
Phase 1: Audit (Existing Taskfile)
Summarize findings — show a status table:
| Component |
Status |
Detail |
| task binary |
installed/missing |
version, path |
| Taskfile |
found/not found |
path, variant |
| Tasks |
N tasks |
count, has includes |
| Ecosystems |
N detected |
list |
| dotenv |
configured/missing |
.env files found |
Present audit violations grouped by severity (ERROR > WARNING > INFO):
- Show rule ID, message, task name, line number, fix hint
- Violations include: missing version, no preconditions on deploy tasks, no sources/generates on build tasks, missing desc, too many tasks in single file, no dotenv, hard-coded paths
Use AskUserQuestion (multiSelect: true) — ask which violations to fix
Apply selected fixes — see WORKFLOW.md for per-rule fix strategies
Re-run detector to verify fixes were applied
Phase 2: Scaffold (No Taskfile)
Install task if missing — show commands based on os field:
- macOS:
brew install go-task
- Linux:
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
- Verify:
task --version
Review detected ecosystems — show what was found
Choose Taskfile pattern — use AskUserQuestion:
- Single-file (flat namespace with
: separators) — recommended for < 15 tasks
- Multi-file (root +
taskfiles/ with includes) — recommended for 15+ tasks or monorepos
Choose task groups — use AskUserQuestion (multiSelect: true):
| Ecosystem |
Available Groups |
| Node.js/pnpm |
dev, build, test, lint, format, check |
| JVM/Gradle |
build, test, lint, check, run |
| Python/uv |
dev, test, lint, format, check |
| Docker |
up, down, logs, build, clean |
| Generic |
setup, check, clean |
Generate Taskfile.yml with selected groups — always include:
version: "3"
desc: on every task
- Top-level
vars: for directory paths
dotenv: if .env files exist
Verify — re-run detector, then run task --list
Key Rules
- Never overwrite existing Taskfile.yml without asking. Offer merge/replace/skip.
- Detect first — skip steps already configured.
- Use
AskUserQuestion for every decision. Do not assume user preferences.
- Always use
version: "3" — the only supported non-deprecated schema.
- Add
desc: to every task for task --list discoverability.
- Wrap ecosystem tools (pnpm, gradlew, uv) — do not duplicate their logic.
- Use variables for directory paths instead of hard-coding.
- dotenv only in root — Taskfile does not support dotenv in included files.
Existing Runner Awareness
The detector reports existing runners (Makefile, justfile, package.json scripts, gradlew). When scaffolding:
- Note which runners exist and what they cover
- Suggest Taskfile as a unifying layer that wraps existing tools
- Do not duplicate what existing runners already do well
References
- Workflow: See WORKFLOW.md for detailed per-step flows and templates
- Examples: See EXAMPLES.md for example setup and audit sessions
- Troubleshooting: See TROUBLESHOOTING.md for common issues
- Detection Script: See scripts/detect_taskfile.py for detection logic
1---2name: taskfile-setup3description: Install Taskfile (task) and scaffold or audit Taskfile.yml configurations with ecosystem-aware templates. Auto-detects Node.js/pnpm, JVM/Gradle, Python/uv, Docker, and recommends single-file or multi-file (includes) patterns based on project complexity. Use when user runs /devtools:taskfile-setup, mentions "taskfile setup", "setup task runner", "audit taskfile", "scaffold taskfile", "add taskfile", "taskfile.yml", or "developer tasks".4---5
6# Taskfile Setup
7
8Install [Taskfile](https://taskfile.dev/) and scaffold or audit `Taskfile.yml` configurations with ecosystem-aware templates.
9
10## Pre-flight
11
12Run the detection script to understand current state:
13```bash
14python3 ${CLAUDE_SKILL_DIR}/scripts/detect_taskfile.py <project-root>
15```
16
17## Decision Flow
18
19```
20Run detector
21 |
22 ├── task_binary.installed = false → Install Task first
23 |
24 ├── taskfile.exists = true → Phase 1: Audit
25 |
26 └── taskfile.exists = false → Phase 2: Scaffold
27```
28
29## Phase 1: Audit (Existing Taskfile)
30
311. **Summarize findings** — show a status table:
32
33 | Component | Status | Detail |
34 |-----------|--------|--------|
35 | task binary | installed/missing | version, path |
36 | Taskfile | found/not found | path, variant |
37 | Tasks | N tasks | count, has includes |
38 | Ecosystems | N detected | list |
39 | dotenv | configured/missing | .env files found |
40
412. **Present audit violations** grouped by severity (ERROR > WARNING > INFO):
42 - Show rule ID, message, task name, line number, fix hint
43 - Violations include: missing version, no preconditions on deploy tasks, no sources/generates on build tasks, missing desc, too many tasks in single file, no dotenv, hard-coded paths
44
453. **Use `AskUserQuestion`** (multiSelect: true) — ask which violations to fix
46
474. **Apply selected fixes** — see [WORKFLOW.md](WORKFLOW.md) for per-rule fix strategies
48
495. **Re-run detector** to verify fixes were applied
50
51## Phase 2: Scaffold (No Taskfile)
52
531. **Install `task`** if missing — show commands based on `os` field:
54 - **macOS**: `brew install go-task`
55 - **Linux**: `sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin`
56 - Verify: `task --version`
57
582. **Review detected ecosystems** — show what was found
59
603. **Choose Taskfile pattern** — use `AskUserQuestion`:
61 - **Single-file** (flat namespace with `:` separators) — recommended for < 15 tasks
62 - **Multi-file** (root + `taskfiles/` with includes) — recommended for 15+ tasks or monorepos
63
644. **Choose task groups** — use `AskUserQuestion` (multiSelect: true):
65
66 | Ecosystem | Available Groups |
67 |-----------|-----------------|
68 | Node.js/pnpm | `dev`, `build`, `test`, `lint`, `format`, `check` |
69 | JVM/Gradle | `build`, `test`, `lint`, `check`, `run` |
70 | Python/uv | `dev`, `test`, `lint`, `format`, `check` |
71 | Docker | `up`, `down`, `logs`, `build`, `clean` |
72 | Generic | `setup`, `check`, `clean` |
73
745. **Generate Taskfile.yml** with selected groups — always include:
75 - `version: "3"`
76 - `desc:` on every task
77 - Top-level `vars:` for directory paths
78 - `dotenv:` if `.env` files exist
79
806. **Verify** — re-run detector, then run `task --list`
81
82## Key Rules
83
84- **Never overwrite** existing Taskfile.yml without asking. Offer merge/replace/skip.
85- **Detect first** — skip steps already configured.
86- **Use `AskUserQuestion`** for every decision. Do not assume user preferences.
87- **Always use `version: "3"`** — the only supported non-deprecated schema.
88- **Add `desc:`** to every task for `task --list` discoverability.
89- **Wrap ecosystem tools** (pnpm, gradlew, uv) — do not duplicate their logic.
90- **Use variables** for directory paths instead of hard-coding.
91- **dotenv only in root** — Taskfile does not support dotenv in included files.
92
93## Existing Runner Awareness
94
95The detector reports existing runners (Makefile, justfile, package.json scripts, gradlew). When scaffolding:
96- Note which runners exist and what they cover
97- Suggest Taskfile as a **unifying layer** that wraps existing tools
98- Do not duplicate what existing runners already do well
99
100## References
101
102- **Workflow**: See [WORKFLOW.md](WORKFLOW.md) for detailed per-step flows and templates
103- **Examples**: See [EXAMPLES.md](EXAMPLES.md) for example setup and audit sessions
104- **Troubleshooting**: See [TROUBLESHOOTING.md](TROUBLESHOOTING.md) for common issues
105- **Detection Script**: See [scripts/detect_taskfile.py](scripts/detect_taskfile.py) for detection logic