sophhub 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/package.json +1 -1
  2. package/skills/consensus/skill.json +20 -0
  3. package/skills/consensus/src/SKILL.md +93 -0
  4. package/skills/deepwiki/skill.json +20 -0
  5. package/skills/deepwiki/src/SKILL.md +45 -0
  6. package/skills/deepwiki/src/_meta.json +6 -0
  7. package/skills/deepwiki/src/scripts/deepwiki.js +135 -0
  8. package/skills/feishu-bitable/skill.json +20 -0
  9. package/skills/feishu-bitable/src/CHECKLIST.md +150 -0
  10. package/skills/feishu-bitable/src/README.md +178 -0
  11. package/skills/feishu-bitable/src/SKILL.md +113 -0
  12. package/skills/feishu-bitable/src/_meta.json +6 -0
  13. package/skills/feishu-bitable/src/api.js +381 -0
  14. package/skills/feishu-bitable/src/bin/cli.js +284 -0
  15. package/skills/feishu-bitable/src/description.md +143 -0
  16. package/skills/feishu-bitable/src/examples/create-records.json +52 -0
  17. package/skills/feishu-bitable/src/examples/create-table.json +64 -0
  18. package/skills/feishu-bitable/src/package-lock.json +324 -0
  19. package/skills/feishu-bitable/src/package.json +33 -0
  20. package/skills/feishu-bitable/src/publish-config.json +14 -0
  21. package/skills/feishu-bitable/src/test-simple.js +61 -0
  22. package/skills/feishu-bitable/src/utils.js +261 -0
  23. package/skills/flight-booking/skill.json +9 -2
  24. package/skills/flight-booking/src/scripts/flight_booking.py +2 -1
  25. package/skills/google-maps/skill.json +20 -0
  26. package/skills/google-maps/src/SKILL.md +237 -0
  27. package/skills/google-maps/src/_meta.json +6 -0
  28. package/skills/google-maps/src/lib/map_helper.py +912 -0
  29. package/skills/large-task-router/skill.json +20 -0
  30. package/skills/large-task-router/src/SKILL.md +79 -0
  31. package/skills/large-task-router/src/templates/plan.md +74 -0
  32. package/skills/skillhub/skill.json +11 -4
  33. package/skills/skillhub/src/SKILL.md +11 -1
  34. package/skills/sophnet-dailynews/skill.json +20 -0
  35. package/skills/sophnet-dailynews/src/SKILL.md +179 -0
  36. package/skills/sophnet-dailynews/src/cache.json +151 -0
  37. package/skills/sophnet-dailynews/src/sources.json +230 -0
  38. package/skills/sophnet-schedule/skill.json +20 -0
  39. package/skills/sophnet-schedule/src/ARCHITECTURE.md +321 -0
  40. package/skills/sophnet-schedule/src/IMPROVEMENTS.md +145 -0
  41. package/skills/sophnet-schedule/src/SKILL.md +1050 -0
  42. package/skills/sophnet-schedule/src/_meta.json +6 -0
  43. package/skills/sophnet-schedule/src/api/__init__.py +0 -0
  44. package/skills/sophnet-schedule/src/api/models.py +245 -0
  45. package/skills/sophnet-schedule/src/apps/add_event.py +237 -0
  46. package/skills/sophnet-schedule/src/apps/check_reminders.py +112 -0
  47. package/skills/sophnet-schedule/src/apps/check_roc.py +246 -0
  48. package/skills/sophnet-schedule/src/apps/generate_daily_plan.py +342 -0
  49. package/skills/sophnet-schedule/src/apps/import_events.py +216 -0
  50. package/skills/sophnet-schedule/src/apps/monitor_calendar_changes.py +140 -0
  51. package/skills/sophnet-schedule/src/apps/register_tasks.py +169 -0
  52. package/skills/sophnet-schedule/src/apps/sync_roc_to_gcal.py +174 -0
  53. package/skills/sophnet-schedule/src/compat.py +66 -0
  54. package/skills/sophnet-schedule/src/config/__init__.py +0 -0
  55. package/skills/sophnet-schedule/src/config/reminder_rules.yaml +96 -0
  56. package/skills/sophnet-schedule/src/config/roc_events.yaml +44 -0
  57. package/skills/sophnet-schedule/src/config/settings.py +133 -0
  58. package/skills/sophnet-schedule/src/config/task_registry.yaml +92 -0
  59. package/skills/sophnet-schedule/src/docs/FRONTEND_INTEGRATION_GUIDE.md +437 -0
  60. package/skills/sophnet-schedule/src/gcal/__init__.py +0 -0
  61. package/skills/sophnet-schedule/src/gcal/client.py +374 -0
  62. package/skills/sophnet-schedule/src/gcal/models.py +91 -0
  63. package/skills/sophnet-schedule/src/requirements.txt +6 -0
  64. package/skills/sophnet-schedule/src/scripts/setup_gcal_token.py +85 -0
  65. package/skills/sophnet-schedule/src/server.py +669 -0
  66. package/skills/sophnet-schedule/src/services/__init__.py +0 -0
  67. package/skills/sophnet-schedule/src/services/calendar_backend.py +139 -0
  68. package/skills/sophnet-schedule/src/services/conflict_detector.py +96 -0
  69. package/skills/sophnet-schedule/src/services/datetime_utils.py +117 -0
  70. package/skills/sophnet-schedule/src/services/event_classifier.py +100 -0
  71. package/skills/sophnet-schedule/src/services/event_diff.py +160 -0
  72. package/skills/sophnet-schedule/src/services/google_integration.py +500 -0
  73. package/skills/sophnet-schedule/src/services/job_store.py +100 -0
  74. package/skills/sophnet-schedule/src/services/local_event_store.py +266 -0
  75. package/skills/sophnet-schedule/src/services/reminder_planner.py +116 -0
  76. package/skills/sophnet-schedule/src/services/runtime_utils.py +31 -0
  77. package/skills/sophnet-schedule/src/services/table_parser.py +286 -0
  78. package/skills/sophnet-schedule/src/services/task_builder.py +167 -0
  79. package/skills/sophnet-schedule/src/services/time_window.py +72 -0
  80. package/skills/sophnet-stock/skill.json +20 -0
  81. package/skills/sophnet-stock/src/App-Plan.md +442 -0
  82. package/skills/sophnet-stock/src/README.md +214 -0
  83. package/skills/sophnet-stock/src/SKILL.md +236 -0
  84. package/skills/sophnet-stock/src/TODO.md +394 -0
  85. package/skills/sophnet-stock/src/_meta.json +6 -0
  86. package/skills/sophnet-stock/src/docs/ARCHITECTURE.md +408 -0
  87. package/skills/sophnet-stock/src/docs/CONCEPT.md +233 -0
  88. package/skills/sophnet-stock/src/docs/HOT_SCANNER.md +288 -0
  89. package/skills/sophnet-stock/src/docs/README.md +95 -0
  90. package/skills/sophnet-stock/src/docs/USAGE.md +465 -0
  91. package/skills/sophnet-stock/src/scripts/analyze_stock.py +2565 -0
  92. package/skills/sophnet-stock/src/scripts/dividends.py +365 -0
  93. package/skills/sophnet-stock/src/scripts/hot_scanner.py +582 -0
  94. package/skills/sophnet-stock/src/scripts/portfolio.py +548 -0
  95. package/skills/sophnet-stock/src/scripts/rumor_scanner.py +342 -0
  96. package/skills/sophnet-stock/src/scripts/test_stock_analysis.py +409 -0
  97. package/skills/sophnet-stock/src/scripts/watchlist.py +336 -0
  98. package/skills/xiaohongshu/skill.json +20 -0
  99. package/skills/xiaohongshu/src/SKILL.md +91 -0
  100. package/skills/xiaohongshu/src/_meta.json +6 -0
  101. package/skills/xiaohongshu/src/assets/card.html +216 -0
  102. package/skills/xiaohongshu/src/assets/cover.html +82 -0
  103. package/skills/xiaohongshu/src/assets/example.md +84 -0
  104. package/skills/xiaohongshu/src/assets/styles.css +318 -0
  105. package/skills/xiaohongshu/src/scripts/render_xhs_v2.py +737 -0
  106. package/skills/xiaohongshu/src/scripts/sign_server.py +158 -0
  107. package/skills/xiaohongshu/src/scripts/stealth.min.js +7 -0
  108. package/skills/xiaohongshu/src/scripts/xhs_tool.py +186 -0
  109. package/skills/xiaohongshu/src/workflow.py +185 -0
