Use Gemini to find existing solutions before building from scratch. Leverages Google Search grounding to discover code examples, libraries, and best practices to avoid reinventing the wheel.
Before writing ANY code, you MUST check:
.claude/library/catalog.json.claude/docs/inventories/LIBRARY-PATTERNS-GUIDE.mdD:\Projects\*| Match | Action |
|---|---|
| Library >90% | REUSE directly |
| Library 70-90% | ADAPT minimally |
| Pattern exists | FOLLOW pattern |
| In project | EXTRACT |
| No match | BUILD (add to library after) |
Kaynak dogrulama modu etkin.
Use Gemini CLI's Google Search grounding capability to discover existing solutions before implementing from scratch. This skill embodies the principle: "Don't reinvent the wheel."
# Execute via delegate.sh wrapper
./scripts/multi-model/delegate.sh gemini "Find existing solutions for: {goal}"
# Or via gemini-yolo.sh
./scripts/multi-model/gemini-yolo.sh "How do others implement {feature}? Find code examples and libraries." task-id research
User: "Implement user authentication"
Discovery Process:
1. Gemini search: "What are best practices for auth in Node.js?"
2. Gemini search: "Find existing auth libraries: passport, next-auth, lucia"
3. Gemini search: "Code examples for JWT authentication Node.js"
Output:
- Recommended: next-auth (well-maintained, 40k+ stars)
- Alternative: lucia-auth (newer, type-safe)
- Pattern found: middleware-based validation
User: "Generate PDF reports from data"
Discovery Process:
1. Gemini search: "PDF generation libraries JavaScript 2024"
2. Gemini search: "Compare pdfkit vs puppeteer vs react-pdf"
3. Gemini search: "Production PDF generation best practices"
Output:
- Simple PDFs: pdfkit (lightweight)
- Complex layouts: puppeteer (HTML to PDF)
- React apps: react-pdf
META-LOOP PROPOSE PHASE:
|
+---> multi-model-discovery
| |
| +---> Gemini: Find existing solutions
| +---> Claude: Evaluate options
| +---> Decision: Build vs Adapt vs Use
|
+---> Continue to IMPLEMENT phase
Results stored at:
multi-model/discovery/{project}/{task_id}# Via router (automatic detection)
./scripts/multi-model/multi-model-router.sh "Find existing solutions for X"
# Direct Gemini call
bash -lc "gemini 'How do others implement X? Find code examples and libraries.'"
gemini-research: General research with search groundinggemini-megacontext: Full codebase analysiscodex-iterative-fix: After discovery, for implementationliterature-synthesis: Academic research synthesis[commit|confident]