Agent Skills
› NeverSight/learn-skills.dev
› taskfile
taskfile
GitHub用于构建、调试和重构 Taskfile.yml 自动化配置。支持 go-task CLI,涵盖依赖管理、模板、缓存及 Makefile 迁移等场景。
Trigger Scenarios
用户提及 Taskfile, go-task, task
涉及任务依赖、包含、变量或模板配置
使用 sources/generates 进行缓存优化
跨目录拆分任务文件或从 Makefile/npm 迁移
Install
npx skills add NeverSight/learn-skills.dev --skill taskfile -g -y
SKILL.md
Frontmatter
{
"name": "taskfile",
"source": "https:\/\/taskfile.dev\/llms-full.txt",
"license": "MIT",
"version": "1.0.0",
"description": "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."
}
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.
Version History
- e0220ca Current 2026-07-05 22:10


