Agent skill

Portfolio Optimizer

by CoWork-OS in CoWork-OS/CoWork-OS

Modern portfolio theory optimization including Markowitz mean-variance, Black-Litterman, risk parity, and efficient frontier construction with constraints.

MITAuto-check passedBusiness, Finance & HR

Install Portfolio Optimizer

skills CLI
$ npx skills add CoWork-OS/CoWork-OS --skill portfolio-optimizer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install CoWork-OS/CoWork-OS portfolio-optimizer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/CoWork-OS/CoWork-OS.git skills-src && mkdir -p .claude/skills && cp -r skills-src/resources/skills/portfolio-optimizer .claude/skills/portfolio-optimizer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
portfolio-optimizer
GitHub stars
477
Token cost
~742 tokens
SKILL.md length
276 words
Files
3 (incl. scripts, references)
Skills in repo
46
Repo updated
First seen
Licence
MIT

At a glance

Modern portfolio theory optimization including Markowitz mean-variance, Black-Litterman, risk parity, and efficient frontier construction with constraints.

  • Business, Finance & HR work in your project
  • SKILL.md covers Purpose, Routing, Trigger Examples and Parameters, plus 1 more section

What it does

Portfolio Optimizer is an agent skill from CoWork-OS/CoWork-OS. Modern portfolio theory optimization including Markowitz mean-variance, Black-Litterman, risk parity, and efficient frontier construction with constraints.

Its SKILL.md is about 740 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts and reference files (for example `references/full-guidance.md`).

It sits in Business, Finance & HR. The repository describes itself as: Local-first personal agentic OS and everything app for coding, knowledge work, web design, automations, and artifacts. The licence is MIT.

When your agent uses it

  • Business, Finance & HR work in your project

Example prompts

  • “/portfolio-optimizer”

What it can do on your machine

Read from SKILL.md and the folder at commit 0ace02b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Portfolio Optimizer loads about 742 tokens when it runs, and up to ~2.9k if it reads all its reference files. Until then it costs about 44 tokens; SKILL.md has 276 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~742
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from CoWork-OS/CoWork-OS at commit 0ace02b, republished under its MIT licence (© CoWork-OS). 276 words, ~742 tokens.

Download SKILL.mdSave it as .claude/skills/portfolio-optimizer/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
portfolio-optimizer
description
Modern portfolio theory optimization including Markowitz mean-variance, Black-Litterman, risk parity, and efficient frontier construction with constraints.
version
1.0.0
metadata.author
CoWork OS Contributors <info@coworkosapp.com>

Portfolio Optimizer

Purpose

Modern portfolio theory optimization including Markowitz mean-variance, Black-Litterman, risk parity, and efficient frontier construction with constraints.

Routing

  • Use when: Use when the user asks about portfolio optimization, asset allocation, efficient frontier, Markowitz optimization, Black-Litterman, risk parity, diversification, rebalancing, or optimal portfolio construction.
  • Do not use when: Do not use when the request is about individual stock analysis, financial modeling, risk metrics only (use Risk Analyzer), or tax planning.
  • Outputs: Outcome from Portfolio Optimizer: optimized asset allocation with weights, expected return, risk metrics, efficient frontier positioning, and rebalancing recommendations.
  • Success criteria: Returns specific allocation weights, portfolio expected return and risk, Sharpe ratio, comparison to current allocation, and actionable rebalancing steps.

Trigger Examples

Positive
  • Use the portfolio-optimizer skill for this request.
  • Help me with portfolio optimizer.
  • Use when the user asks about portfolio optimization, asset allocation, efficient frontier, Markowitz optimization, Black-Litterman, risk parity, diversification, rebalancing, or optimal portfolio construction.
  • Portfolio Optimizer: provide an actionable result.
Negative
  • Do not use when the request is about individual stock analysis, financial modeling, risk metrics only (use Risk Analyzer), or tax planning.
  • Do not use portfolio-optimizer for unrelated requests.
  • This request is outside portfolio optimizer scope.
  • This is conceptual discussion only; no tool workflow is needed.

Parameters

NameTypeRequiredDescription
holdingsstringYesCurrent portfolio holdings and weights (e.g., SPY 40%, AGG 30%, GLD 10%, VWO 20%)
objectiveselectYesOptimization objective
questionstringYesYour specific optimization question
constraintsstringNoPortfolio constraints (e.g., long-only, max 25% per position, no emerging markets)
targetReturnstringNoTarget annual return for optimization (e.g., 8%)

Runtime Prompt

  • Current runtime prompt length: 1094 characters.
  • Runtime prompt is defined directly in ../portfolio-optimizer.json.

© CoWork-OS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts, references) in resources/skills/portfolio-optimizer of CoWork-OS/CoWork-OS.

  • SKILL.md
  • references/full-guidance.md
  • scripts/.gitkeep

Open the folder on GitHubat commit 0ace02b

Compare with similar skills

Portfolio Optimizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Portfolio Optimizer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Portfolio Optimizer this skillCoWork-OS/CoWork-OS477—~742Automated safety check: PassMIT
Technical Analysttradermonty/claude-trading-skills3k4 repos~4.6kAutomated safety check: PassMIT
Theme Detectortradermonty/claude-trading-skills3k2 repos~4.9kAutomated safety check: PassMIT
Creating Financial ModelsChen-zexi/open-ptc-agent7293 repos~1.3kAutomated safety check: PassMIT
Stock APIzhangxiangliang/stock-api2k—~507Automated safety check: PassMIT
Itr Walakaranb192/itr-wala871—~3.6kAutomated safety check: PassMIT

