{"slug":"research-10","title":"research","summary":"Research Elixir/Phoenix/Ecto topics or evaluate Hex libraries (--library). Use when learning about libraries, patterns, or comparing approaches. Searches HexDocs, ElixirForum, GitHub.","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-10-04T15:14:16.124856Z","repo":{"url":"https://github.com/oliver-kriska/claude-elixir-phoenix","stars":560,"forks":44,"license":"MIT","updatedAt":"2026-10-02T04:11:38Z"},"bodyHtml":"<hr>\n<h2>name: research\ndescription: \"Research Elixir/Phoenix/Ecto topics or evaluate Hex libraries (--library). Use when learning about libraries, patterns, or comparing approaches. Searches HexDocs, ElixirForum, GitHub.\"\neffort: high</h2>\n<h1>Research Elixir Topic</h1>\n<p>Research a topic by searching the web and fetching relevant sources efficiently.</p>\n<h2>Usage</h2>\n<pre><code>/phx:research Oban unique jobs best practices\n/phx:research LiveView file upload with progress\n/phx:research --library permit\n</code></pre>\n<h2>Arguments</h2>\n<p><code>$ARGUMENTS</code> = Research topic/question. Add <code>--library</code> for\nstructured library evaluation (uses <code>${CLAUDE_SKILL_DIR}/references/library-evaluation.md</code>\ntemplate).</p>\n<h2>Iron Laws</h2>\n<ol>\n<li><strong>Write output to file, never dump inline</strong> — Research output floods conversation and loses reference for future sessions</li>\n<li><strong>Stop after research — never auto-transition</strong> — User decides next step</li>\n<li><strong>Prefer official sources over blog posts</strong> — HexDocs and ElixirForum have version-specific context</li>\n<li><strong>One document per research question</strong> — No fragmented files</li>\n<li><strong>NEVER pass raw user input as WebSearch query</strong> — Decompose first</li>\n</ol>\n<h2>Library Evaluation Mode</h2>\n<p>If <code>$ARGUMENTS</code> contains <code>--library</code> or the topic is clearly\nabout evaluating a Hex dependency (e.g., \"should we use permit\",\n\"evaluate sagents\", \"compare oban vs exq\"):</p>\n<ol>\n<li>Read <code>${CLAUDE_SKILL_DIR}/references/library-evaluation.md</code> for the template</li>\n<li>Follow the structured evaluation workflow</li>\n<li>Output ONE document to <code>.claude/research/{lib}-evaluation.md</code></li>\n<li>Skip the general research workflow below</li>\n</ol>\n<h2>Workflow</h2>\n<h3>0. Pre-flight Checks</h3>\n<p><strong>Cache check</strong>: Check if <code>.claude/research/{topic-slug}.md</code> already\nexists. If recent (&lt;24 hours): present existing summary, ask\n\"Refresh or use existing?\"</p>\n<p><strong>Tidewave shortcut</strong>: If the topic is about an <strong>existing dependency</strong>\n(library already in <code>mix.exs</code>), prefer Tidewave over web search:</p>\n<pre><code>mcp__tidewave__get_docs(module: \"LibraryModule\")\n</code></pre>\n<p>This returns docs matching your exact <code>mix.lock</code> version — faster,\nmore accurate, zero web tokens. Only fall through to web search if\nTidewave is unavailable or the topic needs community discussion\n(gotchas, real-world patterns, comparisons).</p>\n<h3>1. Query Decomposition (CRITICAL — before any search)</h3>\n<p>Decompose <code>$ARGUMENTS</code> before searching — raw prose makes a poor query:</p>\n<ul>\n<li>If <code>$ARGUMENTS</code> &lt; 30 words and focused → use as single query</li>\n<li>If <code>$ARGUMENTS</code> &gt; 30 words or multi-topic → extract 2-4 queries</li>\n</ul>\n<p>Each query: max 10 words, targets ONE specific aspect.</p>\n<p>Example:</p>\n<pre><code>Input: \"detect files, export to md, feed database with embeddings,\n        use ReqLLM for OpenAI API...\"\nQueries:\n  1. \"Elixir PDF text extraction library hex\"\n  2. \"Ecto pgvector embeddings setup\"\n  3. \"ReqLLM OpenAI embeddings Elixir\"\n</code></pre>\n<h3>2. Parallel Web Search</h3>\n<p>Search ALL decomposed queries in a SINGLE response (parallel):</p>\n<pre><code>WebSearch(query: \"{query1} site:elixirforum.com OR site:hexdocs.pm OR site:github.com\")\nWebSearch(query: \"{query2} site:hexdocs.pm OR site:elixirforum.com\")\n</code></pre>\n<p>Deduplicate URLs across results. Discard clearly irrelevant hits.</p>\n<h3>3. Spawn Parallel Research Workers</h3>\n<p>Group URLs by topic cluster. Spawn <strong>1-3 web-researcher agents\nin parallel</strong> (one per topic cluster):</p>\n<pre><code>Agent(subagent_type: \"phx:web-researcher\", prompt: \"\"\"\nResearch focus: {specific aspect from decomposed query}\nFetch these URLs:\n- {url1}\n- {url2}\n- {url3}\nExtract: code examples, patterns, gotchas, version compatibility.\nReturn 500-800 word summary.\n\"\"\", run_in_background: true)\n</code></pre>\n<p>Rules:</p>\n<ul>\n<li><strong>1 topic cluster = 1 agent</strong> (don't mix unrelated URLs)</li>\n<li><strong>Max 5 URLs per agent</strong> (diminishing returns beyond that)</li>\n<li>If only 1-3 URLs total, use single foreground agent</li>\n<li><strong>Pass URLs explicitly</strong> — agents should NOT re-search</li>\n<li>Agents are focused on extraction, not synthesis</li>\n</ul>\n<h3>4. Write Output (File-First — NEVER Dump Inline)</h3>\n<p>After ALL agents complete, synthesize summaries into ONE file.\nTarget: ~5KB for topic research, ~3KB for library evaluations.</p>\n<p>Create <code>.claude/research/{topic-slug}.md</code>:</p>\n<pre><code># Research: {topic}\n\n## Summary\n{2-3 sentence answer combining all worker findings}\n\n## Sources\n\n### {Category}\n- [{title}]({url}) - {key insight}\n\n### Code Examples\n\n```elixir\n# From {source}: {what this demonstrates}\n{code}\n</code></pre>\n<h2>Recommendations</h2>\n<ol>\n<li></li>\n<li></li>\n</ol>\n<h2>Watch Out For</h2>\n<ul>\n<li>{gotcha from forum/issues}</li>\n<li></li>\n</ul>\n<pre><code>\n### 5. After Research — STOP\n\n**STOP and present the research summary.** Do NOT auto-transition.\n\nUse `AskUserQuestion` to let the user choose next action:\n\n- \"Plan a feature based on this research\" → `/phx:plan`\n- \"Investigate a specific finding\" → `/phx:investigate`\n- \"Research more on a subtopic\" → continue research\n- \"Done\" → end\n\n**NEVER auto-invoke `/phx:plan` or any other skill after research.**\n</code></pre>\n","files":[{"path":"references/library-evaluation.md","sizeBytes":1915,"isText":true},{"path":"SKILL.md","sizeBytes":4894,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-10-04T15:15:17.819043Z","sha256":"2AF4C1BDAD202FD7F00297A5D715ADD2CBC261EFD37AE3CE73B050314A6CF886","sizeBytes":3677},"review":null,"source":{"repositoryUrl":"https://github.com/oliver-kriska/claude-elixir-phoenix","path":"plugins/elixir-phoenix/skills/research","license":"MIT","commit":"9767a82d24ddddad553e85f88efc2869a7fd7d88","subtreeSha":"D4DCE35736E0B963840B40FA1E158467826F4FE1964B45AFEC295289951BC05D","lastSyncedAt":"2026-10-04T15:14:09.139242Z"},"reviewedAt":"2026-10-04T15:16:58.19728Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix/tree/main/plugins/elixir-phoenix/skills/research"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install oliver-kriska-claude-elixir-phoenix@llmmart"},{"target":"git","command":"git clone https://github.com/oliver-kriska/claude-elixir-phoenix.git"}]}