Initial commit: skills library

- 70 skills with code and documentation
- Add .gitignore (ignore __pycache__, output/, temp/, venv/)
- Clean up test intermediates and caches
This commit is contained in:
hmo
2026-04-26 19:27:40 +08:00
commit 04db423416
861 changed files with 210414 additions and 0 deletions
+111
View File
@@ -0,0 +1,111 @@
# 股票分析技能规范
## 核心原则
**所有股票分析必须基于实时、准确的市场数据,严禁凭空猜测或想象**
### 数据验证要求
1. **价格验证**:任何提及的股票价格必须通过实时数据源验证
2. **名称验证**:股票名称必须通过代码查询确认,不能依赖OCR识别结果
3. **趋势分析**:必须基于最近3-6个月的历史数据和当前市场环境
4. **建议可操作性**:建仓价位必须在合理历史区间内,具有实际可操作性
### 执行流程
#### 第一步:图片识别
- 使用统一视觉分析器识别股票截图
- 输出原始股票代码和名称列表
#### 第二步:数据验证
- 对每个股票代码进行实时查询:
- 当前价格
- 历史价格区间(近6个月)
- 正确股票名称
- 最新新闻和行业动态
#### 第三步:分析生成
- 基于验证后的数据生成分析报告
- 建仓建议必须符合历史价格区间
- 风险控制措施必须具体可行
### 禁止行为
**严禁以下行为**
- 给出不切实际的建仓价位(如要求股价回到一年前低点)
- 未验证当前市场价格就给出操作建议
- 依赖OCR识别结果而不进行代码验证
- 凭空猜测股票基本面或技术面情况
### 必须执行
**必须执行以下步骤**
- 每个股票代码都要进行实时价格查询
- 建仓价位必须在近期合理区间内(通常为当前价±10-15%)
- 提供具体的止损和目标价位
- 结合当前市场环境给出操作时机建议
### 技术实现
```python
def validate_stock_data(stock_code: str) -> dict:
"""验证股票数据"""
# 1. 查询当前价格
current_price = get_current_price(stock_code)
# 2. 查询历史价格区间
price_range = get_historical_range(stock_code, months=6)
# 3. 验证股票名称
correct_name = get_stock_name_by_code(stock_code)
# 4. 获取最新新闻
latest_news = get_latest_news(stock_code)
return {
'code': stock_code,
'name': correct_name,
'current_price': current_price,
'price_range_6m': price_range,
'latest_news': latest_news
}
def generate_actionable_advice(stock_data: dict) -> dict:
"""生成可操作建议"""
current = stock_data['current_price']
low_6m, high_6m = stock_data['price_range_6m']
# 合理建仓区间(通常为当前价下方5-15%)
entry_zone_low = max(current * 0.85, low_6m)
entry_zone_high = min(current * 0.95, current)
# 目标价位(基于历史高点和基本面)
target_price = min(high_6m * 1.1, current * 1.3)
# 止损价位
stop_loss = max(low_6m * 0.9, current * 0.8)
return {
'entry_zone': f"{entry_zone_low:.2f}-{entry_zone_high:.2f}",
'target_price': f"{target_price:.2f}",
'stop_loss': f"{stop_loss:.2f}",
'position_size': '小仓位试水' if current > high_6m * 0.9 else '可积极建仓'
}
```
### 质量保证
**每次股票分析必须包含以下要素**
1. ✅ 股票代码和正确名称
2. ✅ 当前实时价格
3. ✅ 近6个月价格区间
4. ✅ 具体可操作的建仓区间
5. ✅ 明确的目标价和止损价
6. ✅ 基于当前市场环境的操作时机建议
**审核清单**
- [ ] 所有价格数据已验证
- [ ] 建仓建议具有可操作性
- [ ] 风险控制措施具体明确
- [ ] 分析基于实时市场数据
- [ ] 无凭空猜测或想象内容