Similar skills

  • Technical Analyst

    tradermonty/claude-trading-skills

    This skill should be used when analyzing weekly price charts for stocks, stock indices, cryptocurrencies, or forex pairs.

    3k GitHub starsUsed in 4 repos~4.6k tokens
    Business, Finance & HRAuto-check passed
  • Theme Detector

    tradermonty/claude-trading-skills

    Detect and analyze trending market themes across sectors. An agent skill from tradermonty/claude-trading-skills.

    3k GitHub starsUsed in 2 repos~4.9k tokens
    Business, Finance & HRAuto-check passed
  • Creating Financial Models

    Chen-zexi/open-ptc-agent

    This skill provides an advanced financial modeling suite with DCF analysis, sensitivity testing, Monte Carlo simulations, and scenario planning for investment decisions

    729 GitHub starsUsed in 3 repos~1.3k tokens
    Business, Finance & HRAuto-check passed
  • Stock API

    zhangxiangliang/stock-api

    Fetch real-time stock quotes, K-line (candlestick) history, and search symbols for China A-shares, Hong Kong, and US markets.

    2k GitHub stars~507 tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Itr Wala

    karanb192/itr-wala

    File Indian income tax returns (ITR) for FY 2025-26 / AY 2026-27.

    871 GitHub stars~3.6k tokensUpdated 6 days ago
    Business, Finance & HRAuto-check passed
  • Tushare Data

    zillionare/zillionare

    面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。

    321 GitHub starsUsed in 2 repos~2.3k tokens
    Business, Finance & HRAuto-check passed

More from CoWork-OS/CoWork-OS

All 46 skills in this repo
  • Calendly

    CoWork-OS/CoWork-OS

    Manage Calendly scheduling via the v2 API. An agent skill from CoWork-OS/CoWork-OS.

    477 GitHub stars~595 tokensUpdated yesterday
    Auto-check passed
  • Humanizer

    CoWork-OS/CoWork-OS

    Rewrite AI-generated text to sound natural and human-written.

    477 GitHub stars~557 tokensUpdated yesterday
    Auto-check passed
  • Marketing Strategist

    CoWork-OS/CoWork-OS

    Comprehensive marketing strategy across 25 disciplines — positioning, copywriting frameworks, buyer psychology, SEO, CRO, paid ads, funnel architecture, content strategy, growth loops, analytics…

    477 GitHub stars~893 tokensUpdated yesterday
    Auto-check passed
  • Moltbook

    CoWork-OS/CoWork-OS

    Interact with Moltbook — the social network for AI agents. An agent skill from CoWork-OS/CoWork-OS.

    477 GitHub stars~579 tokensUpdated yesterday
    Auto-check passed
  • Polymarket

    CoWork-OS/CoWork-OS

    Query Polymarket prediction markets — search events, check odds and prices, view trending markets, track price momentum, get orderbook depth, analyze volume, and monitor market resolution timelines.

    477 GitHub stars~616 tokensUpdated yesterday
    Auto-check passed
  • Skill Creator

    CoWork-OS/CoWork-OS

    Create or update AgentSkills for CoWork-OSS. An agent skill from CoWork-OS/CoWork-OS.

    477 GitHub stars~493 tokensUpdated yesterday
    Auto-check passed

Questions about Portfolio Optimizer

What does Portfolio Optimizer do?

Modern portfolio theory optimization including Markowitz mean-variance, Black-Litterman, risk parity, and efficient frontier construction with constraints. Portfolio Optimizer is an agent skill from CoWork-OS/CoWork-OS. Modern portfolio theory optimization including Markowitz mean-variance, Black-Litterman, risk parity, and efficient frontier construction with constraints.

When should I use Portfolio Optimizer?

Portfolio Optimizer fits situations like: business, Finance & HR work in your project.

How do I install Portfolio Optimizer in Claude Code?

Run `npx skills add CoWork-OS/CoWork-OS --skill portfolio-optimizer -a claude-code`. Or copy the skill folder (resources/skills/portfolio-optimizer in CoWork-OS/CoWork-OS) into .claude/skills/portfolio-optimizer in your project. Claude Code loads it when a task matches its description.

How do I install Portfolio Optimizer in Codex?

Run `npx skills add CoWork-OS/CoWork-OS --skill portfolio-optimizer -a codex`. Or copy the skill folder (resources/skills/portfolio-optimizer in CoWork-OS/CoWork-OS) into .agents/skills/portfolio-optimizer in your project. Codex loads it when a task matches its description.

Can I use Portfolio Optimizer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add CoWork-OS/CoWork-OS --skill portfolio-optimizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/portfolio-optimizer, .gemini/skills/portfolio-optimizer, .github/skills/portfolio-optimizer and .opencode/skills/portfolio-optimizer in your project.

What does Portfolio Optimizer need to run?

SKILL.md names no scripts, command-line tools or credentials: Portfolio Optimizer is instructions for the agent only.

Does Portfolio Optimizer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Portfolio Optimizer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Portfolio Optimizer use?

Portfolio Optimizer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Portfolio Optimizer use?

About 742 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.1k tokens, read only when the agent opens those files.

What are the alternatives to Portfolio Optimizer?

Skills that share tags, products or a category with Portfolio Optimizer: Technical Analyst (tradermonty/claude-trading-skills, 3k stars), Theme Detector (tradermonty/claude-trading-skills, 3k stars), Creating Financial Models (Chen-zexi/open-ptc-agent, 729 stars) and Stock API (zhangxiangliang/stock-api, 2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Portfolio Optimizer?

CoWork-OS (a GitHub organization) maintains it in CoWork-OS/CoWork-OS, which has 477 GitHub stars. The repository holds 46 skills in this directory. The repository was last updated on October 9, 2026.

Source: CoWork-OS/CoWork-OS on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.