Share
ClickHouse/ClickHouse
Share a Claude Code session to pastila.nl and return a viewer link.
A股绩效归因/风险归因分析。当用户说"绩效归因"、"收益归因"、"Brinson"、"风险归因"、"attribution"、"超额收益来自哪里"、"为什么跑赢/跑输"、"组合分析归因"、"行业归因"、"风格归因"时触发。对投资组合进行系统性绩效归因(Brinson行业归因/风格因子归因),拆解超额收益来源(配置效应/选股效应/交互效应),评估投资能力。支持研报风格(formal)和快速归因风格…
$ npx skills add aifinlab/FinClaw --skill a-share-risk-attribution -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install aifinlab/FinClaw a-share-risk-attribution --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/a-share-risk-attribution .claude/skills/a-share-risk-attribution && rm -rf skills-srcUse ~/.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/
Install the "a-share-risk-attribution" agent skill from https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-risk-attribution into .claude/skills/a-share-risk-attribution/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "a-share-risk-attribution", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-risk-attributionType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add aifinlab/FinClaw --skill a-share-risk-attribution -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install aifinlab/FinClaw a-share-risk-attribution --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/a-share-risk-attribution .agents/skills/a-share-risk-attribution && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "a-share-risk-attribution" agent skill from https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-risk-attribution into .agents/skills/a-share-risk-attribution/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "a-share-risk-attribution", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add aifinlab/FinClaw --skill a-share-risk-attribution -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install aifinlab/FinClaw a-share-risk-attribution --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/a-share-risk-attribution .cursor/skills/a-share-risk-attribution && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "a-share-risk-attribution" agent skill from https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-risk-attribution into .cursor/skills/a-share-risk-attribution/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "a-share-risk-attribution", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/aifinlab/FinClaw.git --path skills/a-share-risk-attribution--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add aifinlab/FinClaw --skill a-share-risk-attribution -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install aifinlab/FinClaw a-share-risk-attribution --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/a-share-risk-attribution .gemini/skills/a-share-risk-attribution && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "a-share-risk-attribution" agent skill from https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-risk-attribution into .gemini/skills/a-share-risk-attribution/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "a-share-risk-attribution", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install aifinlab/FinClaw a-share-risk-attributionInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add aifinlab/FinClaw --skill a-share-risk-attribution -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/a-share-risk-attribution .github/skills/a-share-risk-attribution && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "a-share-risk-attribution" agent skill from https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-risk-attribution into .github/skills/a-share-risk-attribution/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "a-share-risk-attribution", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add aifinlab/FinClaw --skill a-share-risk-attribution -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install aifinlab/FinClaw a-share-risk-attribution --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/a-share-risk-attribution .opencode/skills/a-share-risk-attribution && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "a-share-risk-attribution" agent skill from https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-risk-attribution into .opencode/skills/a-share-risk-attribution/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "a-share-risk-attribution", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
a-share-risk-attributionA股绩效归因/风险归因分析。当用户说"绩效归因"、"收益归因"、"Brinson"、"风险归因"、"attribution"、"超额收益来自哪里"、"为什么跑赢/跑输"、"组合分析归因"、"行业归因"、"风格归因"时触发。对投资组合进行系统性绩效归因(Brinson行业归因/风格因子归因),拆解超额收益来源(配置效应/选股效应/交互效应),评估投资能力。支持研报风格(formal)和快速归因风格…
A Share Risk Attribution is an agent skill from aifinlab/FinClaw. A股绩效归因/风险归因分析。当用户说"绩效归因"、"收益归因"、"Brinson"、"风险归因"、"attribution"、"超额收益来自哪里"、"为什么跑赢/跑输"、"组合分析归因"、"行业归因"、"风格归因"时触发。对投资组合进行系统性绩效归因(Brinson行业归因/风格因子归因),拆解超额收益来源(配置效应/选股效应/交互效应),评估投资能力。支持研报风格(formal)和快速归因风格(brief)。
Its SKILL.md is about 820 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/attribution-guide.md` and `scripts/brinson_attribution.py`).
The licence is Apache-2.0.
8 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 9e62862. It shows what the files ask for, not the result of running them.
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.
Ships 1 file in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
pythonFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
A Share Risk Attribution loads about 823 tokens when it runs, and up to ~2.4k if it reads all its reference files. Until then it costs about 58 tokens; SKILL.md has 211 words of instructions outside code blocks.
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.
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.
The full file from aifinlab/FinClaw at commit 9e62862, republished under its Apache-2.0 licence (© aifinlab). 211 words, ~823 tokens.
.claude/skills/a-share-risk-attribution/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.SCRIPTS="$SKILLS_ROOT/cn-stock-data/scripts"
# 各持仓股K线(计算区间收益)
python "$SCRIPTS/cn_stock_data.py" kline --code [CODE] --freq daily --start [起始日期] --end [结束日期]
# 各持仓股实时行情
python "$SCRIPTS/cn_stock_data.py" quote --code [CODE1],[CODE2],[CODE3],...
# 各持仓股财务指标(风格因子:PE/PB/市值/ROE等)
python "$SCRIPTS/cn_stock_data.py" finance --code [CODE]
# 基准指数K线(沪深300/中证500/中证全指)
python "$SCRIPTS/cn_stock_data.py" kline --code SH000300 --freq daily --start [起始日期] --end [结束日期]
# 中证500: SH000905 中证全指: SH000985 创业板指: SZ399006Step 1: 输入确认 — 组合与基准
收集归因所需信息:
汇总为输入表:
| 代码 | 名称 | 组合权重(%) | 行业(申万一级) |
|---|
如果用户未提供行业分类,通过 finance 接口获取后自动映射。
Step 2: Brinson 行业归因
通过 cn-stock-data kline 获取组合各股和基准在归因区间的收益率,按行业汇总:
| 行业 | 组合权重 Wp | 基准权重 Wb | 组合收益 Rp | 基准收益 Rb | 配置效应 | 选股效应 | 交互效应 | 合计 |
|---|
Brinson-Fachler 模型(参考 references/attribution-guide.md):
汇总:
Step 3: 风格因子归因
通过 finance 获取各股财务指标,构建因子暴露矩阵,用回归法拆解收益:
常用因子:
| 因子 | 代理变量 | 说明 |
|---|---|---|
| 市场(Beta) | 组合 vs 基准 | 系统性风险 |
| 规模(Size) | ln(总市值) | 大/小盘偏离 |
| 价值(Value) | 1/PE 或 BP | 价值/成长风格 |
| 动量(Momentum) | 过去3-6月涨幅 | 追涨/逆向 |
| 波动率(Volatility) | 近期日收益率标准差 | 高/低波偏好 |
| 质量(Quality) | ROE | 盈利质量 |
输出因子归因表:
| 因子 | 组合暴露 | 基准暴露 | 主动暴露 | 因子收益(%) | 因子贡献(%) |
|---|
残差项 = 超额收益 - 各因子贡献之和(代表个股 alpha)
Step 4: 时间序列分解(仅 formal 模式)
将归因区间按月拆分,展示归因效应的时间演变:
| 月份 | 组合收益 | 基准收益 | 超额收益 | 配置贡献 | 选股贡献 | 交互贡献 |
|---|
识别:
Step 5: 输出
| 维度 | formal(机构绩效归因报告) | brief(快速归因摘要) |
|---|---|---|
| 篇幅 | 4-8 页 | 1-2 页 |
| Brinson 归因 | 完整行业归因表 + 瀑布图描述 | Top 3 贡献/拖累行业 |
| 因子归因 | 完整因子暴露与贡献表 | 主要因子贡献一句话 |
| 时间分解 | 按月归因表 + 趋势分析 | 省略 |
| 投资能力评估 | 配置能力/选股能力/IR评价 | 一句话定性评价 |
| 可视化 | 瀑布图/堆叠图/热力图描述 | 省略 |
| 免责声明 | 需要 | 不需要 |
# 调用 skill
result = run_skill({
"param1": "value1",
"param2": "value2"
})python scripts/run_skill.py --input data.json© aifinlab, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (scripts, references) in skills/a-share-risk-attribution of aifinlab/FinClaw.
Open the folder on GitHubat commit 9e62862
A Share Risk Attribution 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| A Share Risk Attribution this skillaifinlab/FinClaw | 255 | — | ~823 | Automated safety check: Pass | Apache-2.0 | |
| ShareClickHouse/ClickHouse | 50k | — | ~558 | Automated safety check: Notes | Apache-2.0 | |
| Performance AttributionHKUDS/Vibe-Trading | 35k | — | ~3.1k | Automated safety check: Pass | MIT | |
| Developing Share PagesTriliumNext/Trilium | 38k | — | ~3.4k | Automated safety check: Pass | AGPL-3.0 | |
| SharingBuilderIO/agent-native | 7.1k | — | ~3.4k | Automated safety check: Pass | None | |
| Riskalsk1992/CloddsBot | 3k | — | ~2.4k | Automated safety check: Pass | MIT |
ClickHouse/ClickHouse
Share a Claude Code session to pastila.nl and return a viewer link.
HKUDS/Vibe-Trading
Explains why a portfolio beat or lagged its benchmark with Brinson sector attribution, factor alpha and beta decomposition, timing evaluation and benchmark comparison.
TriliumNext/Trilium
A skill your agent uses when working on Trilium's share functionality — shared pages under /share/, the static HTML (share-theme) export, the share theme package (packages/share-theme: EJS…
BuilderIO/agent-native
Framework-level sharing and privacy for user-authored resources (dashboards, documents, forms, decks, etc.).
alsk1992/CloddsBot
Unified risk engine with VaR, stress testing, volatility regimes, and automated controls
thedaviddias/Front-End-Checklist
A skill your agent uses when reviewing templates, rendered HTML, or shared components related to Set text direction for RTL languages.
aifinlab/FinClaw
A skill your agent uses when the user asks for help with corporate credit due diligence, enterprise credit investigation, pre-loan review, borrower analysis, document collection, management…
aifinlab/FinClaw
A skill your agent uses when you need a bank corporate-risk monitoring assistant for enterprise litigation/penalty/enforcement scanning (处罚/诉讼/被执行/失信等).
aifinlab/FinClaw
A skill your agent uses when you need a bank corporate client operating-volatility monitoring assistant (经营监测/指标波动/预警解释).
aifinlab/FinClaw
A skill your agent uses when you need a bank post-loan visit follow-up assistant to turn visit notes/materials into a structured memo (摘要/关键更新/风险观察/用途核验/行动项).
aifinlab/FinClaw
A skill your agent uses when you need a bank corporate credit issue-list assistant (问题清单/补件清单/催办台账).
aifinlab/FinClaw
A skill your agent uses when you need a bank corporate credit approval-opinion drafting assistant (审批意见/条款建议/有条件同意).
A股绩效归因/风险归因分析。当用户说"绩效归因"、"收益归因"、"Brinson"、"风险归因"、"attribution"、"超额收益来自哪里"、"为什么跑赢/跑输"、"组合分析归因"、"行业归因"、"风格归因"时触发。对投资组合进行系统性绩效归因(Brinson行业归因/风格因子归因),拆解超额收益来源(配置效应/选股效应/交互效应),评估投资能力。支持研报风格(formal)和快速归因风格…. A Share Risk Attribution is an agent skill from aifinlab/FinClaw.
Run `npx skills add aifinlab/FinClaw --skill a-share-risk-attribution -a claude-code`. Or copy the skill folder (skills/a-share-risk-attribution in aifinlab/FinClaw) into .claude/skills/a-share-risk-attribution in your project. Claude Code loads it when a task matches its description.
Run `npx skills add aifinlab/FinClaw --skill a-share-risk-attribution -a codex`. Or copy the skill folder (skills/a-share-risk-attribution in aifinlab/FinClaw) into .agents/skills/a-share-risk-attribution in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aifinlab/FinClaw --skill a-share-risk-attribution -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/a-share-risk-attribution, .gemini/skills/a-share-risk-attribution, .github/skills/a-share-risk-attribution and .opencode/skills/a-share-risk-attribution in your project.
Going by SKILL.md and its folder, A Share Risk Attribution needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.
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.
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.
A Share Risk Attribution is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 823 tokens (SKILL.md is roughly 3.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 1.6k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with A Share Risk Attribution: Share (ClickHouse/ClickHouse, 50k stars), Performance Attribution (HKUDS/Vibe-Trading, 35k stars), Developing Share Pages (TriliumNext/Trilium, 38k stars) and Sharing (BuilderIO/agent-native, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
aifinlab (a GitHub user) maintains it in aifinlab/FinClaw, which has 255 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on May 13, 2026.
Source: aifinlab/FinClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.