julia-external-cmd/SKILL.md
Run and orchestrate external programs from Julia using Cmd objects, backtick command literals, interpolation, quoting, pipelines, and IO redirection. Use this skill when replacing shell scripts with Julia, building subprocess pipelines, setting command environments, or troubleshooting subprocess deadlocks and quoting issues.
npx skillsauth add krastanov/juliallmagentskills julia-external-cmdInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use Julia backtick command literals and Cmd APIs to run subprocesses without shell ambiguity.
Backticks produce Cmd, they do not execute immediately:
cmd = `echo hello`
run(cmd)
text = readchomp(cmd)
Remember: Julia executes commands directly (no implicit shell), so quoting/interpolation follows Julia command rules, not shell expansion.
$value to pass one argument safely, including paths with spaces.Use pipeline instead of shell metacharacters in command literals:
run(pipeline(`cut -d: -f3 /etc/passwd`, `sort -n`, `tail -n5`))
Use & to run producers in parallel and merge output into downstream stages.
When both writing and reading, actively consume output:
read(out, String) over waiting on process completion alone.Use Cmd(...) keywords and env helpers:
Cmd(cmd; dir=..., env=..., detach=..., ignorestatus=...)setenv(cmd, pairs...)addenv(cmd, pairs...)Use open(cmd, mode, ...) for stream-style interaction.
Many shell built-ins on Windows are not external executables; invoke cmd /C ... when necessary.
references/cmd-pipeline-patterns.md - command composition and subprocess IO patternsjulia-async - task-based orchestration around process IOjulia-comonicon - Julia CLI development once command patterns are stabledevelopment
Fix trailing whitespace and ensure files end with newlines. Use this skill when preparing code for commit or when whitespace issues are detected.
development
Parse and write YAML in Julia with YAML.jl, including load/load_file/load_all APIs, dictionary type customization, anchors/aliases behavior, and write/write_file emission. Use this skill when reading YAML configs, converting YAML to Julia structures, or generating YAML outputs from Julia data.
development
Parse and write TOML in Julia using the TOML standard library (TOML.jl), including parse/tryparse APIs, ParserError handling, Parser reuse, and TOML.print serialization options. Use this skill when reading or generating TOML config files such as Project.toml, Manifest snippets, or other TOML-based settings.
development
Implement and debug Julia multithreading with Threads.@threads, Threads.@spawn, threadpools, locks, atomics, and race-avoidance patterns. Use this skill when parallelizing CPU work, configuring Julia thread counts, fixing data races, or handling thread-specific caveats such as task migration.