using-mise-tasks

Run and define mise tasks with mise.toml and file task syntax.

8|1|Updated Jul 16, 2013
One-click install
npx skills add https://github.com/844196/dotfiles --skill using-mise-tasks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-mise-tasks
Source: https://github.com/844196/dotfiles/tree/main/files/dot_claude/exact_local-marketplace/exact_mise/exact_skills/exact_using-mise-tasks
Command: npx skills add https://github.com/844196/dotfiles --skill using-mise-tasks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

mise タスク機能の使い方。以下のいずれかに当てはまる作業では必ずこのスキルを参照する — モデルが学習データで混同しがちな mise 固有の構文を避けるため:

  • mise run でのタスク実行(引数・フラグの渡し方。---q/-v/-h/--help などの予約フラグ pass-through 専用)
  • mise.toml[tasks.*] の読み書き(rundependsdepends_postusagesourcesoutputstoolsdirraw
  • ファイルタスク (.mise/tasks/mise-tasks/.config/mise/tasks/ 等) の作成・編集(shebang、実行権限、#MISE / #USAGE ディレクティブ)
  • monorepo タスク — experimental_monorepo_root//path:task 絶対指定、//packages/...:* のパス×タスクワイルドカード、パッケージ間依存
  • mise tasks --all --json などタスク調査コマンドの使い分け

対象外(別機能): mise use/mise install などの tool・version 管理、shim 設定、top-level [env] セクション、mise.lock の運用、.mise.toml 以外の設定ファイル配置。

Using mise Tasks

mise のタスク機能を正しく使うためのガイドライン。ここでは、TOML タスクとファイルタスクの使い分け、モノリポ構成でのタスク参照、主要オプション、環境変数、引数定義の基本を解説します。

  1. タスクの実行 mise run を使ってタスクを実行し、引数・フラグの渡し方や予約フラグのパススルーを理解します。TOML タスクとファイルタスクの定義方法、mise.toml / .config/mise/tasks/ の編集手順を学びます。

  2. Monorepo タスク monorepoRoot 設定と絶対パス/ワイルドカードの使い分け、他プロジェクトのタスク依存の指定方法を理解します。

  3. 主要な設定オプション run、depends、depends_post、env、dir、sources、outputs、tools、usage、raw など、タスク定義の主要フィールドと動作を把握します。

  4. 環境変数 mise 実行時の環境変数の使い方と参照方法を理解します。

  5. 引数の定義 TOML タスクの usage 形式とファイルタスクの #USAGE ヘッダの取り扱いを学びます。

Quick Start

Ask to run a basic mise task with mise run and reference how to define either a TOML task or a file task in a monorepo.

Frequently Asked Questions about using-mise-tasks

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

FAQPage Schema
How do I define and run mise tasks in a monorepo?

Define mise tasks in `mise.toml` under `[tasks.*]` or as file tasks in `.mise/tasks/`, then execute them with `mise run`. In monorepos, reference tasks across packages using absolute `//path:task` syntax or `//packages/...:*` wildcard patterns.

What is the difference between TOML tasks and file tasks in mise?

TOML tasks are defined inline in `mise.toml` using fields like `run`, `depends`, and `sources`, while file tasks are executable scripts placed in `.mise/tasks/` that use shebangs and `#MISE` or `#USAGE` directives for metadata and argument definitions.

How do I pass arguments and flags correctly when running mise tasks?

Pass arguments directly to `mise run` after the task name. Use `--` specifically to pass through reserved flags like `-q`, `-v`, `-h`, and `--help` to the underlying task script, preventing mise from intercepting them.

Can I use wildcard patterns to run tasks across multiple monorepo packages?

Yes, mise supports `//packages/...:*` wildcards to run tasks across multiple monorepo packages simultaneously. Enable this by setting `experimental_monorepo_root` and configure inter-package task dependencies using absolute path references.

What configuration fields are available for mise task definitions?

mise task definitions support fields including `run`, `depends`, `depends_post`, `env`, `dir`, `sources`, `outputs`, `tools`, `usage`, and `raw`. These fields enforce task dependencies, set environment variables, and track file inputs and outputs.

Why are my mise task flags not being passed correctly to the script?

Reserved flags like `-q`, `-v`, and `-h` are intercepted by mise unless you use `--` as a separator for pass-through. This prevents misinterpretation of mise-specific syntax during task execution and ensures flags reach your script correctly.