@@ -0,0 +1,288 @@
1
+ # 🔥 Hot Scanner
2
+
3
+ Find viral stocks & crypto trends in real-time by aggregating multiple data sources.
4
+
5
+ ## Overview
6
+
7
+ The Hot Scanner answers one question: **"What's hot right now?"**
8
+
9
+ It aggregates data from:
10
+ - CoinGecko (trending coins, biggest movers)
11
+ - Google News (finance & crypto headlines)
12
+ - Yahoo Finance (gainers, losers, most active)
13
+ - Twitter/X (social sentiment, optional)
14
+
15
+ ## Quick Start
16
+
17
+ ```bash
18
+ # Full scan with all sources
19
+ python3 scripts/hot_scanner.py
20
+
21
+ # Skip social media (faster)
22
+ python3 scripts/hot_scanner.py --no-social
23
+
24
+ # JSON output for automation
25
+ python3 scripts/hot_scanner.py --json
26
+ ```
27
+
28
+ ## Output Format
29
+
30
+ ### Console Output
31
+
32
+ ```
33
+ ============================================================
34
+ 🔥 HOT SCANNER v2 - What's Trending Right Now?
35
+ 📅 2026-02-02 10:45:30 UTC
36
+ ============================================================
37
+
38
+ 📊 TOP TRENDING (by buzz):
39
+ 1. BTC (6 pts) [CoinGecko, Google News] 📉 bearish (-2.5%)
40
+ 2. ETH (5 pts) [CoinGecko, Twitter] 📉 bearish (-7.2%)
41
+ 3. NVDA (3 pts) [Google News, Yahoo] 📰 Earnings beat...
42
+
43
+ 🪙 CRYPTO HIGHLIGHTS:
44
+ 🚀 RIVER River +14.0%
45
+ 📉 BTC Bitcoin -2.5%
46
+ 📉 ETH Ethereum -7.2%
47
+
48
+ 📈 STOCK MOVERS:
49
+ 🟢 NVDA (gainers)
50
+ 🔴 TSLA (losers)
51
+ 📊 AAPL (most active)
52
+
53
+ 🐦 SOCIAL BUZZ:
54
+ [twitter] Bitcoin to $100k prediction...
55
+ [reddit_wsb] GME yolo update...
56
+
57
+ 📰 BREAKING NEWS:
58
+ [BTC, ETH] Crypto crash: $2.5B liquidated...
59
+ [NVDA] Nvidia beats earnings expectations...
60
+ ```
61
+
62
+ ### JSON Output
63
+
64
+ ```json
65
+ {
66
+ "scan_time": "2026-02-02T10:45:30+00:00",
67
+ "top_trending": [
68
+ {
69
+ "symbol": "BTC",
70
+ "mentions": 6,
71
+ "sources": ["CoinGecko Trending", "Google News"],
72
+ "signals": ["📉 bearish (-2.5%)"]
73
+ }
74
+ ],
75
+ "crypto_highlights": [...],
76
+ "stock_highlights": [...],
77
+ "social_buzz": [...],
78
+ "breaking_news": [...]
79
+ }
80
+ ```
81
+
82
+ ## Data Sources
83
+
84
+ ### CoinGecko (No Auth Required)
85
+
86
+ | Endpoint | Data |
87
+ |----------|------|
88
+ | `/search/trending` | Top 15 trending coins |
89
+ | `/coins/markets` | Top 100 by market cap with 24h changes |
90
+
91
+ **Scoring:** Trending coins get 2 points, movers with >3% change get 1 point.
92
+
93
+ ### Google News RSS (No Auth Required)
94
+
95
+ | Feed | Content |
96
+ |------|---------|
97
+ | Business News | General finance headlines |
98
+ | Crypto Search | Bitcoin, Ethereum, crypto keywords |
99
+
100
+ **Ticker Extraction:** Uses regex patterns and company name mappings.
101
+
102
+ ### Yahoo Finance (No Auth Required)
103
+
104
+ | Page | Data |
105
+ |------|------|
106
+ | `/gainers` | Top gaining stocks |
107
+ | `/losers` | Top losing stocks |
108
+ | `/most-active` | Highest volume stocks |
109
+
110
+ **Note:** Requires gzip decompression.
111
+
112
+ ### Twitter/X (Auth Required)
113
+
114
+ Uses [bird CLI](https://github.com/steipete/bird) for Twitter search.
115
+
116
+ **Searches:**
117
+ - `stock OR $SPY OR $QQQ OR earnings`
118
+ - `bitcoin OR ethereum OR crypto OR $BTC`
119
+
120
+ ## Twitter/X Setup
121
+
122
+ ### 1. Install bird CLI
123
+
124
+ ```bash
125
+ # macOS
126
+ brew install steipete/tap/bird
127
+
128
+ # npm
129
+ npm install -g @steipete/bird
130
+ ```
131
+
132
+ ### 2. Get Auth Tokens
133
+
134
+ **Option A: Browser cookies (macOS)**
135
+ 1. Login to x.com in Safari/Chrome
136
+ 2. Grant Terminal "Full Disk Access" in System Settings
137
+ 3. Run `bird whoami` to verify
138
+
139
+ **Option B: Manual extraction**
140
+ 1. Open x.com in Chrome
141
+ 2. DevTools (F12) → Application → Cookies → x.com
142
+ 3. Copy `auth_token` and `ct0` values
143
+
144
+ ### 3. Configure
145
+
146
+ Create `.env` file in the skill directory:
147
+
148
+ ```bash
149
+ # /path/to/stock-analysis/.env
150
+ AUTH_TOKEN=your_auth_token_here
151
+ CT0=your_ct0_token_here
152
+ ```
153
+
154
+ Or export as environment variables:
155
+
156
+ ```bash
157
+ export AUTH_TOKEN="..."
158
+ export CT0="..."
159
+ ```
160
+
161
+ ### 4. Verify
162
+
163
+ ```bash
164
+ bird whoami
165
+ # Should show: 🙋 @YourUsername
166
+ ```
167
+
168
+ ## Scoring System
169
+
170
+ Each mention from a source adds points:
171
+
172
+ | Source | Points |
173
+ |--------|--------|
174
+ | CoinGecko Trending | 2 |
175
+ | CoinGecko Movers | 1 |
176
+ | Google News | 1 |
177
+ | Yahoo Finance | 1 |
178
+ | Twitter/X | 1 |
179
+ | Reddit (high score) | 2 |
180
+ | Reddit (normal) | 1 |
181
+
182
+ Symbols are ranked by total points across all sources.
183
+
184
+ ## Ticker Extraction
185
+
186
+ ### Patterns
187
+
188
+ ```python
189
+ # Cashtag: $AAPL
190
+ r'\$([A-Z]{1,5})\b'
191
+
192
+ # Parentheses: (AAPL)
193
+ r'\(([A-Z]{2,5})\)'
194
+
195
+ # Stock mentions: AAPL stock, AAPL shares
196
+ r'\b([A-Z]{2,5})(?:\'s|:|\s+stock|\s+shares)'
197
+ ```
198
+
199
+ ### Company Mappings
200
+
201
+ ```python
202
+ {
203
+ "Apple": "AAPL",
204
+ "Microsoft": "MSFT",
205
+ "Tesla": "TSLA",
206
+ "Nvidia": "NVDA",
207
+ "Bitcoin": "BTC",
208
+ "Ethereum": "ETH",
209
+ # ... etc
210
+ }
211
+ ```
212
+
213
+ ### Crypto Keywords
214
+
215
+ ```python
216
+ {
217
+ "bitcoin": "BTC",
218
+ "ethereum": "ETH",
219
+ "solana": "SOL",
220
+ "dogecoin": "DOGE",
221
+ # ... etc
222
+ }
223
+ ```
224
+
225
+ ## Automation
226
+
227
+ ### Cron Job
228
+
229
+ ```bash
230
+ # Daily at 8 AM
231
+ 0 8 * * * cd /path/to/stock-analysis && python3 scripts/hot_scanner.py --json > cache/daily_scan.json
232
+ ```
233
+
234
+ ### OpenClaw Integration
235
+
236
+ ```yaml
237
+ # Cron job config
238
+ name: "🔥 Daily Hot Scanner"
239
+ schedule:
240
+ kind: cron
241
+ expr: "0 8 * * *"
242
+ tz: "Europe/Berlin"
243
+ payload:
244
+ kind: agentTurn
245
+ message: "Run hot scanner and summarize results"
246
+ deliver: true
247
+ sessionTarget: isolated
248
+ ```
249
+
250
+ ## Caching
251
+
252
+ Results are saved to:
253
+ - `cache/hot_scan_latest.json` — Most recent scan
254
+
255
+ ## Limitations
256
+
257
+ - **Reddit:** Blocked without OAuth (403). Requires API application.
258
+ - **Twitter:** Requires auth tokens, may expire.
259
+ - **Yahoo:** Sometimes rate-limited.
260
+ - **Google News:** RSS URLs may change.
261
+
262
+ ## Future Enhancements
263
+
264
+ - [ ] Reddit API integration (PRAW)
265
+ - [ ] StockTwits integration
266
+ - [ ] Google Trends
267
+ - [ ] Historical trend tracking
268
+ - [ ] Alert thresholds (notify when score > X)
269
+
270
+ ## Troubleshooting
271
+
272
+ ### Twitter not working
273
+
274
+ ```bash
275
+ # Check auth
276
+ bird whoami
277
+
278
+ # Should see your username
279
+ # If not, re-export tokens
280
+ ```
281
+
282
+ ### Yahoo 403 or gzip errors
283
+
284
+ The scanner handles gzip automatically. If issues persist, Yahoo may be rate-limiting.
285
+
286
+ ### No tickers found
287
+
288
+ Check that news headlines contain recognizable patterns. The scanner uses conservative extraction to avoid false positives.
@@ -0,0 +1,95 @@
1
+ # Documentation
2
+
3
+ ## Stock Analysis v6.1
4
+
5
+ This folder contains detailed documentation for the Stock Analysis skill.
6
+
7
+ ## Contents
8
+
9
+ | Document | Description |
10
+ |----------|-------------|
11
+ | [CONCEPT.md](./CONCEPT.md) | Philosophy, ideas, and design rationale |
12
+ | [USAGE.md](./USAGE.md) | Practical usage guide with examples |
13
+ | [ARCHITECTURE.md](./ARCHITECTURE.md) | Technical implementation details |
14
+ | [HOT_SCANNER.md](./HOT_SCANNER.md) | 🔥 Viral trend detection (NEW) |
15
+
16
+ ## Quick Links
17
+
18
+ ### For Users
19
+
20
+ Start with **[USAGE.md](./USAGE.md)** — it has practical examples for:
21
+ - Basic stock analysis
22
+ - Comparing stocks
23
+ - Crypto analysis
24
+ - Dividend investing
25
+ - Portfolio management
26
+ - Watchlist & alerts
27
+
28
+ ### For Understanding
29
+
30
+ Read **[CONCEPT.md](./CONCEPT.md)** to understand:
31
+ - Why 8 dimensions?
32
+ - How scoring works
33
+ - Contrarian signals
34
+ - Risk detection philosophy
35
+ - Limitations we acknowledge
36
+
37
+ ### For Developers
38
+
39
+ Check **[ARCHITECTURE.md](./ARCHITECTURE.md)** for:
40
+ - System overview diagram
41
+ - Data flow
42
+ - Caching strategy
43
+ - File structure
44
+ - Performance optimization
45
+
46
+ ## Quick Start
47
+
48
+ ```bash
49
+ # Analyze a stock
50
+ uv run scripts/analyze_stock.py AAPL
51
+
52
+ # Fast mode (2-3 seconds)
53
+ uv run scripts/analyze_stock.py AAPL --fast
54
+
55
+ # Dividend analysis
56
+ uv run scripts/dividends.py JNJ
57
+
58
+ # Watchlist
59
+ uv run scripts/watchlist.py add AAPL --target 200
60
+ uv run scripts/watchlist.py check
61
+ ```
62
+
63
+ ## Key Concepts
64
+
65
+ ### The 8 Dimensions
66
+
67
+ 1. **Earnings Surprise** (30%) — Did they beat expectations?
68
+ 2. **Fundamentals** (20%) — P/E, margins, growth, debt
69
+ 3. **Analyst Sentiment** (20%) — Professional consensus
70
+ 4. **Historical Patterns** (10%) — Past earnings reactions
71
+ 5. **Market Context** (10%) — VIX, SPY/QQQ trends
72
+ 6. **Sector Performance** (15%) — Relative strength
73
+ 7. **Momentum** (15%) — RSI, 52-week range
74
+ 8. **Sentiment** (10%) — Fear/Greed, shorts, insiders
75
+
76
+ ### Signal Thresholds
77
+
78
+ | Score | Recommendation |
79
+ |-------|----------------|
80
+ | > +0.33 | **BUY** |
81
+ | -0.33 to +0.33 | **HOLD** |
82
+ | < -0.33 | **SELL** |
83
+
84
+ ### Risk Flags
85
+
86
+ - ⚠️ Pre-earnings (< 14 days)
87
+ - ⚠️ Post-spike (> 15% in 5 days)
88
+ - ⚠️ Overbought (RSI > 70 + near 52w high)
89
+ - ⚠️ Risk-off mode (GLD/TLT/UUP rising)
90
+ - ⚠️ Geopolitical keywords
91
+ - ⚠️ Breaking news alerts
92
+
93
+ ## Disclaimer
94
+
95
+ ⚠️ **NOT FINANCIAL ADVICE.** For informational purposes only. Always do your own research and consult a licensed financial advisor.