taskfiles

Create and maintain Taskfile definitions with consistent namespaces and schema headers.

1|Updated Apr 6, 2025
One-click install
npx skills add https://github.com/david-driscoll/stargate-command-cluster --skill taskfiles-david-driscoll
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: taskfiles
Source: https://github.com/david-driscoll/stargate-command-cluster/tree/main/.agents/skills/taskfiles
Command: npx skills add https://github.com/david-driscoll/stargate-command-cluster --skill taskfiles-david-driscoll

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Taskfiles drift over time and become inconsistent, confusing, or unsafe to use, especially in infrastructure repositories with many namespaces and contributors.

Core Features & Use Cases

  • Repository-specific Taskfile conventions: Standardizes how root Taskfile.yaml includes .taskfiles/ namespaces and how each namespace declares tasks.
  • Reusable Taskfile patterns: Documents proven patterns for wildcard tasks, helper/internal tasks, preconditions, source tracking, and dynamic variables.
  • Consistent templates for new tasks: Ensures new Taskfiles follow the Task (taskfile.dev) schema and version header and maintain consistent structure and wiring.

Quick Start

Ask the skill to generate a new Taskfile for the db namespace that follows the repository template, includes the required schema/version header, and uses the established wildcard and precondition patterns.

Frequently Asked Questions about taskfiles

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep Taskfile yaml definitions consistent across a large infrastructure repository?

To keep Taskfile yaml definitions consistent, standardize root Taskfile.yaml includes and .taskfiles/ namespaces using required schema headers, wildcard task patterns, and preconditions. This prevents task drift and maintains reliable repository task automation.

What's the best way to organize Taskfile namespaces for repeated infrastructure operations like power-on or terraform plan?

Organize Taskfile namespaces by creating .taskfiles/ subdirectories for each domain, enabling invocations like task tg:plan-<stack> or task inv:power-on-<host>. Use wildcard task patterns with MATCH and labeling to handle repeated operations dynamically.

How do I add preconditions to a Taskfile for safe task automation?

Add preconditions to a Taskfile by declaring validation rules within task definitions. Preconditions verify required environment variables, files, or dependencies before execution, preventing unsafe task invocations and ensuring repository infrastructure workflows run reliably.

Can I use wildcard task patterns in Taskfile.yaml to handle dynamic arguments?

Yes, you can use wildcard task patterns in Taskfile.yaml to handle dynamic arguments. Combine MATCH patterns with CLI pass-through using the double dash separator to route variable inputs to specific task namespaces efficiently.

Does a Taskfile namespace require a specific schema or version header?

Yes, a Taskfile namespace requires a specific schema and version header. Including the required Taskfile schema version header at the top of root and included yaml files ensures correct parsing and maintains compatibility with taskfile.dev conventions.

Why do my Taskfile includes drift and become inconsistent over time?

Taskfile includes drift over time due to unmanaged contributions across many namespaces without enforced conventions. Applying standardized templates, internal helper tasks, and required schema headers prevents inconsistent or unsafe task definitions in infrastructure repositories.