Learn-skills.dev taskfile
Build, debug, and refactor `Taskfile.yml` or `Taskfile.yaml` automation using go-task and the `task` CLI. Use this skill whenever the user mentions Taskfile, go-task, `task`, task dependencies, includes, variables, templates, `sources` or `generates` caching, taskfiles split across directories, or migrating Makefiles or npm scripts to Task.
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/aaronflorey/agent-skills/taskfile" ~/.claude/skills/neversight-learn-skills-dev-taskfile && rm -rf "$T"
manifest:
data/skills-md/aaronflorey/agent-skills/taskfile/SKILL.mdsource content
Taskfile Skill
Use this skill to create production-grade
Taskfile.yml automation for local dev, CI, and monorepos.
Task is a YAML task runner with:
- dependency graphs (
)deps - templating via Go
+ slim-sprig functionstext/template - incremental execution (
,sources
,generates
,status
)method - task composition via
includes
What to do first
- Identify the user's goal (dev workflow, build, test, release, codegen, deploy).
- Inspect existing
and project scripts (Taskfile.yml
, Makefile, CI configs).package.json - Decide whether to:
- add tasks to existing Taskfile,
- split into included Taskfiles,
- or bootstrap a fresh Taskfile.
- Prefer small, composable tasks with clear
and predictable variables.desc
Core implementation rules
- Keep root schema on
unless user needs stricter semver gating.version: '3' - Use
on user-facing tasks sodesc
is useful.task --list - Use
for helper tasks not meant for direct invocation.internal: true - Use
for parallelizable prerequisites; usedeps
for ordered execution.cmds: - task: ... - Use
for mandatory inputs and enum constraints for safety.requires.vars - Use
+sources
(orgenerates
) to skip unnecessary work.status - Use
for hard-fail checks (missing tools/files/env).preconditions - Use
to conditionally skip tasks without failing.if - Use task-level
when running in subfolders/services.dir
Output expectations
When writing or editing Taskfiles:
- return valid YAML that can run as-is;
- include concise comments only for non-obvious behavior;
- include at least one
or clearly documented entrypoint task when useful;default - include practical examples of calling tasks (with variables and
CLI args) in your response.--
Routing guide
- Schema keys and valid shapes:
references/schema-and-model.md - Templating and special variables:
references/templating-and-vars.md - Execution model, caching, and reliability:
references/execution-patterns.md - CLI flags, debug flow, and troubleshooting:
references/cli-and-debugging.md - Ready-to-copy Taskfiles:
,examples/basic-taskfile.ymlexamples/monorepo-taskfile.yml
High-value patterns to prefer
1) Safe deploy tasks
for confirmationprompt
for environment selectionrequires.vars
for required secrets/toolspreconditions
2) Fast local dev loops
- a top-level
task that fans out to service tasksdev
where appropriatewatch- clear task aliases for common commands
3) Incremental builds/codegen
andsources
for deterministic re-runsgenerates
for content-sensitive workflowsmethod: checksum
only when filesystem mtime behavior is desiredmethod: timestamp
4) Monorepo composition
with namespacesincludes
only when naming collisions are controlledflatten
for clashing task namesexcludes
Anti-patterns to avoid
- Giant single tasks that hide multiple concerns.
- Relying on shell state shared between separate commands.
- Omitting
on user-facing tasks.desc - Using
routinely instead of modeling--force
/sources
correctly.status - Putting sensitive values directly in Taskfiles when env/dotenv is more appropriate.
Minimal quality checklist
Before finishing, verify:
is readable and meaningful.task --list- Required variables are enforced (
).requires - Tasks run from expected directories (
,dir
when needed).USER_WORKING_DIR - Incremental tasks have correct invalidation (
/sources
/generates
).status - Task names and namespaces are consistent and predictable.