The complete guide to Claude Code setup. 100+ hours saved. 370x optimization. Production-tested patterns for skills, hooks, and MCP integration.
Purpose: Always check Memory MCP cache before using Perplexity to save costs Trigger: Any Perplexity search request ROI: $0.005 per cached query, 80%+ budget savings
BEFORE_PERPLEXITY:
1. Check cache: mcp__basic-memory__search_notes("topic")
2. If found: USE CACHED RESULT (FREE!)
3. If not found: Continue to Perplexity
AFTER_PERPLEXITY:
IMMEDIATELY cache: mcp__basic-memory__write_note(
title: "topic-summary",
folder: "research-cache",
content: [Perplexity results + sources]
)
# Always do this BEFORE any Perplexity search
result = mcp__basic-memory__search_notes("your search topic")
If found: STOP! Use the cached result. No Perplexity needed.
# Only if Step 1 returned no results
perplexity_result = mcp__perplexity__search(query="your detailed question")
# Immediately after Perplexity search
mcp__basic-memory__write_note(
title="descriptive-topic-name",
folder="research-cache",
content="""
# Research: [Topic]
**Searched**: [Date]
**Query**: [Your query]
## Summary
[Key findings from Perplexity]
## Sources
[URLs from response]
"""
)
| ❌ Wrong | ✅ Correct |
|---|---|
| Skip cache check, go straight to Perplexity | Always check cache first |
| Forget to cache results after search | Cache IMMEDIATELY after every search |
| Use vague cache titles | Use descriptive, searchable titles |
| Cache in project folder | Cache in global research-cache/ |
| Topic | Good Title |
|---|---|
| React 19 | react-19-features-2025 |
| Claude hooks | claude-code-hooks-setup |
| PostgreSQL | postgresql-performance-tips |
| Node.js | nodejs-async-patterns |
Test Cache Miss:
Test Cache Hit:
| Scenario | Cost |
|---|---|
| Direct Perplexity (no caching) | $0.005/query |
| Cached query | $0.00 |
| Expected savings | 80%+ |
Skill Authority: Mandatory workflow for Perplexity cost optimization Activation: Before any web search / research request Evidence: Production research-cache with 10+ validated cached results