Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/dcelisgarza/portfoliooptimisers.jl/julia-source-codegit clone --depth 1 https://github.com/dcelisgarza/PortfolioOptimisers.jlWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/dcelisgarza/portfoliooptimisers.jl/julia-source-code)<a href="https://agentmods.dev/instructions/dcelisgarza/portfoliooptimisers.jl/julia-source-code"><img src="https://agentmods.dev/badge/instructions/dcelisgarza/portfoliooptimisers.jl/julia-source-code.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02812 | $0.02812 |
| Opus 5 | $0.01406 | $0.01406 |
| Sonnet 5 | $0.00562 | $0.00562 |
| Haiku 4.5 | $0.00281 | $0.00281 |
Grade A, and why
PortfolioOptimisers.jl julia-source-code.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 225 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Julia Source Code Guidelines for PortfolioOptimisers.jl
Estimator, Algorithm, and Result Roles
These three abstract hierarchies form the backbone of the library. Understanding their distinct roles is critical for correct design.
-
Estimators (
<: AbstractEstimator):- User-facing. Compose algorithms and/or other estimators as fields.
- Are the entry points for computation — all high-level API functions accept estimators.
- May consume data (e.g., a returns matrix) and produce results or transformed data.
- Example:
Covariance,EmpiricalPrior,Denoise.
-
Algorithms (
<: AbstractAlgorithm):- Internal dispatch mechanism. Never called directly from user-facing APIs.
- Modify or specialise the behaviour of an estimator they are stored in.
- Must not contain data — only parameters that tune an algorithm's behaviour.
- Example:
FullMoment,SemiMoment,SpectralDenoise,Newton.
-
Results (
<: AbstractResult):- Returned by functions that consume estimators when the output is complex enough to warrant its own type (e.g., contains multiple arrays, metadata).
- Can themselves be passed as inputs to further computations — functions must dispatch on both estimator and result types where this makes sense.
- Example:
LowOrderPrior,ClustersResult,OptimisationResult.
Type Definitions
-
Abstract types:
- Always prefix with
Abstract(e.g.,AbstractCovarianceEstimator). - Include comprehensive docstrings explaining their role in the type hierarchy.
- List related types in the
# Relatedsection. - When subtypes must implement specific methods, document this in an
# Interfacessection (see the docstring guide).
- Always prefix with
-
Struct types:
- Use
@concretefromConcreteStructs.jl— it auto-generates type parameters sostruct MyType{T1, T2}boilerplate is not needed. - Use
DocStringExtensions.TYPEDEFin the docstring header for struct types. - All fields must be documented using inline
"$(field_dict[:key])"strings and reflected in the# Fieldssection via$(DocStringExtensions.FIELDS). - Call
@define_pretty_show(TypeName)immediately after any new struct that should display nicely in the REPL (all estimators, algorithms, and results). - Every source file must end with an
exportstatement listing all public symbols defined in that file.
- Use
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 225 lines · 2,812 tokens per session scan A d6631af65fe4
PortfolioOptimisers.jl julia-source-code.instructions.md is an instructions file published in the GitHub repository dcelisgarza/PortfolioOptimisers.jl (21 stars, last pushed today), licensed MIT. It adds 2,812 tokens to every session, about $0.0141 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other instructions, from other repositories
awesome-quant CLAUDE.md
Claude Code instructions for wilsonfreitas/awesome-quant, covering claude.md, project overview, architecture, commands and install dependencies (uses uv, requires python 3.11+).
NexusTrader CLAUDE.md
Instructions for Quantweb3-com/NexusTrader, covering claude.md, project overview, development commands, dependencies and setup and install with uv (package manager used in this project).
openmarkets python-calisthenics.instructions.md
Enforces Object Calisthenics principles for business domain code to ensure clean, maintainable, and robust code in Python.
openmarkets python-mcp-server.instructions.md
Instructions for building Model Context Protocol (MCP) servers using the Python SDK.
quant-mind AGENTS.md
Instructions for LLMQuant/quant-mind, covering quantmind — agent instructions, progressive context loading, what this is, positioning and module map.
Binance.Net copilot-instructions.md
Copilot instructions for JKorf/Binance.Net, covering copilot instructions for binance.net, use binance.net, not raw http, client setup, result handling and api structure.