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 commands/wbh604/uzi-skill/returnsgit clone --depth 1 https://github.com/wbh604/UZI-SkillWrote 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/commands/wbh604/uzi-skill/returns)<a href="https://agentmods.dev/commands/wbh604/uzi-skill/returns"><img src="https://agentmods.dev/badge/commands/wbh604/uzi-skill/returns.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 | $0.00036 | $0.00917 |
| Opus 5 | $0.00018 | $0.00458 |
| Sonnet 5 | $0.00007 | $0.00183 |
| Haiku 4.5 | $0.00004 | $0.00092 |
Grade A, and why
returns 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 4d ago.
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.
What it actually says
/returns <holdings.csv | 组合> [benchmark=6.0]
把一个组合的区间总收益拆开:谁赚的钱、哪类资产赚的、谁是英雄谁是猪队友。
配合 UZI 的 --portfolio 组合功能 —— portfolio_runner 负责打分/健康度,本命令负责"涨跌从哪来"。
改编自 anthropics/financial-services · private-equity/returns-analysis,适配二级市场组合。 方法详见
skills/deep-analysis/references/fin-methods/returns-attribution.md。
输入
吃 --portfolio 同款 holdings 结构,每行再带 return_pct / industry:
ticker,weight,return_pct,industry,name
600519.SH,0.40,10.0,白酒,贵州茅台
000858.SZ,0.30,-5.0,白酒,五粮液
002594.SZ,0.30,20.0,电动车,比亚迪
weight0-1 或 0-100 都行,自动归一化;缺失则等权。return_pct个股区间收益率(%)。拿不到则留空 → 标注"需补价格区间",按 0 计(可先从 K 线维度补区间收益再回填)。school可选 · 带上就多出一维流派归因。
工作流
from lib.tier1.returns_attrib import build_returns_attribution
result = build_returns_attribution(holdings, benchmark_return=6.0) # 基准可选
输出
| 模块 | 内容 |
|---|---|
| 总收益 | total_return = Σ(权重×个股收益),单位 pp |
| 加权贡献表 | 逐持仓:仓位 / 收益 / 贡献(pp) / 是否需补价 |
| 行业归因 | 各行业贡献(降序),加总 == 总收益 |
| 流派归因 | 仅当 holdings 带 school |
| Top3 贡献 / Top3 拖累 | 正/负贡献排序 |
| vs 基准 | 超额 = 总收益 − 基准,跑赢/跑输 |
| 一句话点评 | verdict |
展示示例
组合区间总收益 +8.50%(vs 基准 +6.00% · 超额 +2.50pp · 🟢 跑赢)
加权贡献表:
比亚迪 电动车 30% +20.0% 贡献 +6.00pp ←主升
贵州茅台 白酒 40% +10.0% 贡献 +4.00pp
五粮液 白酒 30% -5.0% 贡献 -1.50pp ✕拖累
行业归因:电动车 +6.00pp · 白酒 +2.50pp
Top 贡献:比亚迪 +6.00 / 贵州茅台 +4.00
Top 拖累:五粮液 -1.50
一句话:组合总收益 +8.50%,主升由比亚迪贡献 +6.00pp,主要拖累五粮液 -1.50pp,跑赢基准 +2.50pp。
注意
- 贡献单位是百分点 (pp)(已乘权重),不是个股收益率本身。
- 分组归因只是重排,加总必须等于总收益。
- 缺
return_pct不报错,但 verdict 会提示"⚠️ N 只缺区间收益需补价格"。 - 实绩归因(已发生区间收益),不做情景/敏感性预测。
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.
- 4d ago First seen · 72 lines · 36 tokens per session scan A f339ab2db3d3
returns is a command published in the GitHub repository wbh604/UZI-Skill (6,737 stars, last pushed 7d ago), licensed MIT. It adds 36 tokens to every session and 917 once invoked, about $0.0002 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-08-30.
Other commands, from other repositories
config
Command "config" from sdebruyn/fabric-dw-mcp-cli, covering configuration & defaults, http retry budget, sql retry budget, mcp workspace allowlist {#mcp-workspace-allowlist} and mcp server log level.
dispatcher
Pick the next-best repo to work on across the portfolio — rank free repos, recommend one, claim its lease atomically, and route to the entry command.
valuation-methods
Valuation methods analysis — multiples, DCF inputs, PEG integration, valuation assumption extraction.
scan
Scan AWS account for cost optimization.
audit-checklist
Perform an internal audit, review controls, or prepare for an external financial audit.
finops-status
Orientation — say where an opportunity or assignment sits in the five-step FinOps lifecycle and what unlocks next. Useful when a record has no active stage: an opportunity while its assignments do the work, an assignment whose plan has not been approved yet, or a rejected or archived assignment. Read-only; mutates…