Agent skill
Just CLI
This skill should be used when the user asks to "create a justfile", "write just recipes", "configure just settings", "add just modules", "use just attributes", "set up task automation", mentions justfile, just command runner, or task automation with just.
Install this agent skill to your Project
npx add-skill https://github.com/jakmaz/dotfiles/tree/main/opencode/skill/just-cli
SKILL.md
Just Command Runner
Overview
Expert guidance for Just, a command runner with syntax inspired by make. Use this skill for creating justfiles, writing recipes, configuring settings, and implementing task automation workflows.
Key capabilities:
- Create and organize justfiles with proper structure
- Write recipes with attributes, dependencies, and parameters
- Configure settings for shell, modules, and imports
- Use built-in constants for terminal formatting
- Implement check/write patterns for code quality tools
Important Style Guidelines:
- Keep justfiles minimal and clean
- Do not use emojis in recipes or output
- Use small dividers
# ---for grouping instead of large section headers - Focus on functionality over decoration
Quick Reference
Common Attributes
| Attribute | Purpose |
|---|---|
[group("name")] |
Group recipes in just --list output |
[no-cd] |
Don't change to justfile directory |
[private] |
Hide from just --list (same as _ prefix) |
[script] |
Execute recipe as single script block |
[script("interpreter")] |
Use specific interpreter (bash, python, etc.) |
[confirm("prompt")] |
Require user confirmation before running |
[doc("text")] |
Override recipe documentation |
[positional-arguments] |
Enable positional args for this recipe only |
Multiple attributes can be combined:
[no-cd, private]
[group("checks")]
recipe:
echo "hello"
Built-in Constants
Terminal formatting constants are globally available (no definition needed):
| Constant | Description |
|---|---|
CYAN, GREEN, RED, YELLOW, BLUE, PURPLE |
Text colors |
BOLD, ITALIC, UNDERLINE, STRIKETHROUGH |
Text styles |
NORMAL |
Reset formatting |
BG_* |
Background colors (BG_RED, BG_GREEN, etc.) |
HEX, HEXLOWER |
Hexadecimal digits |
Usage:
@status:
echo -e '{{ GREEN }}Success!{{ NORMAL }}'
echo -e '{{ BOLD + CYAN }}Building...{{ NORMAL }}'
Key Functions
# Require executable exists (fails recipe if not found)
jq := require("jq")
# Get environment variable with default
log_level := env("LOG_LEVEL", "info")
# Get justfile directory path
root := justfile_dir()
Recipe Patterns
Status Reporter Pattern
Display formatted status during multi-step workflows:
@_run-with-status recipe *args:
echo ""
echo -e '{{ CYAN }}Running {{ recipe }}...{{ NORMAL }}'
just {{ recipe }} {{ args }}
echo -e '{{ GREEN }}{{ recipe }} completed{{ NORMAL }}'
alias rws := _run-with-status
Check/Write Pattern
Pair check (verify) and write (fix) recipes for code quality tools:
[group("checks")]
@biome-check +globs=".":
na biome check {{ globs }}
alias bc := biome-check
[group("checks")]
@biome-write +globs=".":
na biome check --write {{ globs }}
alias bw := biome-write
Full Check/Write Pattern
Aggregate all checks with status reporting:
[group("checks")]
@full-check:
just _run-with-status biome-check
just _run-with-status prettier-check
just _run-with-status tsc-check
echo ""
echo -e '{{ GREEN }}All code checks passed!{{ NORMAL }}'
alias fc := full-check
[group("checks")]
@full-write:
just _run-with-status biome-write
just _run-with-status prettier-write
echo ""
echo -e '{{ GREEN }}All code fixes applied!{{ NORMAL }}'
alias fw := full-write
Standard Alias Conventions
| Recipe | Alias | Recipe | Alias |
|---|---|---|---|
| full-check | fc | full-write | fw |
| biome-check | bc | biome-write | bw |
| prettier-check | pc | prettier-write | pw |
| mdformat-check | mc | mdformat-write | mw |
| tsc-check | tc | ruff-check | rc |
| test | t | build | b |
Modules & Imports
Import Pattern
Include recipes from another file:
import "./just/settings.just"
import "./just/base.just"
import? "./local.just" # Optional (no error if missing)
Module Pattern
Load submodule (requires set unstable):
mod foo # Loads foo.just or foo/justfile
mod bar "path/to/bar" # Custom path
mod? optional # Optional module
# Call module recipes
just foo::build
Devkit Import Pattern
For projects using @sablier/devkit:
import "./node_modules/@sablier/devkit/just/base.just"
import "./node_modules/@sablier/devkit/just/npm.just"
Section Organization
For minimal organization, use small dividers only when grouping is needed:
# --- Dependencies ---
# Bun: https://bun.sh
bun := require("bun")
# --- Main Commands ---
# Show available commands
default:
@just --list
Common sections (in order):
- Dependencies - Required tools with URLs
- Constants - Glob patterns, environment vars
- Main Commands - Primary entry points
- Checks - Code quality recipes
- Utilities - Private helpers
Default Recipe
Always define a default recipe:
# Show available commands
default:
@just --list
Dependencies Declaration
Document required tools at the top:
# --- Dependencies ---
# Bun: https://bun.sh
bun := require("bun")
# Ni: https://github.com/antfu-collective/ni
na := require("na")
ni := require("ni")
nlx := require("nlx")
Context7 Fallback
For Just features not covered in this skill (new attributes, advanced functions, edge cases), fetch the latest documentation:
Use context7 MCP with library ID `/websites/just_systems-man` to get up-to-date Just documentation.
Example topics to search:
modules import mod- Module system detailssettings- All available settingsattributes- Recipe attributesfunctions- Built-in functionsscript recipes- Script block syntax
Additional Resources
Reference Files
For detailed patterns and comprehensive coverage, consult:
references/just-features.md- Complete settings, modules, attributes, functions referencereferences/patterns.md- Established conventions, section organization, helper patterns
External Documentation
- Official Manual: https://just.systems/man/en/
- GitHub Repository: https://github.com/casey/just
- Context7 Library ID:
/websites/just_systems-man
Important Limitations
Just does not support flags. Recipe parameters are positional only:
# WRONG: Flags don't work
build --release: # This won't work!
# CORRECT: Use positional parameters
build mode="debug":
cargo build {{ if mode == "release" { "--release" } else { "" } }}
# Usage: just build release
For complex flag-like behavior, use environment variables or positional parameters with defaults.
Tips
- Use
@prefix to suppress command echo:@echo "quiet" - Use
+for variadic parameters:test +args - Use
*for optional variadic:build *flags - Quote glob patterns in variables:
GLOBS := "\"**/*.json\"" - Use
[no-cd]in monorepos to stay in current directory - Private recipes start with
_or use[private] - Always define aliases after recipe names for discoverability
- Keep output clean and minimal - avoid emojis and decorative elements
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
typst
Typst document creation and package development. Use when: (1) Working with .typ files, (2) User mentions typst, typst.toml, or typst-cli, (3) Creating or using Typst packages, (4) Developing document templates, (5) Converting Markdown/LaTeX to Typst
frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
nextjs-motion-animations
Motion-based animation system for Next.js with performance-optimized patterns
mochi-flashcard
Creates language flashcards in Mochi Cards via API. Use this skill whenever the user wants to add, save, or create a flashcard for a Dutch or Spanish word, phrase, verb, noun, adjective, or adverb. Triggers on inputs like "add X to Mochi", "create a card for X", "save X as a flashcard", or any time the user provides a foreign word/phrase and wants it stored. Always use this skill — don't just explain what to do, actually call the API.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
Didn't find tool you were looking for?