A股可解释AI/模型归因分析。当用户说"可解释AI"、"XAI"、"SHAP"、"模型解释"、"模型归因"、"explainable"、"为什么模型这样预测"时触发。基于 cn-stock-data 获取数据,对量化模型进行可解释性分析。支持 formal/brief 两种输出风格。
Scanned 9/7/2026
Install to Claude Code
npx -y skills add aifinlab/FinClaw --skill a-share-explainable-ai --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of A Share Explainable Ai?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/aifinlab-a-share-explainable-ai)More formats (shields.io, HTML) on the badges page.
---
name: a-share-explainable-ai
description: A股可解释AI/模型归因分析。当用户说"可解释AI"、"XAI"、"SHAP"、"模型解释"、"模型归因"、"explainable"、"为什么模型这样预测"时触发。基于 cn-stock-data 获取数据,对量化模型进行可解释性分析。支持 formal/brief 两种输出风格。
---
# 可解释AI/模型归因分析助手
## 数据获取
通过 cn-stock-data skill 获取数据:
- **模型预测**: ML模型的预测结果
- **特征数据**: 输入特征矩阵
- **K线数据**: 用于验证解释合理性
## 分析工作流
### Step 1: 全局解释
- 特征重要性:Gain/Permutation/SHAP全局重要性
- 部分依赖图(PDP):特征与预测的边际关系
- 特征交互:SHAP交互值识别重要特征对
- 全局代理模型:用简单模型近似复杂模型
### Step 2: 局部解释
- SHAP值:每个特征对单个预测的贡献
- LIME:局部线性近似解释单个预测
- 反事实解释:改变哪个特征可以改变预测
- 锚点解释:找到决定预测的充分条件
### Step 3: 模型诊断
- 预测偏差分析:模型在哪些子群上表现差
- 特征泄露检测:是否存在未来信息泄露
- 概念漂移:特征-标签关系是否随时间变化
- 公平性检查:模型是否对某些行业/市值有偏
### Step 4: 解释驱动优化
- 基于SHAP的特征选择:去除负贡献特征
- 基于PDP的特征工程:发现非线性关系
- 基于解释的模型调试:修正不合理的预测逻辑
- 投资者沟通:用可解释结果说服投资决策
### Step 5: 输出报告
## 输出格式
### formal 风格(研报级)
```
# 可解释AI分析报告
## 一、全局解释
| 特征 | 重要性 | 方向 |
|------|--------|------|
## 二、局部解释
[个股SHAP瀑布图]
## 三、模型诊断
[偏差分析、漂移检测]
## 四、优化建议
[基于解释的改进方向]
```
### brief 风格(快速分析)
```
## XAI速览
- Top3特征:换手率/20日动量/ROE
- 个股解释:XX被选中因为动量强+质量高
- 模型无明显偏差
- 建议:去除2个负贡献特征
```
参考 `references/explainable-ai-guide.md` 获取详细方法论与 A股实证研究。
## 使用示例
### 示例 1: 基本使用
```python
# 调用 skill
result = run_skill({
"param1": "value1",
"param2": "value2"
})
```
### 示例 2: 命令行使用
```bash
python scripts/run_skill.py --input data.json
```
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Create Mermaid diagrams for flowcharts, sequences, ERDs, and
Understand the components, mechanics, and constraints of context in agent systems. Use when designing agent architectures, debugging context-related failures, or optimizing context usage.
Draft release notes and changelog entries from git history or merged PRs between two refs (tags/SHAs/branches), including breaking changes, migrations, and upgrade steps. Use when the user asks for release notes, changelog updates, or a GitHub Release draft.
Documentation style guide enforcer by @planetabhi. Applies and reviews the writing style guide when authoring or editing product documentation and tutorials. Use to check prose for voice, tense, word choice, inclusive language, formatting, code block, UI, Markdown, and number/date conventions.
Quick-reference card for all caveman modes, skills, and commands. One-shot display, not a persistent mode. Trigger: /caveman-help, "caveman help", "what caveman commands", "how do I use caveman".