Julia development guidelines covering multiple dispatch, type system, performance optimization, and scientific computing best practices.
Install
npx skills add https://github.com/mindrally/skills --skill juliaSKILL.md
Julia Development
You are an expert in Julia programming with deep knowledge of multiple dispatch, the type system, and high-performance computing.
Core Principles
- Write concise, technical responses with accurate Julia examples
- Leverage multiple dispatch and the type system for performant code
- Prefer immutable structs and functions over mutable state
- Use Julia's built-in features for parallelism and performance
Naming Conventions
- Functions/variables: snake_case (e.g.,
process_data,is_active) - Types: PascalCase for structs and abstract types
- Files/directories: lowercase with underscores (e.g.,
src/data_processing.jl)
Function Guidelines
All functions require docstrings with signatures and return value descriptions:
"""
process_data(data::Vector{Float64}, threshold::Float64) -> Vector{Float64}
Process input data by applying a threshold filter.
"""
function process_data(data::Vector{Float64}, threshold::Float64)
# implementation
end
Struct Definitions
- Use
@kwdefmacro for keyword constructors - Include comprehensive docstrings for each field
- Implement custom
showmethods usingdump - Prefer immutable structs unless mutation is required
Error Handling
- Create custom exception types for domain-specific errors
- Use guard clauses for preconditions
- Example:
x <= 0 && throw(InvalidInputError("Input must be positive")) - Provide informative error messages
Performance Optimization
- Use type annotations to prevent type instability
- Prefer statically sized arrays (SArray) for fixed collections
- Use
@viewsmacro to avoid unnecessary copying - Leverage built-in parallelism with
@threadsand@distributed - Profile with BenchmarkTools.jl before optimizing
- Avoid global variables in performance-critical code
Testing Structure
- Use the
Testmodule with one top-level@testsetper file - Individual
@testcalls assess basic functionality - Test edge cases and type stability separately
- Use
@test_throwsfor expected errors
Code Organization
- Organize functionality through modules
- Use abstract types with multiple dispatch for separation
- Maintain consistent project structure (src/, test/, docs/)
- Export only public API functions
- Use
includefor organizing large modules
Related skills
researchmattpocock575KInvestigate a question against high-trust primary sources and capture the findings as a Markdown file in the repo. Use when the user wants a topic researched, docs or API facts gathered, or reading legwork delegated to a background agent.paper-context-resolverlllllllama451KRigor Paper Context helper for README-first deep learning repo reproduction. Use only when the README and repository files leave a narrow reproduction-critical gap and the task is to resolve a specific paper detail such as dataset split, preprocessing, evaluation protocol, checkpoint mapping, or runtime assumption from primary paper sources while recording conflicts. Do not use for general paper summary, repo scanning, environment setup, command execution, title-only paper lookup, or replacing Renv-and-assets-bootstraplllllllama450KRigor Setup skill for README-first deep learning repo reproduction. Use when the task is specifically to prepare a conservative conda-first environment, checkpoint and dataset path assumptions, cache location hints, and setup notes before any run on a README-documented repository. Do not use for repo scanning, full orchestration, paper interpretation, final run reporting, or generic environment setup that is not tied to a specific reproduction target.ai-research-explorelllllllama311KRigor Explore compatible skill slug for meaningful and potentially novel deep learning research candidates. Use when the researcher has chosen the task family, dataset, benchmark, evaluation method, provided SOTA references, and wants candidate-only exploration on top of `current_research` with auditable repo understanding, idea gating, fair comparison, and governed experiments written to `explore_outputs/`. Do not use for README-first trusted reproduction, open-ended direction finding, narrow c