task-runner について
task-runnerは、クロスプラットフォームのコマンドランナーjustでプロジェクト固有のコマンドを実行するスキルです。利用可能なレシピの確認や、テスト、ビルド、lintなどの実行方法を扱います。
主な機能
- 01利用可能なレシピの一覧表示
- 02レシピの詳細確認
- 03プロジェクト定義コマンドの実行
- 04テスト、ビルド、lintの実行
活用シーン
- 01新しいプロジェクトのコマンド確認
- 02プロジェクトのテストやビルドの実行
- 03実行前のレシピ詳細の確認
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ 0xdarkmatter/ claude-mods --skill task-runnerインストール後、Claude Code で/task-runnerを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
assets/.gitkeepreferences/.gitkeepscripts/.gitkeep詳細
タスクランナー
目的
make よりシンプルで、クロスプラットフォームで動作する最新のコマンドランナーである just を使用して、プロジェクト固有のコマンドを実行します。
ツール
| ツール | コマンド | 用途 |
|---|---|---|
| just | just | 利用可能なレシピを一覧表示する |
| just | just test | 特定のレシピを実行する |
使用例
基本的な使い方
# List all available recipes
just
# Run a recipe
just test
just build
just lint
# Run recipe with arguments
just deploy production
# Run specific recipe from subdirectory
just --justfile backend/justfile test
よく使われる justfile のレシピ
# Example justfile
# Run tests
test:
pytest tests/
# Build project
build:
npm run build
# Lint code
lint:
ruff check .
eslint src/
# Start development server
dev:
npm run dev
# Clean build artifacts
clean:
rm -rf dist/ build/ *.egg-info/
# Deploy to environment
deploy env:
./scripts/deploy.sh {{env}}
確認
# Check if justfile exists
just --summary
# Show recipe details
just --show test
# List recipes with descriptions
just --list
使用する場面
- 最初に確認する場合:
justを実行して、利用可能なプロジェクトコマンドを確認します - テストを実行する場合:
just test - ビルドする場合:
just build - プロジェクト固有のタスクを実行する場合
- クロスプラットフォームでコマンドを実行する場合
ベストプラクティス
新しいプロジェクトに入ったら、必ず justfile を確認します:
just --list
ドキュメントを読まずに、利用可能なコマンドを確認できます。
コメント
Markdown 対応