← ClaudeAtlas

build-justfilelisted

Create or fully restructure a justfile so its recipes follow the de-facto conventions of prominent open-source justfiles. Use when writing a new justfile, cleaning up or normalizing an existing one, or porting a Makefile to just. Not for adding a recipe or two to an existing justfile — a normal edit covers that.
gitt510/agent-skills · ★ 0 · Data & Documents · score 70
Install: claude install-skill gitt510/agent-skills
# build-justfile justfile を「just エコシステムの誰が読んでも予想通りに動く command runner」として書く。 基準は個人の慣習ではなく、著名 OSS の justfile から実測できる de-facto convention。 de-facto の出典は実測した justfile 群: `casey/just`(作者本人)・`oxc-project/oxc`・ `eza-community/eza`・`FuelLabs/sway` ほか。ルールはこれらに共通する形だけを採る。 どれかが独自にやっているだけの癖は採らない。 新規作成でも全面再構築でも、適用するルールは同じ。再構築のときは既存 recipe を 1 本ずつ convention に照合し、名前・引数・コメントを de-facto 側に寄せる。 挙動(何を実行するか)は変えない — 変えるのは並べ方・名前・見え方だけ。 ## ルール ### 1. 先頭は private な `_default` で `just --list` 引数なしの `just` は「何ができるか」の一覧であるべきで、いきなり何かを実行してはいけない。 先頭 recipe が default として走るので、そこに一覧表示を置く。 ```just _default: @just --list ``` `_` 始まりにするのは、この案内用 recipe 自身を `just --list` の一覧から隠すため。 定義順が workflow 順を表すなら `@just --list --unsorted` でもよい。 ### 2. recipe 名は verb / verb-noun kebab recipe は「実行する動作」なので、名前は動詞で始めると `just build` のように命令として読める。 関連する recipe は共通の動詞・名詞を prefix にして kebab-case でまとめる (`db-migrate` / `db-generate`、`test-unit` / `test-e2e`)。この prefix が緩い grouping も兼ねる。 例外は status / report を「見る」だけの recipe。これらは名詞のほうが自然に読める (`doctor`・`status`・`ci`・`changelog`)。動詞を無理に付けない。 ### 3. 可変長引数は小文字 `*args` で pass-through 下位ツールにフラグをそのまま渡したいときは末尾に `*args` を置く。 実測した OSS はすべて小文字 `*args` / `+args`。大文字 `*ARGS` は使わない (位置引数 `server` / `version` などと casing を揃えるため)。 ```just # Run the test suite; extra flags pass through (e.g. just test -k slow) test *args: pytest {{args}} ``` ### 4. コメントは英語の 1 行 doc-comment recipe 直上の `#` コメントは `just --list` にそのまま説明として表示される — つまり recipe の UI。英語で、命令形の短い 1 行にする ("Run the test suite"、"De