跳到正文
cccskills
免费在 GitHub 公开

research

Research Elixir/Phoenix/Ecto topics or evaluate Hex libraries (--library). Use when learning about libraries, patterns, or comparing approaches. Searches HexDocs, ElixirForum, GitHub.

中文简介正在准备中。当前显示原文说明。

集成工具GitHubOpenAI
查看安装方法

包含的文件(2)

  • SKILL.md4.8 KB
  • references/library-evaluation.md1.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Research Elixir Topic

Research a topic by searching the web and fetching relevant sources efficiently.

Usage

/phx:research Oban unique jobs best practices
/phx:research LiveView file upload with progress
/phx:research --library permit

Arguments

$ARGUMENTS = Research topic/question. Add --library for structured library evaluation (uses ${CLAUDE_SKILL_DIR}/references/library-evaluation.md template).

Iron Laws

  1. Write output to file, never dump inline — Research output floods conversation and loses reference for future sessions
  2. Stop after research — never auto-transition — User decides next step
  3. Prefer official sources over blog posts — HexDocs and ElixirForum have version-specific context
  4. One document per research question — No fragmented files
  5. NEVER pass raw user input as WebSearch query — Decompose first

Library Evaluation Mode

If $ARGUMENTS contains --library or the topic is clearly about evaluating a Hex dependency (e.g., "should we use permit", "evaluate sagents", "compare oban vs exq"):

  1. Read ${CLAUDE_SKILL_DIR}/references/library-evaluation.md for the template
  2. Follow the structured evaluation workflow
  3. Output ONE document to .claude/research/{lib}-evaluation.md
  4. Skip the general research workflow below

Workflow

0. Pre-flight Checks

Cache check: Check if .claude/research/{topic-slug}.md already exists. If recent (<24 hours): present existing summary, ask "Refresh or use existing?"

Tidewave shortcut: If the topic is about an existing dependency (library already in mix.exs), prefer Tidewave over web search:

mcp__tidewave__get_docs(module: "LibraryModule")

This returns docs matching your exact mix.lock version — faster, more accurate, zero web tokens. Only fall through to web search if Tidewave is unavailable or the topic needs community discussion (gotchas, real-world patterns, comparisons).

1. Query Decomposition (CRITICAL — before any search)

Decompose $ARGUMENTS before searching — raw prose makes a poor query:

  • If $ARGUMENTS < 30 words and focused → use as single query
  • If $ARGUMENTS > 30 words or multi-topic → extract 2-4 queries

Each query: max 10 words, targets ONE specific aspect.

Example:

Input: "detect files, export to md, feed database with embeddings,
        use ReqLLM for OpenAI API..."
Queries:
  1. "Elixir PDF text extraction library hex"
  2. "Ecto pgvector embeddings setup"
  3. "ReqLLM OpenAI embeddings Elixir"

2. Parallel Web Search

Search ALL decomposed queries in a SINGLE response (parallel):

WebSearch(query: "{query1} site:elixirforum.com OR site:hexdocs.pm OR site:github.com")
WebSearch(query: "{query2} site:hexdocs.pm OR site:elixirforum.com")

Deduplicate URLs across results. Discard clearly irrelevant hits.

3. Spawn Parallel Research Workers

Group URLs by topic cluster. Spawn 1-3 web-researcher agents in parallel (one per topic cluster):

Agent(subagent_type: "phx:web-researcher", prompt: """
Research focus: {specific aspect from decomposed query}
Fetch these URLs:
- {url1}
- {url2}
- {url3}
Extract: code examples, patterns, gotchas, version compatibility.
Return 500-800 word summary.
""", run_in_background: true)

Rules:

  • 1 topic cluster = 1 agent (don't mix unrelated URLs)
  • Max 5 URLs per agent (diminishing returns beyond that)
  • If only 1-3 URLs total, use single foreground agent
  • Pass URLs explicitly — agents should NOT re-search
  • Agents are focused on extraction, not synthesis

4. Write Output (File-First — NEVER Dump Inline)

After ALL agents complete, synthesize summaries into ONE file. Target: ~5KB for topic research, ~3KB for library evaluations.

Create .claude/research/{topic-slug}.md:

# Research: {topic}

## Summary
{2-3 sentence answer combining all worker findings}

## Sources

### {Category}
- [{title}]({url}) - {key insight}

### Code Examples

```elixir
# From {source}: {what this demonstrates}
{code}

Recommendations

  1. {recommendation with evidence}
  2. {recommendation with evidence}

Watch Out For

  • {gotcha from forum/issues}
  • {version compatibility note}

### 5. After Research — STOP

**STOP and present the research summary.** Do NOT auto-transition.

Use `AskUserQuestion` to let the user choose next action:

- "Plan a feature based on this research" → `/phx:plan`
- "Investigate a specific finding" → `/phx:investigate`
- "Research more on a subtopic" → continue research
- "Done" → end

**NEVER auto-invoke `/phx:plan` or any other skill after research.**

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

analyze

免费

Analyze a legacy app in any language before rewriting it in Elixir: inventory, features as goals, why each mechanism exists, runtime topology, external contracts. Use to start or refresh a rewrite.

中文简介正在准备中。当前显示原文说明。

oliver-kriska/claude-elixir-phoenix5672026年10月20日 更新

architect

免费

Design the idiomatic Elixir architecture for a rewrite: set the compatibility bar (ADR-000), consult phx specialists on open questions, then build contexts, ledger and ADRs. Use after /rewrite:analyze.

中文简介正在准备中。当前显示原文说明。

oliver-kriska/claude-elixir-phoenix5672026年10月20日 更新

Ash Framework — resources, actions, policies, aggregates, calculations, AshPhoenix.Form, LiveView, migrations. Use when generating resources via mix ash.codegen, editing changes, checks, types, validations, or domain code interfaces.

中文简介正在准备中。当前显示原文说明。

oliver-kriska/claude-elixir-phoenix5672026年10月20日 更新

Ash Framework — resources, actions, policies, aggregates; Use when generating resources via mix ash.codegen, editing…

中文简介正在准备中。当前显示原文说明。

oliver-kriska/claude-elixir-phoenix5672026年10月20日 更新

assigns

免费

Compatibility alias for the Elixir/Phoenix plugin's LiveView assigns audit. Invoke explicitly with /lv:assigns.

中文简介正在准备中。当前显示原文说明。

oliver-kriska/claude-elixir-phoenix5672026年10月20日 更新

Inspect LiveView socket assigns for memory bloat — missing temporary_assigns, unused assigns, unbounded lists needing streams, memory estimates. Use when LiveView memory grows or you need to add temporary_assigns.

中文简介正在准备中。当前显示原文说明。

oliver-kriska/claude-elixir-phoenix5672026年10月20日 更新

查看 oliver-kriska 的全部技能

报告此技能的问题