{"slug": "claude-fable-5-prompt", "title": "Claude Fable 5 Prompt", "summary": "A developer has created a detailed prompt for Claude Fable 5 that instructs the AI to act as a Principal Software Architect and Performance Engineer, performing a comprehensive performance audit and refactor of an entire codebase. The prompt requires the AI to identify all performance bottlenecks—including N+1 queries, inefficient SQL, caching issues, and memory problems—and produce a PERFORMANCE_AUDIT.md and PERFORMANCE_PLAN.md before implementing any changes. The approach prioritizes optimizations by ROI, with high-impact, low-risk fixes first, while preserving all existing functionality and maintaining code readability.", "body_md": "Act as a Principal Software Architect and Performance Engineer.\n\nYour task is to perform a comprehensive performance audit and refactor of this entire codebase.\n\nBefore making any changes:\n\n-\nThoroughly analyze the architecture, code structure, dependencies, database access patterns, caching strategy, queues, API endpoints, background jobs, asset loading, and deployment configuration.\n\n-\nIdentify all performance bottlenecks, including but not limited to:\n\n- N+1 database queries\n- Missing or ineffective indexes\n- Inefficient SQL queries\n- Excessive memory allocations\n- Unnecessary object creation\n- Duplicate computations\n- Blocking I/O operations\n- Excessive network requests\n- Large payloads\n- Inefficient loops and algorithms\n- Slow API endpoints\n- Cache misses and poor cache utilization\n- Queue bottlenecks\n- Expensive model relationships\n- Over-fetching data\n- Asset and frontend performance issues\n\n-\nProduce a detailed PERFORMANCE_AUDIT.md containing:\n\n- Identified bottlenecks\n- Estimated impact\n- Root cause analysis\n- Recommended fixes\n- Risk assessment\n- Expected performance gains\n\n-\nPrioritize optimizations by ROI:\n\n- High impact / low risk first\n- High impact / medium risk second\n- Everything else afterward\n\nWhen implementing improvements:\n\n- Preserve all existing functionality.\n- Do not introduce breaking changes unless absolutely necessary.\n- Maintain readability and maintainability.\n- Follow existing project conventions.\n- Add or update tests when required.\n- Avoid premature optimization.\n\nFor every significant change, explain:\n\n- What was changed\n- Why it was changed\n- Expected impact on:\n- Response time\n- Throughput\n- Memory usage\n- Database load\n- Infrastructure cost\n\nSpecific areas to investigate deeply:\n\n- Query plans\n- Index usage\n- Composite indexes\n- Eager loading opportunities\n- Pagination strategy\n- Aggregate queries\n- Bulk operations\n\n- Service architecture\n- Object lifecycle\n- Dependency resolution\n- Serialization costs\n- Validation overhead\n- Event/listener performance\n\n- Query caching\n- Response caching\n- Redis utilization\n- Cache invalidation strategy\n\n- Long-running jobs\n- Retry policies\n- Batch processing opportunities\n- Queue throughput\n\n- Payload size reduction\n- Serialization optimization\n- Endpoint response times\n- HTTP caching opportunities\n\n- Bundle size\n- Lazy loading\n- Asset optimization\n- Render performance\n\n- Runtime configuration\n- Connection pooling\n- Worker configuration\n- Container optimization\n\nExecution Strategy:\n\n- Audit\n- Create plan\n- Present findings\n- Implement highest-impact improvements\n- Re-measure\n- Continue iteratively\n\nDo not start refactoring immediately.\n\nFirst create PERFORMANCE_AUDIT.md and PERFORMANCE_PLAN.md, then wait for approval before making changes.", "url": "https://wpnews.pro/news/claude-fable-5-prompt", "canonical_source": "https://gist.github.com/phpfour/413feb2f30a77cf66602a1599ca226a7", "published_at": "2026-06-09 17:29:17+00:00", "updated_at": "2026-06-12 19:44:12.831091+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-agents"], "entities": [], "alternates": {"html": "https://wpnews.pro/news/claude-fable-5-prompt", "markdown": "https://wpnews.pro/news/claude-fable-5-prompt.md", "text": "https://wpnews.pro/news/claude-fable-5-prompt.txt", "jsonld": "https://wpnews.pro/news/claude-fable-5-prompt.jsonld"}}