Agent skill

Margin Risk Concentrated

by aifinlab in aifinlab/FinClaw

两融风险助手(集中持仓版)- 识别和评估集中持仓客户的融资融券风险。当用户需要监控持仓集中度高的客户、评估单一证券风险、生成集中度预警报告或制定风险控制措施时触发此技能。适用于券商两融业务、风控、营业部的风险管理场景。

Apache-2.0Auto-check passed

Install Margin Risk Concentrated

skills CLI
$ npx skills add aifinlab/FinClaw --skill margin-risk-concentrated -a claude-code

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

GitHub CLI
$ gh skill install aifinlab/FinClaw margin-risk-concentrated --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/aifinlab/FinClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/margin-risk-concentrated .claude/skills/margin-risk-concentrated && 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
margin-risk-concentrated
GitHub stars
254
Token cost
~1.5k tokens
SKILL.md length
98 words
Files
5 (incl. scripts, references)
Skills in repo
74
Repo updated
First seen
Licence
Apache-2.0

At a glance

两融风险助手(集中持仓版)- 识别和评估集中持仓客户的融资融券风险。当用户需要监控持仓集中度高的客户、评估单一证券风险、生成集中度预警报告或制定风险控制措施时触发此技能。适用于券商两融业务、风控、营业部的风险管理场景。

  • Works in 5 steps: 确认客户基本信息 → 集中度指标计算 → 风险评估报告 → …
  • SKILL.md covers 触发场景, 核心工作流, 参考资源 and 注意事项
  • Runs Python scripts from its folder

What it does

