@charzhu/openjaw-agent 0.2.0

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.
@@ -0,0 +1,174 @@
1
+ ---
2
+ name: create-docx
3
+ description: "Create, read, and edit Word documents (.docx) with professional formatting."
4
+ whenToUse: "User asks to create a Word document, .docx file"
5
+ ---
6
+
7
+ # Skill: Create Word Document (DOCX)
8
+
9
+ ## Description
10
+ Create, read, and edit Word documents (.docx) with professional formatting, tables, images, headers/footers, and Chinese font support. Use this when user wants a Word document deliverable.
11
+
12
+ ## When to Use
13
+ - User asks to create a Word document, .docx file
14
+ - User says "帮我做个Word文档" or "create a docx"
15
+ - User wants a formatted report/proposal/spec as Word (not PDF)
16
+ - User wants to edit an existing .docx file
17
+
18
+ ## Prerequisites
19
+ - Python with `python-docx` library
20
+ - Install if needed: `pip install python-docx`
21
+
22
+ ## Creating Documents with python-docx
23
+
24
+ ### 1. Basic Setup
25
+ ```python
26
+ from docx import Document
27
+ from docx.shared import Inches, Pt, Cm, RGBColor
28
+ from docx.enum.text import WD_ALIGN_PARAGRAPH
29
+ from docx.enum.style import WD_STYLE_TYPE
30
+
31
+ doc = Document()
32
+
33
+ # Set default font (Chinese support)
34
+ style = doc.styles['Normal']
35
+ font = style.font
36
+ font.name = 'Microsoft YaHei'
37
+ font.size = Pt(11)
38
+
39
+ # For East Asian font fallback
40
+ from docx.oxml.ns import qn
41
+ style.element.rPr.rFonts.set(qn('w:eastAsia'), 'Microsoft YaHei')
42
+ ```
43
+
44
+ ### 2. Content Elements
45
+
46
+ #### Headings
47
+ ```python
48
+ doc.add_heading('Title', level=0) # Document title
49
+ doc.add_heading('Section', level=1) # Major section
50
+ doc.add_heading('Subsection', level=2) # Minor section
51
+ ```
52
+
53
+ #### Paragraphs
54
+ ```python
55
+ p = doc.add_paragraph('Normal paragraph text.')
56
+ p.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
57
+
58
+ # Bold, italic, colored text
59
+ p = doc.add_paragraph()
60
+ run = p.add_run('Bold text ')
61
+ run.bold = True
62
+ run = p.add_run('and normal text.')
63
+ ```
64
+
65
+ #### Bullet Lists
66
+ ```python
67
+ doc.add_paragraph('First item', style='List Bullet')
68
+ doc.add_paragraph('Second item', style='List Bullet')
69
+ doc.add_paragraph('Numbered item', style='List Number')
70
+ ```
71
+
72
+ #### Tables
73
+ ```python
74
+ table = doc.add_table(rows=3, cols=3, style='Light Grid Accent 1')
75
+ # Set header row
76
+ hdr_cells = table.rows[0].cells
77
+ hdr_cells[0].text = 'Column 1'
78
+ hdr_cells[1].text = 'Column 2'
79
+ hdr_cells[2].text = 'Column 3'
80
+ # Add data
81
+ row = table.rows[1].cells
82
+ row[0].text = 'Data 1'
83
+ row[1].text = 'Data 2'
84
+ row[2].text = 'Data 3'
85
+ ```
86
+
87
+ #### Images
88
+ ```python
89
+ doc.add_picture('image.png', width=Inches(4))
90
+ ```
91
+
92
+ #### Page Breaks
93
+ ```python
94
+ doc.add_page_break()
95
+ ```
96
+
97
+ ### 3. Headers and Footers
98
+ ```python
99
+ section = doc.sections[0]
100
+ header = section.header
101
+ header_para = header.paragraphs[0]
102
+ header_para.text = "CONFIDENTIAL"
103
+ header_para.alignment = WD_ALIGN_PARAGRAPH.RIGHT
104
+
105
+ footer = section.footer
106
+ footer_para = footer.paragraphs[0]
107
+ footer_para.text = "Page "
108
+ # Note: auto page numbers require XML manipulation
109
+ ```
110
+
111
+ ### 4. Page Setup
112
+ ```python
113
+ from docx.shared import Cm
114
+ section = doc.sections[0]
115
+ section.page_height = Cm(29.7) # A4
116
+ section.page_width = Cm(21.0)
117
+ section.top_margin = Cm(2.54)
118
+ section.bottom_margin = Cm(2.54)
119
+ section.left_margin = Cm(2.54)
120
+ section.right_margin = Cm(2.54)
121
+ ```
122
+
123
+ ### 5. Custom Styles
124
+ ```python
125
+ # Create a custom style
126
+ custom_style = doc.styles.add_style('CustomQuote', WD_STYLE_TYPE.PARAGRAPH)
127
+ custom_style.font.italic = True
128
+ custom_style.font.color.rgb = RGBColor(0x66, 0x66, 0x66)
129
+ custom_style.font.size = Pt(10)
130
+ custom_style.paragraph_format.left_indent = Cm(1.5)
131
+ ```
132
+
133
+ ### 6. Save
134
+ ```python
135
+ import os, tempfile
136
+ output_path = os.path.join(tempfile.gettempdir(), 'document.docx')
137
+ doc.save(output_path)
138
+ ```
139
+
140
+ ## Reading Existing Documents
141
+ ```python
142
+ doc = Document('existing.docx')
143
+
144
+ # Read all paragraphs
145
+ for para in doc.paragraphs:
146
+ print(f"[{para.style.name}] {para.text}")
147
+
148
+ # Read all tables
149
+ for table in doc.tables:
150
+ for row in table.rows:
151
+ for cell in row.cells:
152
+ print(cell.text, end='\t')
153
+ print()
154
+ ```
155
+
156
+ ## Table Styles Available
157
+ Common built-in styles (no need to define):
158
+ - `Table Grid` — Simple borders
159
+ - `Light Grid Accent 1` — Blue header with light grid
160
+ - `Light Shading Accent 1` — Blue shaded header
161
+ - `Medium Shading 1 Accent 1` — Stronger blue styling
162
+
163
+ ## Important Notes
164
+ - **Chinese fonts**: Always set both `font.name` and `w:eastAsia` for proper Chinese rendering
165
+ - **Never use `\n` in paragraphs** — create new Paragraph objects instead
166
+ - **Table widths**: Set column widths explicitly for consistent rendering
167
+ - **Images**: Always specify width to avoid oversized images
168
+ - **Compatibility**: python-docx creates Office-compatible .docx files that work in Word, Google Docs, and LibreOffice
169
+ - **For complex layouts**: Consider using create-pdf-report skill instead (more control over positioning)
170
+
171
+ ## Output & Delivery
172
+ - Save to temp: system temp directory (e.g. `tempfile.gettempdir()`) as `{filename}.docx`
173
+ - Send via email: Use email-with-attachment skill (Outlook REST API)
174
+ - ContentType: `application/vnd.openxmlformats-officedocument.wordprocessingml.document`
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: create-pdf-report
3
+ description: "Generate professional PDF reports with tables, charts, and styled layouts."
4
+ whenToUse: "User asks to create a PDF document or report"
5
+ ---
6
+
7
+ # Skill: Create PDF Report
8
+
9
+ ## Description
10
+ Generate professional PDF reports with Chinese font support, tables, charts, and styled layouts using Python reportlab. Use this skill whenever the user asks to create a PDF, report, analysis document, or any deliverable in PDF format.
11
+
12
+ ## When to Use
13
+ - User asks to create a PDF document or report
14
+ - User asks to generate an analysis, summary, or briefing as a downloadable file
15
+ - User asks to "整理成PDF" or "发给我" with document content
16
+ - Any task requiring formatted document output
17
+
18
+ ## Prerequisites
19
+ - Python with `reportlab` library (confirmed available)
20
+ - Chinese font: `C:/Windows/Fonts/msyh.ttc` (Microsoft YaHei) and `C:/Windows/Fonts/msyhbd.ttc` (Bold)
21
+
22
+ ## Steps
23
+
24
+ ### 1. Register Chinese Fonts
25
+ ```python
26
+ from reportlab.pdfbase import pdfmetrics
27
+ from reportlab.pdfbase.ttfonts import TTFont
28
+
29
+ pdfmetrics.registerFont(TTFont('MSYH', "C:/Windows/Fonts/msyh.ttc", subfontIndex=0))
30
+ pdfmetrics.registerFont(TTFont('MSYHB', "C:/Windows/Fonts/msyhbd.ttc", subfontIndex=0))
31
+ ```
32
+
33
+ ### 2. Use ParagraphStyle Helper
34
+ Define a helper function to avoid verbose style definitions:
35
+ ```python
36
+ from reportlab.lib.styles import ParagraphStyle
37
+ from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
38
+
39
+ def S(name, **kw):
40
+ defaults = dict(fontName='MSYH', fontSize=10.5, leading=18, textColor=DARK)
41
+ defaults.update(kw)
42
+ return ParagraphStyle(name, **defaults)
43
+ ```
44
+
45
+ ### 3. Standard Color Palette
46
+ ```python
47
+ from reportlab.lib.colors import HexColor, white
48
+
49
+ PRIMARY = HexColor('#1a73e8') # Blue
50
+ DARK = HexColor('#1a1a2e') # Dark text
51
+ ACCENT = HexColor('#e94560') # Red accent
52
+ GREEN = HexColor('#27ae60') # Green
53
+ ORANGE = HexColor('#f39c12') # Orange
54
+ GRAY = HexColor('#666666') # Gray text
55
+ LGRAY = HexColor('#e0e0e0') # Light gray borders
56
+ LIGHT_BLUE = HexColor('#e8f0fe')
57
+ LIGHT_GREEN = HexColor('#e8f5e9')
58
+ LIGHT_RED = HexColor('#fce4ec')
59
+ ```
60
+
61
+ ### 4. Document Structure
62
+ ```python
63
+ from reportlab.lib.pagesizes import A4
64
+ from reportlab.lib.units import mm, cm
65
+ from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak, HRFlowable
66
+
67
+ doc = SimpleDocTemplate(output_path, pagesize=A4,
68
+ rightMargin=2*cm, leftMargin=2*cm, topMargin=2*cm, bottomMargin=2*cm)
69
+ story = []
70
+ ```
71
+
72
+ ### 5. Table Best Practices
73
+ - Always use Paragraph objects inside table cells (not plain strings) for Chinese text
74
+ - Set VALIGN to 'MIDDLE' or 'TOP'
75
+ - Use alternating row backgrounds for readability
76
+ - Header rows: colored background + white text
77
+
78
+ ### 6. Output Path
79
+ - Save to: `~/Desktop/{filename}.pdf` or system temp directory as `{filename}.pdf`
80
+ - Include full file path in response message so bridge can auto-send
81
+
82
+ ### 7. Important Notes
83
+ - **Encoding**: Use `sys.stdout.reconfigure(encoding='utf-8')` if printing Chinese to stdout
84
+ - **Emoji**: Avoid emoji in print statements (cp1252 encoding error). Use emoji only in PDF content via Paragraph objects
85
+ - **String escaping**: Be careful with nested quotes in Chinese strings — use unicode escapes or triple-quoted strings
86
+ - **NEVER use Unicode subscript/superscript characters** in reportlab — use `<sub>` and `<super>` tags instead
87
+
88
+ ## Verification
89
+ After generating, verify with:
90
+ ```python
91
+ print(f"PDF saved to: {output_path}")
92
+ print(f"File size: {os.path.getsize(output_path) / 1024:.1f} KB")
93
+ ```
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: create-pptx
3
+ description: "Generate professional PowerPoint presentations with bold design and structured layouts."
4
+ whenToUse: "User asks to create a presentation, deck, or slides"
5
+ ---
6
+
7
+ # Skill: Create PowerPoint Presentation
8
+
9
+ ## Description
10
+ Generate professional PowerPoint presentations (.pptx) with bold design, Chinese support, and structured layouts. Use this skill whenever the user asks for a deck, slides, presentation, or PPT.
11
+
12
+ ## When to Use
13
+ - User asks to create a presentation, deck, or slides
14
+ - User asks to make a PPT/PPTX
15
+ - User says "做个PPT" or "帮我做slides"
16
+ - Any deliverable that should be in presentation format
17
+
18
+ ## Prerequisites
19
+ - Python with `python-pptx` library
20
+ - Install if needed: `pip install python-pptx`
21
+
22
+ ## Design Principles (from Anthropic Skills)
23
+ - **Don't create boring slides** — plain bullets on white background won't impress
24
+ - **Every slide needs a visual element** — image, chart, icon, or shape
25
+ - **Pick a bold color palette** specific to the topic
26
+ - **Dominance over equality** — one color dominates (60-70%), with 1-2 supporting tones
27
+ - **Dark/light contrast** — dark backgrounds for title + conclusion, light for content
28
+
29
+ ## Color Palettes
30
+
31
+ | Theme | Primary | Secondary | Accent |
32
+ |-------|---------|-----------|--------|
33
+ | Midnight Executive | `1E2761` | `CADCFC` | `FFFFFF` |
34
+ | Ocean Gradient | `065A82` | `1C7293` | `21295C` |
35
+ | Coral Energy | `F96167` | `F9E795` | `2F3C7E` |
36
+ | Charcoal Minimal | `36454F` | `F2F2F2` | `212121` |
37
+ | Teal Trust | `028090` | `00A896` | `02C39A` |
38
+
39
+ ## Typography
40
+ | Element | Size |
41
+ |---------|------|
42
+ | Slide title | 36-44pt bold |
43
+ | Section header | 20-24pt bold |
44
+ | Body text | 14-16pt |
45
+ | Captions | 10-12pt muted |
46
+
47
+ ## Steps
48
+
49
+ ### 1. Basic Setup
50
+ ```python
51
+ from pptx import Presentation
52
+ from pptx.util import Inches, Pt, Emu
53
+ from pptx.dml.color import RGBColor
54
+ from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
55
+
56
+ prs = Presentation()
57
+ prs.slide_width = Inches(13.333) # 16:9 widescreen
58
+ prs.slide_height = Inches(7.5)
59
+ ```
60
+
61
+ ### 2. Chinese Font Support
62
+ ```python
63
+ from pptx.util import Pt
64
+
65
+ def set_font(run, name='Microsoft YaHei', size=14, bold=False, color=None):
66
+ run.font.name = name
67
+ run.font.size = Pt(size)
68
+ run.font.bold = bold
69
+ if color:
70
+ run.font.color.rgb = RGBColor(*color)
71
+ # East Asian font fallback
72
+ run.font._element.attrib['{http://schemas.openxmlformats.org/drawingml/2006/main}altLang'] = 'zh-CN'
73
+ ```
74
+
75
+ ### 3. Add Shaped Backgrounds
76
+ ```python
77
+ from pptx.util import Inches
78
+ from pptx.enum.shapes import MSO_SHAPE
79
+
80
+ def add_bg_rect(slide, left, top, width, height, color):
81
+ shape = slide.shapes.add_shape(
82
+ MSO_SHAPE.RECTANGLE, left, top, width, height
83
+ )
84
+ shape.fill.solid()
85
+ shape.fill.fore_color.rgb = RGBColor(*color)
86
+ shape.line.fill.background() # No border
87
+ return shape
88
+ ```
89
+
90
+ ### 4. Slide Layouts
91
+ - **Title slide**: Full dark background, centered title + subtitle
92
+ - **Section divider**: Half-colored, half-white with large section number
93
+ - **Content slide**: Header bar + content area with bullet points or grid
94
+ - **Two-column**: Text left, visual right (or vice versa)
95
+ - **Data slide**: Large stat callouts (60-72pt numbers) with small labels
96
+
97
+ ### 5. Save & Output
98
+ ```python
99
+ import os
100
+ output_path = os.path.join(os.path.expanduser('~'), 'Desktop', 'presentation.pptx')
101
+ prs.save(output_path)
102
+ ```
103
+
104
+ ## Important Notes
105
+ - Use `Inches()` or `Emu()` for positioning — never raw numbers
106
+ - 0.5" minimum margins
107
+ - Leave breathing room — don't fill every inch
108
+ - **Avoid text-only slides** — always add at least one visual element
109
+ - For complex presentations, consider creating a master template first
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: daily-briefing
3
+ description: "Gives a quick morning overview of emails, calendar, and Teams activity."
4
+ whenToUse: "User asks for a morning briefing or daily summary of emails, calendar, and Teams"
5
+ ---
6
+
7
+ # Skill: Daily Briefing
8
+
9
+ ## Description
10
+ Gives a quick morning overview of emails, calendar, and Teams activity.
11
+
12
+ ## Channel Fallback Strategy
13
+ For both Outlook and Teams, try channels in this order:
14
+ 1. **Graph** (preferred — fast, structured API access)
15
+ 2. **Desktop** (fallback — COM/UIA automation, works offline)
16
+ 3. **Web** (last resort — browser automation, requires login)
17
+
18
+ If a channel fails (e.g., token error), immediately switch to the next one and retry.
19
+ Do NOT stop or report failure until all channels have been tried.
20
+
21
+ ## Steps
22
+
23
+ 1. **Email Summary**
24
+ - Try: `outlook_switch_channel("graph")` → `outlook_go_to_inbox` → `outlook_read_content`
25
+ - If Graph fails: `outlook_switch_channel("desktop")` → retry
26
+ - If Desktop fails: `outlook_switch_channel("web")` → navigate to outlook.office.com/mail/inbox → retry
27
+ - Read the latest 10 emails
28
+ - Summarize: who sent what, flag anything urgent (action required, approvals, incidents)
29
+
30
+ 2. **Calendar Overview**
31
+ - Try: `outlook_calendar` → `outlook_read_content` (or `browser_extract` on web)
32
+ - Same fallback order: Graph → Desktop → Web
33
+ - List today's meetings/events
34
+ - Highlight any conflicts or upcoming meetings in the next 2 hours
35
+
36
+ 3. **Teams Check**
37
+ - Try: `teams_switch_channel("graph")` → `teams_search_navigate("PM Team")` → `teams_read_messages`
38
+ - If Graph fails: `teams_switch_channel("desktop")` → retry
39
+ - If Desktop fails: `teams_switch_channel("web")` → retry
40
+ - Check recent messages in key chats (PM team, etc.)
41
+ - Summarize any unread or @mentions
42
+
43
+ 4. **Output**
44
+ - Present a concise briefing in this format:
45
+
46
+ ```
47
+ ## 📧 Email (X unread)
48
+ - [Urgent] Sender — Subject
49
+ - Sender — Subject
50
+ - ...
51
+
52
+ ## 📅 Calendar (X events today)
53
+ - 10:00 AM — Meeting Name (with Who)
54
+ - 2:00 PM — Meeting Name (with Who)
55
+ - ...
56
+
57
+ ## 💬 Teams Activity
58
+ - Chat Name: Person said "..."
59
+ - Chat Name: X new messages
60
+ - ...
61
+
62
+ ## ⚡ Action Items
63
+ - Reply to X about Y
64
+ - Prepare for Z meeting at 2 PM
65
+ ```
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: data-analysis
3
+ description: "Analyze data from various sources and generate visualizations with Chinese label support."
4
+ whenToUse: "User asks to analyze data, metrics, or trends"
5
+ ---
6
+
7
+ # Skill: Data Analysis & Visualization
8
+
9
+ ## Description
10
+ Analyze data from various sources (CSV, Excel, JSON, APIs) and generate visualizations (charts, graphs, tables) with Chinese label support. Output as images, PDFs, or Excel files.
11
+
12
+ ## When to Use
13
+ - User asks to analyze data, metrics, or trends
14
+ - User asks to create charts, graphs, or dashboards
15
+ - User wants to compare numbers, compute statistics
16
+ - User says "帮我分析" or "做个图表"
17
+
18
+ ## Prerequisites
19
+ - Python: pandas, matplotlib, numpy (confirmed available)
20
+ - Optional: openpyxl (for Excel), seaborn (for advanced plots)
21
+
22
+ ## Steps
23
+
24
+ ### 1. Chinese Font Setup for Matplotlib
25
+ ```python
26
+ import matplotlib.pyplot as plt
27
+ import matplotlib
28
+
29
+ # Set Chinese font
30
+ matplotlib.rcParams['font.sans-serif'] = ['Microsoft YaHei']
31
+ matplotlib.rcParams['axes.unicode_minus'] = False # Fix minus sign
32
+ ```
33
+
34
+ ### 2. Read Data
35
+ ```python
36
+ import pandas as pd
37
+
38
+ # CSV
39
+ df = pd.read_csv('data.csv')
40
+
41
+ # Excel
42
+ df = pd.read_excel('data.xlsx', sheet_name='Sheet1')
43
+
44
+ # JSON
45
+ df = pd.read_json('data.json')
46
+
47
+ # From clipboard
48
+ df = pd.read_clipboard()
49
+ ```
50
+
51
+ ### 3. Quick Analysis
52
+ ```python
53
+ # Overview
54
+ print(df.shape) # (rows, cols)
55
+ print(df.describe()) # Statistics
56
+ print(df.info()) # Types & nulls
57
+ print(df.head(10)) # Preview
58
+
59
+ # Group by
60
+ summary = df.groupby('category').agg({'value': ['mean', 'sum', 'count']})
61
+
62
+ # Pivot table
63
+ pivot = pd.pivot_table(df, values='value', index='date', columns='category', aggfunc='mean')
64
+ ```
65
+
66
+ ### 4. Visualization Templates
67
+
68
+ #### Bar Chart
69
+ ```python
70
+ fig, ax = plt.subplots(figsize=(10, 6))
71
+ df.plot(kind='bar', x='category', y='value', ax=ax, color='#1a73e8')
72
+ ax.set_title('标题', fontsize=16, fontweight='bold')
73
+ ax.set_xlabel('类别')
74
+ ax.set_ylabel('数值')
75
+ plt.tight_layout()
76
+ plt.savefig('chart.png', dpi=150, bbox_inches='tight')
77
+ ```
78
+
79
+ #### Line Chart (Time Series)
80
+ ```python
81
+ fig, ax = plt.subplots(figsize=(12, 6))
82
+ for col in columns:
83
+ ax.plot(df['date'], df[col], marker='o', label=col)
84
+ ax.legend()
85
+ ax.set_title('趋势分析')
86
+ ax.grid(True, alpha=0.3)
87
+ plt.tight_layout()
88
+ plt.savefig('trend.png', dpi=150)
89
+ ```
90
+
91
+ #### Pie Chart
92
+ ```python
93
+ fig, ax = plt.subplots(figsize=(8, 8))
94
+ ax.pie(values, labels=labels, autopct='%1.1f%%', colors=palette)
95
+ ax.set_title('占比分析')
96
+ plt.savefig('pie.png', dpi=150)
97
+ ```
98
+
99
+ #### Heatmap
100
+ ```python
101
+ import seaborn as sns
102
+ fig, ax = plt.subplots(figsize=(10, 8))
103
+ sns.heatmap(correlation_matrix, annot=True, cmap='RdYlBu_r', center=0, ax=ax)
104
+ plt.tight_layout()
105
+ plt.savefig('heatmap.png', dpi=150)
106
+ ```
107
+
108
+ ### 5. Output Options
109
+ - **PNG image**: `plt.savefig('chart.png', dpi=150)` — good for quick sharing
110
+ - **PDF report**: Combine with create-pdf-report skill
111
+ - **Excel**: `df.to_excel('output.xlsx', index=False)`
112
+ - **HTML table**: `df.to_html('table.html')`
113
+
114
+ ### 6. Color Palettes
115
+ ```python
116
+ # Microsoft-style
117
+ MS_COLORS = ['#1a73e8', '#e94560', '#27ae60', '#f39c12', '#9b59b6', '#1abc9c']
118
+
119
+ # Muted professional
120
+ PRO_COLORS = ['#264653', '#2a9d8f', '#e9c46a', '#f4a261', '#e76f51']
121
+ ```
122
+
123
+ ## Important Notes
124
+ - Always use `sys.stdout.reconfigure(encoding='utf-8')` for Chinese output
125
+ - Save charts to Desktop or Temp for bridge auto-send
126
+ - Close figures after saving: `plt.close(fig)` to avoid memory leaks
127
+ - For large datasets, sample first: `df.sample(1000)` for visualization
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: deep-research
3
+ description: "Conduct in-depth, multi-step research by decomposing queries and synthesizing reports."
4
+ whenToUse: "User asks for thorough research on a topic, technology, or competitor"
5
+ ---
6
+
7
+ # Skill: Deep Research
8
+
9
+ ## Description
10
+ Conduct in-depth, multi-step research on a given topic by decomposing queries, gathering from diverse sources, cross-referencing, and synthesizing into a comprehensive report. Goes beyond simple web search.
11
+
12
+ ## When to Use
13
+ - User asks for thorough research on a topic, technology, or competitor
14
+ - User says "深入调研一下" or "do a deep dive on"
15
+ - User needs more than a quick answer — needs analysis with sources
16
+ - Replaces and enhances the basic web-research skill for complex queries
17
+
18
+ ## Workflow
19
+
20
+ ### 1. Decompose the Query
21
+ Break the main question into 5-8 sub-questions:
22
+ ```
23
+ Main: "How is AI changing the PM role?"
24
+ Sub-questions:
25
+ 1. What PM tasks can AI automate today?
26
+ 2. What new skills do PMs need in AI era?
27
+ 3. Which companies are restructuring PM teams?
28
+ 4. What do industry reports say about PM job outlook?
29
+ 5. What tools are PMs using for AI-assisted work?
30
+ 6. What are the risks of over-reliance on AI for PMs?
31
+ ```
32
+
33
+ ### 2. Multi-Source Research
34
+ For each sub-question:
35
+ ```
36
+ web_search(sub_question) # Get initial results
37
+ web_search(sub_question + "2026") # Recent info
38
+ web_search(sub_question + "research paper") # Academic sources
39
+ web_fetch(url, max_length=8000) # Deep dive on key sources
40
+ ```
41
+
42
+ Source diversity checklist:
43
+ - [ ] Industry reports (McKinsey, Gartner, Forrester)
44
+ - [ ] Tech company blogs (Google AI, Microsoft, Anthropic)
45
+ - [ ] News articles (TechCrunch, The Verge, Wired)
46
+ - [ ] Academic/research papers
47
+ - [ ] Community discussions (HackerNews, Reddit, Twitter/X)
48
+ - [ ] Product documentation / changelogs
49
+
50
+ ### 3. Cross-Reference & Validate
51
+ - Check claims against multiple sources
52
+ - Note conflicting viewpoints
53
+ - Distinguish facts, opinions, and predictions
54
+ - Check source dates — flag anything > 6 months old
55
+ - Note potential biases (vendor reports favor their products)
56
+
57
+ ### 4. Synthesize Report
58
+ ```markdown
59
+ # [Topic] Deep Research Report
60
+ **Date:** [Date] | **Researcher:** Jon
61
+
62
+ ## Executive Summary
63
+ [3-5 sentences capturing the key findings]
64
+
65
+ ## Key Findings
66
+
67
+ ### Finding 1: [Title]
68
+ **Evidence:** [What the data/sources say]
69
+ **Implication:** [What this means for us]
70
+ **Confidence:** High/Medium/Low
71
+ **Sources:** [1], [2]
72
+
73
+ ### Finding 2: [Title]
74
+ ...
75
+
76
+ ## Conflicting Viewpoints
77
+ - [View A] vs [View B] — [Analysis of which is more credible and why]
78
+
79
+ ## Gaps in Available Information
80
+ - [What we couldn't find or verify]
81
+
82
+ ## Recommendations
83
+ 1. [Actionable recommendation based on findings]
84
+ 2. [Actionable recommendation based on findings]
85
+
86
+ ## Sources
87
+ 1. [Title](URL) — [Organization], [Date]
88
+ 2. [Title](URL) — [Organization], [Date]
89
+ ```
90
+
91
+ ### 5. Quality Checks
92
+ - Every claim has a source
93
+ - Recent data prioritized over old
94
+ - Balanced viewpoints represented
95
+ - Clear separation of fact vs opinion
96
+ - Actionable recommendations included
97
+
98
+ ### 6. Output Options
99
+ - Direct message response (for quick summaries)
100
+ - PDF report (use create-pdf-report skill)
101
+ - Email with attachment (use email-with-attachment skill)