技能理念矿工
- 作者仓库星标 1,568
- 作者仓库 claude-trading-skills
- 领域
- 数据
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @tradermonty · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- Python >=3.10
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Dry-run: preview mined candidates without LLM scoring
python3 scripts/mine_session_logs.py --dry-run --output-dir reports/
# Full mining with scoring (requires Claude CLI)
python3 scripts/mine_session_logs.py --output-dir reports/
# Score existing candidates
python3 scripts/score_ideas.py \
--candidates reports/raw_candidates.yaml \
--output-dir logs/
# Skill Idea Miner
Automatically extract skill idea candidates from Claude Code session logs,
score them for novelty, feasibility, and trading value, and maintain a
prioritized backlog for downstream skill generation.
## When to Use
- Weekly automated pipeline run (Saturday 06:00 via launchd)
- Manual backlog refresh: `python3 scripts/run_skill_generation_pipeline.py --mode weekly`
- Dry-run to preview candidates without LLM scoring
## Prerequisites
- **Python 3.10+** with `pyyaml` package
- **Claude CLI** installed and authenticated (`claude --version` to verify)
- **Session logs** in `~/.claude/projects/<project>/` (created automatically by Claude Code)
- No API keys required (uses Claude CLI for LLM calls)
## Workflow
### Quick Start
```bash
# Dry-run: preview mined candidates without LLM scoring
python3 scripts/mine_session_logs.py --dry-run --output-dir reports/
# Full mining with scoring (requires Claude CLI)
python3 scripts/mine_session_logs.py --output-dir reports/
# Score existing candidates
python3 scripts/score_ideas.py \
--candidates reports/raw_candidates.yaml \
--output-dir logs/
```
### Stage 1: Session Log Mining
1. Enumerate session logs from allowlist projects in `~/.claude/projects/`
2. Filter to past 7 days by file mtime, confirm with `timestamp` field
3. Extract user messages (`type: "user"`, `userType: "external"`)
4. Extract tool usage patterns from assistant messages
5. Run deterministic signal detection:
- Skill usage frequency (`skills/*/` path references)
- Error patterns (non-zero exit codes, `is_error` flags, exception keywords)
- Repetitive tool sequences (3+ tools repeated 3+ times)
- Automation request keywords (English and Japanese)
- Unresolved requests (5+ minute gap after user message)
6. Invoke Claude CLI headless for idea abstraction
7. Output `raw_candidates.yaml`
### Stage 2: Scoring and Deduplication
1. Load existing skills from `skills/*/SKILL.md` frontmatter
2. Deduplicate via Jaccard similarity (threshold > 0.5) against:
- Existing skill names and descriptions
- Existing backlog ideas
3. Score non-duplicate candidates with Claude CLI:
- Novelty (0-100): differentiation from existing skills
- Feasibility (0-100): technical implementability
- Trading Value (0-100): practical value for investors/traders
- Composite = 0.3 * Novelty + 0.3 * Feasibility + 0.4 * Trading Value
4. Merge scored candidates into `logs/.skill_generation_backlog.yaml`
## Output Format
### raw_candidates.yaml
```yaml
generated_at_utc: "2026-03-08T06:00:00Z"
period: {from: "2026-03-01", to: "2026-03-07"}
projects_scanned: ["claude-trading-skills"]
sessions_scanned: 12
candidates:
- id: "raw_2026w10_001"
title: "Earnings Whispers Image Parser"
source_project: "claude-trading-skills"
evidence:
user_requests: ["Extract earnings dates from screenshot"]
pain_points: ["Manual image reading"]
frequency: 3
raw_description: "Parse Earnings Whispers screenshots to extract dates."
category: "data-extraction"
```
### Backlog (logs/.skill_generation_backlog.yaml)
```yaml
updated_at_utc: "2026-03-08T06:15:00Z"
ideas:
- id: "idea_2026w10_001"
title: "Earnings Whispers Image Parser"
description: "Skill that parses Earnings Whispers screenshots..."
category: "data-extraction"
scores: {novelty: 75, feasibility: 60, trading_value: 80, composite: 73}
status: "pending"
```
## Resources
- `references/idea_extraction_rubric.md` — Signal detection criteria and scoring rubric
- `scripts/mine_session_logs.py` — Session log parser
- `scripts/score_ideas.py` — Scorer and deduplicator
章节与文件索引
按说明文件中的顺序排列。
何时使用
先决条件
第一阶段:会话日志挖掘
第 2 阶段:评分和重复数据删除
资源
文件/命令 -> python3 scripts/run_skill_generation_pipeline.py --mode weekly · pyyaml · claude --version · ~/.claude/projects/<project>/ · ~/.claude/projects/ · timestamp · type: "user" · userType: "external"
内容校验值 -> 2f6a8e4ffe61
当前原文的自动摘译,尚未人工审校。
何时使用
每周自动管道运行(周六 06:00 通过 launchd)手动待办事项刷新:
python3 scripts/run_skill_generation_pipeline.py --mode weekly试运行以预览候选人,无需 LLM 评分先决条件
Python 3.10+,带有
pyyaml软件包 Claude CLI 安装并经过身份验证(claude --version进行验证) 会话日志~/.claude/projects/<project>/(由 Claude 代码自动创建) 无需 API 密钥(使用 Claude CLI 进行 LLM 调用)第一阶段:会话日志挖掘
枚举
~/.claude/projects/中白名单项目的会话日志 按文件 mtime 过滤到过去 7 天,使用timestamp字段确认 提取用户消息(type: "user"、userType: "external") 从辅助消息中提取工具使用模式 运行确定性信号检测:第 2 阶段:评分和重复数据删除
从
skills/*/SKILL.mdfrontmatter 加载现有技能 通过 Jaccard 相似度(阈值 > 0.5)进行重复数据删除: 现有技能名称和描述 现有待办事项想法 使用 Claude CLI 对非重复候选人进行评分:资源
references/idea_extraction_rubric.md— 信号检测标准和评分标准scripts/mine_session_logs.py— 会话日志解析器scripts/score_ideas.py— 评分器和重复数据删除器