Margin Risk Concentrated is an agent skill from aifinlab/FinClaw. 两融风险助手(集中持仓版)- 识别和评估集中持仓客户的融资融券风险。当用户需要监控持仓集中度高的客户、评估单一证券风险、生成集中度预警报告或制定风险控制措施时触发此技能。适用于券商两融业务、风控、营业部的风险管理场景。

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/concentration-risk.md`, `references/diversification-guide.md` and `references/single-stock-risk.md`).

The licence is Apache-2.0.

Example prompts

  • “/margin-risk-concentrated”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. 确认客户基本信息
  2. 集中度指标计算
  3. 风险评估报告
  4. 预警阈值设置
  5. 通知模板

What it can do on your machine

Read from SKILL.md and the folder at commit 9e62862. 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/ (Python), 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

Margin Risk Concentrated loads about 1.5k tokens when it runs, and up to ~3k if it reads all its reference files. Until then it costs about 34 tokens; SKILL.md has 98 words of instructions outside code blocks.

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

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 aifinlab/FinClaw at commit 9e62862, republished under its Apache-2.0 licence (© aifinlab). 98 words, ~1,479 tokens.

Download SKILL.mdSave it as .claude/skills/margin-risk-concentrated/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
margin-risk-concentrated
description
两融风险助手(集中持仓版)- 识别和评估集中持仓客户的融资融券风险。当用户需要监控持仓集中度高的客户、评估单一证券风险、生成集中度预警报告或制定风险控制措施时触发此技能。适用于券商两融业务、风控、营业部的风险管理场景。

两融风险助手(集中持仓版)

触发场景

使用此技能当:

  • 用户需要监控集中持仓客户的风险
  • 用户要评估单一证券或行业集中度风险
  • 用户需要生成持仓集中度预警报告
  • 用户要制定集中持仓客户的风险控制措施
  • 用户提到"集中持仓"、"持仓集中"、"单一证券"、"行业集中"等

核心工作流

1. 确认客户基本信息

首先向用户确认以下信息:

  • 客户姓名/代码:[客户标识]
  • 账户类型:个人/机构
  • 总资产:[万元]
  • 持仓数量:[只]
  • 最大持仓:[股票名称]
  • 最大持仓占比:[%]
2. 集中度指标计算
2.1 持仓集中度指标
markdown
## 集中度指标

### 单一证券集中度
| 指标 | 公式 | 当前值 | 预警线 | 警戒线 |
|------|------|--------|--------|--------|
| 最大持仓占比 | 最大持仓市值/总资产 | X% | 40% | 50% |
| 前三持仓占比 | 前三持仓市值/总资产 | X% | 60% | 70% |
| 前五持仓占比 | 前五持仓市值/总资产 | X% | 80% | 90% |

### 行业集中度
| 指标 | 公式 | 当前值 | 预警线 | 警戒线 |
|------|------|--------|--------|--------|
| 最大行业占比 | 最大行业市值/总资产 | X% | 50% | 60% |
| 前三行业占比 | 前三行业市值/总资产 | X% | 80% | 90% |

### 板块集中度
| 板块 | 市值 (万元) | 占比 | 风险特征 |
|------|-------------|------|----------|
| 主板 | [金额] | X% | [特征] |
| 创业板 | [金额] | X% | [特征] |
| 科创板 | [金额] | X% | [特征] |
| 北交所 | [金额] | X% | [特征] |
2.2 集中度等级划分
等级最大持仓占比前三持仓占比风险等级
分散<20%<50%绿色
适度集中20-40%50-60%黄色
高度集中40-50%60-70%橙色
极度集中>50%>70%红色
3. 风险评估报告

按以下结构生成风险评估报告:

markdown
# 集中持仓客户风险评估报告

## 客户基本信息
| 项目 | 内容 |
|------|------|
| 客户姓名/代码 | [标识] |
| 账户类型 | 个人/机构 |
| 总资产 | [万元] |
| 持仓数量 | [只] |
| 最大持仓 | [股票名称] |
| 最大持仓占比 | X% |
| 风险等级 | [等级] |

---

## 一、持仓集中度分析

### 1.1 持仓明细
| 序号 | 证券代码 | 证券名称 | 市值 (万元) | 占比 | 成本价 | 现价 | 盈亏率 | 是否两融标的 |
|------|----------|----------|-------------|------|--------|------|--------|--------------|
| 1 | [代码] | [名称] | [金额] | X% | [价] | [价] | +/-% | 是/否 |
| 2 | [代码] | [名称] | [金额] | X% | [价] | [价] | +/-% | 是/否 |
| 3 | [代码] | [名称] | [金额] | X% | [价] | [价] | +/-% | 是/否 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
| **合计** | | | **[金额]** | **100%** | | | **+/-%** | |

### 1.2 集中度指标
| 指标 | 当前值 | 预警线 | 警戒线 | 状态 |
|------|--------|--------|--------|------|
| 最大持仓占比 | X% | 40% | 50% | 正常/预警/警戒 |
| 前三持仓占比 | X% | 60% | 70% | 正常/预警/警戒 |
| 前五持仓占比 | X% | 80% | 90% | 正常/预警/警戒 |
| 持仓数量 | X 只 | 5 只 | 3 只 | 正常/预警/警戒 |

### 1.3 集中度趋势
| 日期 | 最大持仓占比 | 前三持仓占比 | 持仓数量 |
|------|--------------|--------------|----------|
| T 日 | X% | X% | X 只 |
| T-7 日 | X% | X% | X 只 |
| T-30 日 | X% | X% | X 只 |

---

## 二、单一证券风险分析

### 2.1 最大持仓分析
**证券名称**:[名称]  **代码**:[代码]

#### 基本面分析
| 指标 | 数值 | 行业平均 | 评价 |
|------|------|----------|------|
| PE(TTM) | X | X | 高/中/低 |
| PB | X | X | 高/中/低 |
| 资产负债率 | X% | X% | 高/中/低 |
| ROE | X% | X% | 高/中/低 |
| 营收增速 | X% | X% | 高/中/低 |
| 净利润增速 | X% | X% | 高/中/低 |

#### 技术面分析
| 指标 | 数值 | 信号 |
|------|------|------|
| 当前价 | [价] | - |
| 52 周最高 | [价] | - |
| 52 周最低 | [价] | - |
| 距最高价跌幅 | -X% | - |
| 20 日均线 | [价] | 上/下 |
| 60 日均线 | [价] | 上/下 |
| RSI(14) | X | 超买/中性/超卖 |

#### 风险评估
| 风险类型 | 风险描述 | 风险等级 |
|----------|----------|----------|
| 估值风险 | [描述] | 高/中/低 |
| 业绩风险 | [描述] | 高/中/低 |
| 流动性风险 | [描述] | 高/中/低 |
| 政策风险 | [描述] | 高/中/低 |
| 其他风险 | [描述] | 高/中/低 |

### 2.2 前三持仓分析
| 证券 | 占比 | 行业 | 风险等级 | 相关性 |
|------|------|------|----------|--------|
| [证券 1] | X% | [行业] | 高/中/低 | - |
| [证券 2] | X% | [行业] | 高/中/低 | 与证券 1: X |
| [证券 3] | X% | [行业] | 高/中/低 | 与证券 1: X, 与证券 2: X |

---

## 三、行业集中度分析

### 3.1 行业分布
| 行业 | 市值 (万元) | 占比 | 行业指数涨跌 | 评价 |
|------|-------------|------|--------------|------|
| [行业 1] | [金额] | X% | +/-% | [评价] |
| [行业 2] | [金额] | X% | +/-% | [评价] |
| [行业 3] | [金额] | X% | +/-% | [评价] |
| 其他 | [金额] | X% | - | - |
| **合计** | **[金额]** | **100%** | | |

### 3.2 行业风险评估
| 行业 | 行业周期 | 政策环境 | 竞争格局 | 综合风险 |
|------|----------|----------|----------|----------|
| [行业 1] | 上升/平稳/下行 | 友好/中性/不利 | 激烈/一般/缓和 | 高/中/低 |
| [行业 2] | 上升/平稳/下行 | 友好/中性/不利 | 激烈/一般/缓和 | 高/中/低 |

---

## 四、风险预警

### 4.1 预警信号
| 预警类型 | 触发条件 | 当前状态 | 预警级别 |
|----------|----------|----------|----------|
| 单一证券集中度预警 | >40% | 是/否 | 高/中/低 |
| 前三集中度预警 | >60% | 是/否 | 高/中/低 |
| 行业集中度预警 | >50% | 是/否 | 高/中/低 |
| 持仓数量过少 | <3 只 | 是/否 | 高/中/低 |
| 高波动证券占比高 | >50% | 是/否 | 高/中/低 |

### 4.2 压力测试
| 情景 | 最大持仓跌幅 | 总资产影响 | 维保比例影响 |
|------|--------------|------------|--------------|
| 轻度压力 | -10% | -X% | -X% |
| 中度压力 | -20% | -X% | -X% |
| 重度压力 | -30% | -X% | -X% |
| 极端压力 | -50% | -X% | -X% |

### 4.3 综合风险评级
- **风险等级**:[高/中/低]
- **风险评分**:X/100
- **评级日期**:YYYY-MM-DD

---

## 五、风险控制建议

### 5.1 即时措施
- [ ] 发送集中度预警通知
- [ ] 建议分散持仓
- [ ] 限制新开仓该证券
- [ ] 建议降低最大持仓占比

### 5.2 短期措施(1 周内)
- [ ] 与客户沟通集中度风险
- [ ] 制定减仓计划
- [ ] 调整持仓结构

### 5.3 中期措施(1 月内)
- [ ] 降低该证券的折算率
- [ ] 提高该证券的保证金比例
- [ ] 限制该证券的融资买入

### 5.4 投资建议
**建议分散方向**:
- 行业分散:建议配置 [行业 1]、[行业 2]
- 证券分散:建议增加持仓数量至 X 只以上
- 板块分散:建议平衡主板/创业板/科创板配置

---

## 六、客户沟通记录

| 日期 | 沟通方式 | 沟通内容 | 客户反馈 | 跟进人 |
|------|----------|----------|----------|--------|
| [日期] | 电话/微信/面谈 | [内容] | [反馈] | [姓名] |

---

## 七、监控计划

### 监控频率
- **当前风险等级**:[等级]
- **监控频率**:每日/每周/每月
- **监控指标**:持仓集中度、单一证券占比、行业集中度

### 报告频率
- **日报**:红色预警客户
- **周报**:橙色预警客户
- **月报**:黄色预警客户

---

**编制人**:[姓名]    **日期**:YYYY-MM-DD
**审核人**:[姓名]    **日期**:YYYY-MM-DD
4. 预警阈值设置
指标正常关注预警警戒
最大持仓占比<30%30-40%40-50%>50%
前三持仓占比<50%50-60%60-70%>70%
前五持仓占比<70%70-80%80-90%>90%
单一行业占比<40%40-50%50-60%>60%
持仓数量>5 只4-5 只3 只<3 只
5. 通知模板
markdown
【XX 证券】持仓集中度预警通知

尊敬的 [客户姓名]:

您的信用账户持仓集中度较高,最大持仓 [股票名称] 占比 X%,已超过预警线 (40%)。

当前持仓情况:
- 总资产:[万元]
- 最大持仓:[股票名称],占比 X%
- 前三持仓占比:X%
- 持仓数量:X 只

集中持仓可能带来的风险:
1. 单一证券价格波动对账户影响较大
2. 行业风险集中,缺乏分散效应
3. 极端情况下可能触发维保比例预警

建议您:
1. 适当分散持仓,降低单一证券占比
2. 增加持仓数量,平衡行业配置
3. 密切关注最大持仓的价格波动

详询您的客户经理或拨打客服热线:95XXX

XX 证券股份有限公司
YYYY-MM-DD

参考资源

  • references/concentration-risk.md - 集中度风险指标
  • references/diversification-guide.md - 分散投资指南
  • references/single-stock-risk.md - 单一证券风险评估

注意事项

  • 监控应实时、准确
  • 预警应及时、有效
  • 沟通应留痕
  • 建议应合理、可行
  • 注意客户隐私保护

© 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

Files

SKILL.md and 4 other files (scripts, references) in skills/margin-risk-concentrated of aifinlab/FinClaw.

  • SKILL.md
  • references/concentration-risk.md
  • references/diversification-guide.md
  • references/single-stock-risk.md
  • scripts/analyze_concentration.py

Open the folder on GitHubat commit 9e62862

Compare with similar skills

Margin Risk Concentrated 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.

Margin Risk Concentrated compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Margin Risk Concentrated this skillaifinlab/FinClaw254—~1.5kAutomated safety check: PassApache-2.0
Riskalsk1992/CloddsBot2.9k—~2.4kAutomated safety check: PassMIT
Trader Riskruvnet/ruflo74k—~358Automated safety check: NotesMIT
Risk Management Specialistalirezarezvani/claude-skills28k1 repos~4.1kAutomated safety check: PassMIT
Conducting Cyber Risk Assessment With Nist 800 30mukul975/Anthropic-Cybersecurity-Skills34k—~2.5kAutomated safety check: PassApache-2.0
Prediction Market Risk Reviewaffaan-m/ECC276k1 repos~471Automated safety check: PassMIT

Similar skills

  • Risk

    alsk1992/CloddsBot

    Unified risk engine with VaR, stress testing, volatility regimes, and automated controls

    2.9k GitHub stars~2.4k tokensUpdated 7 days ago
    Testing & QAAuto-check passed
  • Trader Risk

    ruvnet/ruflo

    Assess portfolio risk using npx neural-trader — VaR, CVaR, Sharpe, position sizing, circuit breaker status

    74k GitHub stars~358 tokensUpdated today
    Auto-check: notes
  • Risk Management Specialist

    alirezarezvani/claude-skills

    Medical device risk management specialist implementing ISO 14971 throughout product lifecycle.

    28k GitHub starsUsed in 1 repo~4.1k tokens
    Legal & ComplianceAuto-check passed
  • Conducting Cyber Risk Assessment With Nist 800 30

    mukul975/Anthropic-Cybersecurity-Skills

    Conduct a defensible cybersecurity risk assessment using the NIST SP 800-30 Rev 1 methodology: prepare scope and a risk model, identify threat sources and threat events, identify vulnerabilities and…

    34k GitHub stars~2.5k tokensUpdated 1 mo ago
    Legal & ComplianceAuto-check passed
  • Review prediction-market, basket, oracle, and trading-agent workflows for compliance, safety, data-quality, privacy, and execution risk.

    276k GitHub starsUsed in 1 repo~471 tokens
    Data & AnalyticsAuto-check passed
  • Portfolio Risk Metrics

    wshobson/agents

    Covers portfolio risk measurement with VaR, CVaR, Sharpe, Sortino and drawdown, plus guidance on limits, stress tests and tail risk.

    40k GitHub starsUsed in 12 repos~502 tokens
    Business, Finance & HRAuto-check passed

More from aifinlab/FinClaw

All 74 skills in this repo
  • Bank Corporate Credit Dd

    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…

    254 GitHub stars~952 tokensUpdated 4 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank corporate-risk monitoring assistant for enterprise litigation/penalty/enforcement scanning (处罚/诉讼/被执行/失信等).

    254 GitHub stars~751 tokensUpdated 4 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank corporate client operating-volatility monitoring assistant (经营监测/指标波动/预警解释).

    254 GitHub stars~605 tokensUpdated 4 mo ago
    Auto-check passed
  • 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 (摘要/关键更新/风险观察/用途核验/行动项).

    254 GitHub stars~544 tokensUpdated 4 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank corporate credit issue-list assistant (问题清单/补件清单/催办台账).

    254 GitHub stars~487 tokensUpdated 4 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank corporate credit approval-opinion drafting assistant (审批意见/条款建议/有条件同意).

    254 GitHub stars~549 tokensUpdated 4 mo ago
    Auto-check passed

Questions about Margin Risk Concentrated

What does Margin Risk Concentrated do?

两融风险助手(集中持仓版)- 识别和评估集中持仓客户的融资融券风险。当用户需要监控持仓集中度高的客户、评估单一证券风险、生成集中度预警报告或制定风险控制措施时触发此技能。适用于券商两融业务、风控、营业部的风险管理场景。. Margin Risk Concentrated is an agent skill from aifinlab/FinClaw.

How do I install Margin Risk Concentrated in Claude Code?

Run `npx skills add aifinlab/FinClaw --skill margin-risk-concentrated -a claude-code`. Or copy the skill folder (skills/margin-risk-concentrated in aifinlab/FinClaw) into .claude/skills/margin-risk-concentrated in your project. Claude Code loads it when a task matches its description.

How do I install Margin Risk Concentrated in Codex?

Run `npx skills add aifinlab/FinClaw --skill margin-risk-concentrated -a codex`. Or copy the skill folder (skills/margin-risk-concentrated in aifinlab/FinClaw) into .agents/skills/margin-risk-concentrated in your project. Codex loads it when a task matches its description.

Can I use Margin Risk Concentrated 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 aifinlab/FinClaw --skill margin-risk-concentrated -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/margin-risk-concentrated, .gemini/skills/margin-risk-concentrated, .github/skills/margin-risk-concentrated and .opencode/skills/margin-risk-concentrated in your project.

What does Margin Risk Concentrated need to run?

Going by SKILL.md and its folder, Margin Risk Concentrated needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Margin Risk Concentrated 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 Margin Risk Concentrated 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 Margin Risk Concentrated use?

Margin Risk Concentrated 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.

How many tokens does Margin Risk Concentrated use?

About 1.5k tokens (SKILL.md is roughly 5.9k 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.5k tokens, read only when the agent opens those files.

What are the alternatives to Margin Risk Concentrated?

Skills that share tags, products or a category with Margin Risk Concentrated: Risk (alsk1992/CloddsBot, 2.9k stars), Trader Risk (ruvnet/ruflo, 74k stars), Risk Management Specialist (alirezarezvani/claude-skills, 28k stars) and Conducting Cyber Risk Assessment With Nist 800 30 (mukul975/Anthropic-Cybersecurity-Skills, 34k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Margin Risk Concentrated?

aifinlab (a GitHub user) maintains it in aifinlab/FinClaw, which has 254 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.