agentleFS
gh-xjgh-xj/agent-repo-kit/skills/taskfile-authoring/SKILL.md

taskfile-authoring

Skill0 starsChanged 6 months agoMITView on GitHub

Use when writing, creating, or refactoring Taskfile.yml for any project (Go CLI, Python uv, or generic). Covers go-task v3 features — includes/sub-Taskfiles, sources/generates/method build cache, deps vs cmds, canonical CI/verify surface. Triggers on "write Taskfile", "create Taskfile.yml", "refactor Taskfile", "Taskfile.dev", "go-task", "sub-taskfile", "build cache", "task lint", "includes", "dotenv".

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write lean, composable, verification-first Taskfiles for go-task v3.

    line 8
  2. Distinctive:

    Use this skill when:

    line 13
  3. Distinctive:

    Do not use for:

    line 21

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Taskfile Authoring

Write lean, composable, verification-first Taskfiles for go-task v3. Keep the surface small, the cache correct, and the composition transparent.

When To Use

Use this skill when:

  • Writing a new Taskfile.yml from scratch.
  • Adding tasks to an existing Taskfile (before, not after, the diff).
  • Refactoring an overgrown Taskfile (too many tasks, duplicated cmds).
  • Splitting work into included sub-Taskfiles (includes:).
  • Wiring sources: / generates: / method: for build caching.

Do not use for:

  • CI platform configs (.github/workflows/*.yml) — that is not go-task.
  • Makefiles, just recipes, or npm scripts — different tooling, different semantics.
  • Pure shell scripts with no task runner — use a scripts/ directory instead.
  • Designing the command contract for a skill-local CLI — use skill-cli-authoring, then return here to wire build, smoke, ci, and verify.

Core Premise

Three properties keep a Taskfile healthy:

  1. Lean surface: few top-level tasks, each with a clear desc:. If a contributor cannot read the task --list output and guess what to run, there are already too many.
  2. Composable: included sub-Taskfiles with explicit {{.TASKFILE_DIR}} paths, so an overlay dropped into any repo Just Works.
  3. Verification-first: one canonical ci task that CI runs verbatim, and one verify task that wraps ci plus any repo-specific extras (work checks, wiki lint, etc.). No branching logic in CI.

The Canonical Aggregate Surface (advisory)

Most repos benefit from this shape:

  • fmt — format in place
  • lint — static checks
  • test — run tests
  • build — produce artifact(s)
  • ci — aggregate: depends on lint, test, build (plus smoke where applicable). This is what CI runs.
  • verify — wraps ci and adds repo-specific gates (e.g. work/wiki checks).

This is advisory — see references/canonical-surface.md for rationale and per-stack task counts.

Build Cache: sources / status / preconditions

Three mechanisms, three different jobs:

  • preconditions: — fail loudly if the environment is wrong (tool missing, file absent). Runs before the task body.
  • status: — skip if "already up to date." You write the check. All commands must exit 0 for the task to be skipped. No automatic source tracking.
  • sources: + generates: + method: — automatic fingerprinting. Use method: checksum (default, CI-safe). Never method: timestamp in CI — git clone resets mtimes, so the task always runs.

Full decision flow and per-use-case recipes in references/build-cache.md.

Composition (includes:)

Two composition modes:

  • flatten: true — transparent overlay. Included tasks become top-level. Use when a convention pack ships a Taskfile fragment and callers should type task verify, not task conventions:verify.
  • Explicit dir: with a namespace key — genuine sub-domain. Use for work:check, wiki:lint, docs:build — things that feel like separate areas of the repo.

Variable precedence is surprising: the included file's own vars: win over the includer's includes.ns.vars: (pattern: use {{.FOO | default "..."}} inside the included file to make values overridable). Full precedence table and path-resolution rules in references/composition.md.

Reference & Template Index

TopicFile
Canonical ci / verify patternreferences/canonical-surface.md
includes: deep dive, variable scopereferences/composition.md
sources / status / preconditionsreferences/build-cache.md
Go CLI patterns (advisory)references/stack-go-cli.md
Python + uv patterns (advisory)references/stack-uv-python.md
Before/after anti-patternsreferences/anti-patterns.md
Minimal generic starterreferences/templates/Taskfile.generic.yml
Go CLI starter (with build cache)references/templates/Taskfile.go-cli.yml
uv + typer starterreferences/templates/Taskfile.uv.yml

Boundaries

  • Stack guidance (Go, uv) is advisory.
  • The skill does not opinionate on CI platform (.github/workflows/*.yml).
  • For skill-local CLIs, this skill owns Taskfile wiring only. Command grammar, safety classes, JSON contracts, and plan/apply semantics belong to skill-cli-authoring.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.