Agents justfile-dev
install
source · Clone the upstream repo
git clone https://github.com/aRustyDev/agents
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/aRustyDev/agents "$T" && mkdir -p ~/.claude/skills && cp -r "$T/content/skills/justfile-dev" ~/.claude/skills/arustydev-agents-justfile-dev && rm -rf "$T"
manifest:
content/skills/justfile-dev/SKILL.mdsource content
Justfile Development
Workflows for authoring, reviewing, planning, and updating justfiles with the
just command runner.
When to Use
- Creating a new justfile for a project
- Adding or modifying recipes
- Reviewing a justfile for quality issues
- Planning which recipes a project needs
- Upgrading a justfile as a project matures
- Converting a Makefile to a justfile
- Setting up monorepo module structure
Workflows
Author
When creating a new justfile or adding recipes.
New Justfile Scaffold:
set shell := ["bash", "-cu"] default: @just --list # ============================================================================= # Development # ============================================================================= # Build the project [group('dev')] build: <build-command> # ============================================================================= # Testing # ============================================================================= # Run test suite [group('test')] test: <test-command> # ============================================================================= # Code Quality # ============================================================================= # Format code [group('lint')] fmt: <fmt-command> # Run linter [group('lint')] lint: <lint-command> # ============================================================================= # Utilities # ============================================================================= # Remove build artifacts [group('util')] [confirm('Remove all build artifacts?')] clean: <clean-command>
Recipe Writing Rules:
| Rule | Example |
|---|---|
Always add | |
| Doc comment above every recipe | |
Private helpers start with | |
on destructive ops | |
| Prefer parameters over env vars | |
| Single responsibility | Compose with dependencies |
No chaining | Use separate lines or deps |
No | Use |
Adding Recipes to Existing Justfiles:
- Identify the correct group (see Standard Groups below)
- Place recipe near related recipes in the same section
- Add doc comment
- Add
attribute[group] - If destructive, add
[confirm]
Review
Use this checklist when reviewing justfiles.
## Justfile Review - [ ] `set shell` declared at top - [ ] All recipes grouped with `[group('name')]` - [ ] Every recipe has a doc comment - [ ] No ungrouped recipes (except `default`) - [ ] Private helpers prefixed with `_` - [ ] Destructive recipes use `[confirm]` - [ ] No `cd` usage (use `[working-directory]`) - [ ] No `&&` chaining (use dependencies or separate lines) - [ ] No secrets in justfile (env vars or `op://`) - [ ] `default` recipe shows `just --list` - [ ] Section separators between groups - [ ] Recipe names are kebab-case - [ ] No monolithic recipes (compose from focused ones) - [ ] Parameters preferred over env vars for inputs
Common Issues:
| Issue | Fix |
|---|---|
Missing | Add at top |
| Ungrouped recipes | Add attribute |
| Missing doc comments | Add above recipe |
in recipe body | Use |
chaining | Split into separate lines or deps |
| Hardcoded secrets | Replace with or |
| God recipe doing everything | Split into focused recipes, compose with deps |
Plan
Use when deciding what recipes a project needs.
3-Question Assessment:
| Question | Yes | No |
|---|---|---|
| Has CI? | Add quality gates (coverage, check-all) | Skip quality recipes |
| Deploys to prod? | Add security + deploy recipes | Skip deploy/security |
| Multiple languages? | Add module structure | Keep single justfile |
Recipe Sets by Project Type:
| Project Type | Baseline | Quality | Deploy | Modules |
|---|---|---|---|---|
| Rust CLI | build, test, lint, fmt, clean | coverage, bench, release | docker | — |
| Rust lib | build, test, lint, fmt, docs | coverage, bench | release | — |
| Web app | build, test, lint, fmt, dev | coverage | docker, deploy | if polyglot |
| Monorepo | orchestrate, default | per-package | per-service | yes |
| MCP server | build, test, lint, fmt | coverage | docker, release | — |
Decision: Single File vs Modules:
| Criteria | Single | Modules |
|---|---|---|
| Recipe count | < 20 | > 20 |
| Languages | 1 | 2+ |
| Repo structure | flat | monorepo/workspace |
| Shared recipes | none | CDN imports needed |
Convert
When migrating from a Makefile to a justfile.
Steps:
- Map targets to recipes (all recipes are phony — no
needed).PHONY - Add
at topset shell := ["bash", "-cu"] - Add
recipe withdefault@just --list - Group recipes with
and add section separators[group('name')] - Add doc comments above each recipe
- Fix anti-patterns (see translations below)
- Add
to destructive recipes[confirm] - Validate:
shows grouped, documented recipesjust --list
Makefile → just Translations:
| Makefile | just |
|---|---|
| Not needed (all recipes are phony) |
| (same syntax) |
| attribute |
| Separate lines in recipe body |
| |
| (same) |
| at top |
| |
Update
When upgrading an existing justfile.
Maturity Progression:
| Level | When | Add |
|---|---|---|
| 0: Baseline | Every project | default, build, test, lint, fmt, clean |
| 1: Quality | CI/CD added | coverage, test-watch, check-all, bench |
| 2: Security | Deploying | audit, sbom, doctor |
| 3: Production | Prod systems | deploy, migrate, logs, status |
| 4: Polyglot | Multi-language | modules, orchestration |
YAGNI: Only add levels you currently need. Reassess when project scope changes.
Module Migration:
When a justfile exceeds ~20 recipes, consider splitting:
- Create
directoryjust/ - Move related recipes to
just/<group>.just - Add
to root justfileimport? "just/<group>.just" - Or use CDN:
mod name "https://just.arusty.dev/modules/<name>.just"
Quick Reference
Standard Groups
| Group | Purpose | Typical Recipes |
|---|---|---|
| Development | build, setup, install, watch, dev |
| Testing | test, coverage, bench, test-watch |
| Code quality | fmt, lint, clippy, check |
| Documentation | docs-build, docs-serve |
| Containers | docker-build, docker-run, docker-push |
| Publishing | release, version-bump, changelog |
| Maintenance | clean, update, doctor |
Essential Syntax
| Feature | Syntax |
|---|---|
| Settings | |
| Groups | |
| Confirm | |
| Working dir | |
| Private | |
| Parameters | |
| Default params | |
| Variadic | |
| Dependencies | |
| Param deps | |
| Conditional | |
| Shebang | |
| Script attr | |
| Optional import | |
| CDN module | |
Common Functions
| Function | Returns |
|---|---|
| , , |
| , |
| Environment variable value |
| With fallback |
| Dir containing justfile |
| Dir where was called |
aRustyDev Conventions
- Shell: always
set shell := ["bash", "-cu"] - CDN modules from
just.arusty.dev - Local modules in
withjust/import? - Gist templates via
(seejust apply-gist
rule)gist-templates - KuzuDB recipes follow
rulegraph-data-pattern
Language Patterns
Quick lookup — see
references/recipe-patterns.md for full details.
| Recipe | Rust | Go | TypeScript | Python |
|---|---|---|---|---|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
See Also
— full syntax referencereferences/syntax-quick-ref.md
— recipe patterns by category and languagereferences/recipe-patterns.md
— module system deep divereferences/module-system.md
— maturity assessment detailsreferences/maturity-model.md
— complete Rust CLI/lib justfileexamples/rust-project.just
— monorepo router patternexamples/monorepo-root.just
— aRustyDev conventions with gist templatesexamples/arustydev.just
— group definitions and orderingtables/standard-groups.md
— Rust/Go/TS/Python recipe matrixtables/language-recipes.md