taskfile
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
text/template+ slim-sprig functions - 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
Taskfile.ymland project scripts (package.json, Makefile, CI configs). - Decide whether to:
- add tasks to existing Taskfile,
- split into included Taskfiles,
- or bootstrap a fresh Taskfile.
- Prefer small, composable tasks with clear
descand predictable variables.
Core implementation rules
- Keep root schema on
version: '3'unless user needs stricter semver gating. - Use
descon user-facing tasks sotask --listis useful. - Use
internal: truefor helper tasks not meant for direct invocation. - Use
depsfor parallelizable prerequisites; usecmds: - task: ...for ordered execution. - Use
requires.varsfor mandatory inputs and enum constraints for safety. - Use
sources+generates(orstatus) to skip unnecessary work. - Use
preconditionsfor hard-fail checks (missing tools/files/env). - Use
ifto conditionally skip tasks without failing. - Use task-level
dirwhen running in subfolders/services.
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
defaultor clearly documented entrypoint task when useful; - 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.yml,examples/monorepo-taskfile.yml
High-value patterns to prefer
1) Safe deploy tasks
promptfor confirmationrequires.varsfor environment selectionpreconditionsfor required secrets/tools
2) Fast local dev loops
- a top-level
devtask that fans out to service tasks watchwhere appropriate- clear task aliases for common commands
3) Incremental builds/codegen
sourcesandgeneratesfor deterministic re-runsmethod: checksumfor content-sensitive workflowsmethod: timestamponly when filesystem mtime behavior is desired
4) Monorepo composition
includeswith namespacesflattenonly when naming collisions are controlledexcludesfor clashing task names
Anti-patterns to avoid
- Giant single tasks that hide multiple concerns.
- Relying on shell state shared between separate commands.
- Omitting
descon user-facing tasks. - Using
--forceroutinely instead of modelingsources/statuscorrectly. - Putting sensitive values directly in Taskfiles when env/dotenv is more appropriate.
Minimal quality checklist
Before finishing, verify:
task --listis readable and meaningful.- Required variables are enforced (
requires). - Tasks run from expected directories (
dir,USER_WORKING_DIRwhen needed). - Incremental tasks have correct invalidation (
sources/generates/status). - Task names and namespaces are consistent and predictable.
More from aaronflorey/agent-skills
amber-lang
Write, debug, and explain Amber code, the `amber` language that compiles `.ab` files to Bash. Use this skill when the user asks to write an Amber script, convert Bash to Amber, compile Amber to Bash, debug Amber syntax or type errors, or asks about Amber 0.5.1-alpha syntax, functions, types, error handling, the standard library, or the `amber` CLI.
26go-cobra
Write, scaffold, and debug Go CLI applications with `github.com/spf13/cobra`. Use this skill whenever the user mentions Cobra, `cobra.Command`, a Go command-line app, subcommands, persistent or local flags, required flags, argument validation, shell completions, generated docs, or wants to build or refactor a cobra-based CLI.
24laravel-actions
Write, scaffold, explain, and refactor code using the `lorisleiva/laravel-actions` package. Use this skill whenever the user mentions Laravel Actions, `AsAction`, `php artisan make:action`, action classes, converting a controller, job, listener, or command into an action, dispatching an action as a job, using an action as a controller or listener, or adding validation, authorization, testing, or mocking around an action.
24num30-config
Write, debug, and explain Go configuration code using `github.com/num30/config`. Use this skill when the user mentions `num30/config`, wants config structs, file plus env plus CLI flag loading, validation, config watching, precedence rules, or asks how to integrate the num30/config package into a Go application.
22pelican-panel-plugins
Write, scaffold, explain, and debug plugins for the Pelican gaming panel. Use this skill whenever the user mentions Pelican plugins, extending Pelican, FilamentPHP resources or pages for Pelican, plugin service providers, custom permissions, plugin settings, routes, models, widgets, or asks how to add new functionality to the Pelican panel.
21go-viper
Write, debug, and explain Go configuration code with `github.com/spf13/viper`. Use this skill whenever the user mentions Viper, `viper`, config structs, reading config from files plus env vars plus flags, Cobra or `pflag` integration, unmarshaling into structs, env key replacers, config precedence, config watching, or a clean Viper bootstrap.
20