using-github-search
Use when researching GitHub issues, PRs, and discussions for community solutions and known gotchas - searches via WebSearch with site filters and extracts problem-solution patterns
What this skill does
# Using GitHub Search
Use this skill when researching GitHub issues, PRs, discussions for community solutions and known gotchas.
## Core Principles
- Search GitHub via WebSearch with site: filter
- Focus on closed issues (solved problems)
- Fetch promising threads for detailed analysis
- Extract problem-solution patterns
## Workflow
### 1. Issue Search
**Use WebSearch with site:github.com:**
```python
# Find closed issues with solutions
WebSearch(
query="site:github.com React useEffect memory leak closed"
)
```
**Search patterns:**
**Closed issues (solved problems):**
```python
query="site:github.com [repo-name] [problem] closed is:issue"
```
**Pull requests (implementation examples):**
```python
query="site:github.com [repo-name] [feature] is:pr merged"
```
**Discussions (community advice):**
```python
query="site:github.com [repo-name] [topic] is:discussion"
```
**Labels for filtering:**
```python
query="site:github.com react label:bug label:performance closed"
```
### 2. Repository-Specific Search
**Known repositories:**
```python
# React issues
WebSearch(query="site:github.com/facebook/react useEffect cleanup closed")
# Next.js issues
WebSearch(query="site:github.com/vercel/next.js SSR hydration closed")
# TypeScript issues
WebSearch(query="site:github.com/microsoft/typescript type inference closed")
```
**Community repositories:**
```python
# Awesome lists
WebSearch(query="site:github.com awesome-react authentication")
# Best practice repos
WebSearch(query="site:github.com typescript best practices")
```
### 3. Fetch Issue Details
**Use WebFetch** to analyze threads:
```python
# Fetch specific issue
thread = WebFetch(
url="https://github.com/facebook/react/issues/14326",
prompt="Extract the problem description, root cause, and accepted solution. Include any workarounds or caveats mentioned."
)
```
**Fetch prompt patterns:**
- "Summarize the problem and official solution"
- "Extract workarounds and their trade-offs"
- "List breaking changes and migration steps"
- "Identify root cause and fix explanation"
### 4. Pattern Recognition
Look for **common patterns:**
**Problem-Solution:**
```markdown
Problem: Memory leak with event listeners in useEffect
Solution: Return cleanup function
Frequency: 50+ issues
Pattern: Missing return in useEffect
```
**Gotchas:**
```markdown
Gotcha: Array.sort() mutates in place
Impact: React state updates fail silently
Workaround: [...arr].sort()
Source: 20+ issues across projects
```
## Reporting Format
Structure findings as:
```markdown
## GitHub Research Findings
### 1. React useEffect Memory Leaks
**Source:** facebook/react#14326 (Closed, 150+ comments)
**Status:** Resolved in React 18
**URL:** https://github.com/facebook/react/issues/14326
**Problem:**
Event listeners added in useEffect not cleaned up, causing memory leaks on component unmount.
**Root Cause:**
Missing cleanup function in useEffect hook.
**Solution:**
```javascript
useEffect(() => {
const handler = () => console.log('event')
window.addEventListener('resize', handler)
// Cleanup function
return () => window.removeEventListener('resize', handler)
}, [])
```
**Caveats:**
- Cleanup runs before next effect AND on unmount
- Don't cleanup external state (e.g., API calls may complete after unmount)
- Use AbortController for fetch requests
**Community Consensus:**
- 95% of comments recommend cleanup pattern
- Official docs updated to emphasize this
- ESLint rule available: `exhaustive-deps`
---
### 2. Next.js Hydration Mismatch
**Source:** vercel/next.js#7417 (Closed, 80+ comments)
**Status:** Workarounds available, improved errors in Next 13+
**URL:** https://github.com/vercel/next.js/issues/7417
**Problem:**
Server-rendered HTML differs from client, causing hydration errors.
**Common Causes:**
1. Date.now() or random values in render
2. window object access during SSR
3. Third-party scripts modifying DOM
**Solutions:**
**Approach 1: Suppress hydration warning (temporary)**
```jsx
<div suppressHydrationWarning>{Date.now()}</div>
```
**Approach 2: Client-only rendering**
```jsx
const [mounted, setMounted] = useState(false)
useEffect(() => setMounted(true), [])
if (!mounted) return null
return <div>{Date.now()}</div>
```
**Approach 3: Use next/dynamic**
```jsx
const ClientOnly = dynamic(() => import('./ClientOnly'), { ssr: false })
```
**Trade-offs:**
- Suppress: Quick but masks real issues
- Client-only: Flash of missing content
- Dynamic: Extra bundle split, best for isolated components
**Community Recommendation:**
Use dynamic imports for truly client-only components. Fix server/client differences when possible.
---
### 3. TypeScript Type Inference Limitations
**Source:** microsoft/typescript#10571 (Open, discussion ongoing)
**Status:** Design limitation, workarounds exist
**URL:** https://github.com/microsoft/typescript/issues/10571
**Problem:**
Generic type inference fails with complex nested structures.
**Workarounds:**
**Explicit type parameters:**
```typescript
// Instead of inference
const result = complexFunction<User, string>(data)
```
**Type assertions:**
```typescript
const result = complexFunction(data) as Result<User>
```
**Community Patterns:**
- 40% use explicit type parameters
- 30% restructure code to simplify inference
- 30% use type assertions with validation
**Gotcha:**
Type assertions bypass type checking. Validate at runtime or use type guards.
```
## Search Strategies
### Find Solved Problems
```python
WebSearch(query="site:github.com react hooks stale closure closed is:issue")
```
### Implementation Examples
```python
WebSearch(query="site:github.com authentication JWT refresh is:pr merged")
```
### Breaking Changes
```python
WebSearch(query="site:github.com next.js migration breaking changes v14")
```
### Community Discussions
```python
WebSearch(query="site:github.com typescript best practices is:discussion")
```
### Security Issues
```python
WebSearch(query="site:github.com express security vulnerability closed CVE")
```
## Anti-Patterns
❌ **Don't:** Only search open issues (may not have solutions)
✅ **Do:** Focus on closed issues with accepted solutions
❌ **Don't:** Trust first comment without reading thread
✅ **Do:** Read accepted solution and top comments
❌ **Don't:** Apply workarounds without understanding trade-offs
✅ **Do:** Document caveats and alternatives
❌ **Don't:** Assume issue applies to current version
✅ **Do:** Check version context and current status
## Quality Indicators
**High-value issues have:**
- ✅ Closed with accepted solution
- ✅ 20+ comments (community vetted)
- ✅ Official maintainer response
- ✅ Code examples in solution
- ✅ Referenced in docs or other issues
**Skip if:**
- ❌ Open with no recent activity
- ❌ No clear solution or consensus
- ❌ Very old (>2 years) without recent confirmation
- ❌ Off-topic discussion
- ❌ No code examples
## Example Session
```python
# 1. Search for known React issues
results = WebSearch(
query="site:github.com/facebook/react useEffect infinite loop closed"
)
# → Found 10 closed issues
# 2. Fetch most relevant
issue1 = WebFetch(
url="https://github.com/facebook/react/issues/12345",
prompt="Extract the root cause of infinite loops in useEffect and the recommended solution"
)
# → Got dependency array explanation and fix
# 3. Search for migration issues
migration = WebSearch(
query="site:github.com/vercel/next.js migrate v13 to v14 breaking changes"
)
# → Found migration guide and common issues
# 4. Fetch migration PR
pr = WebFetch(
url="https://github.com/vercel/next.js/pull/56789",
prompt="List all breaking changes and required code updates"
)
# → Got comprehensive migration checklist
# 5. Search for community patterns
patterns = WebSearch(
query="site:github.com awesome-typescript patterns is:repo"
)
# → Found curated best practices repo
# 6. Synthesize findings
# Combine issue solutions, migration steps, community patterns
# Note frequency of issuRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.