/agentsop-framework-selection
Neutral, framework-agnostic decision tree for project kickoff: "which agent / RAG / LLM framework should I reach for?" Synthesizes the ecosystem sections of 7 landmark-project SOPs (LangGraph, LlamaIndex, DSPy, CrewAI, vLLM, Aider, Dify) into one layered rubric. Core stance:
$ npx -y skills add agentsope/SkillAlchemy --skill agentsop-framework-selection --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/agentsop-framework-selection
Context preview
The summary Claude sees to decide when to auto-load this skill.
Neutral, framework-agnostic decision tree for project kickoff: "which agent / RAG / LLM framework should I reach for?" Synthesizes the ecosystem sections of 7 landmark-project SOPs (LangGraph, LlamaIndex, DSPy, CrewAI, vLLM, Aider, Dify) into one layered rubric. Core stance:
SKILL.md
agentsop-framework-selection.SKILL.mdname: agentsop-framework-selection
version: 0.1.0
description: |
Neutral, framework-agnostic decision tree for project kickoff: "which agent /
RAG / LLM framework should I reach for?" Synthesizes the ecosystem sections of
7 landmark-project SOPs (LangGraph, LlamaIndex, DSPy, CrewAI, vLLM, Aider, Dify)
into one layered rubric. Core stance: frameworks are LAYERS, not competitors —
a real project usually combines DSPy (compile) + LlamaIndex (retrieve) +
LangGraph (orchestrate) + vLLM (serve), and you choose ONE per layer, not one
to rule all. Use when starting any LLM/agent/RAG project, or whenever
the "which framework?" question is asked. Deliberately neutral — unlike vendor
docs and the LangChain-biased `framework-selection` on skill.sh, this skill has
no horse in the race.
overlay: true
cross_links: [llm-engine-selection, agent-topology-selection, repo-state-gating]
Framework-Fit Decision Tree at Project Kickoff · SOP (ENHANCE overlay)
> Overlay posture: this is the **capstone** Phase-D skill — the most-cited entry > at any project kickoff. It decides *which layer(s) you need* and *which > framework owns each layer*. It does **not** teach any framework's API; for that, > descend to the per-framework SOPs (`langgraph-sop`, `llamaindex-sop`, > `dspy-sop`, `crewai-sop`, `vllm-sop`, `aider-sop`, `dify-sop`). Every > load-bearing claim carries an inline source tag resolving in > `references/R1-decision-tree.md`. > > Neutrality note: vendor pages each claim the center of the universe > (LangChain: "use LangGraph for production"; LlamaIndex: "the document agent > platform"; Dify: "scaffolding is the bottleneck"). This skill quotes those > claims but does not adopt any of them. The 7 SOPs *disagree* on the crossover > points; we surface the disagreements rather than papering over them.
---
1. 何时激活 (When to Activate)
Activate when **any** of the following fire:
- A new LLM / agent / RAG project is starting and no framework has been chosen yet.
- Someone asks "which framework should I use?" / "LangChain or LlamaIndex?" /
"LangGraph vs CrewAI?" / "do we need a framework at all?"
- A coder is about to `pip install` an orchestration / RAG / agent framework
before having articulated *what layers the project needs*.
- A project already picked one framework "for everything" and is now fighting it
in a layer it was never good at (e.g., doing deep RAG inside CrewAI, or hand-rolling retrieval inside LangGraph).
- A no-code / visual builder (Dify, Flowise, LangFlow) has hit a complexity
ceiling and the team is asking "do we rewrite in code?"
Do **not** re-run this skill mid-implementation for a layer already chosen — that is churn. Run it once at kickoff, and again only when a *new layer* appears (e.g., "we now need to self-host the model" → triggers `[[agentsop-llm-engine-selection]]`).
> Mental check: *the wrong framework is the single highest-cost decision in the > project — it is a one-week-to-reverse mistake, sometimes a one-month one.* > `crewai-sop · OP-1`, `vllm-sop · OP-7`. Spend 20 minutes on this tree before > opening any tutorial.
---
2. 核心心智模型 (Core Mental Model)
**Frameworks are layers, not competitors.** The single most common kickoff error is treating "LangChain vs LlamaIndex vs DSPy vs CrewAI vs vLLM" as a horse race with one winner. They are not on the same axis. A mature LLM system is a *stack*:
┌─────────────────────────────────────────────────────────────┐
│ L7 App platform / UI / Auth │ Dify, Flowise, LangFlow │ ship-fast scaffolding
├─────────────────────────────────────────────────────────────┤
│ L6 Serving / inference │ vLLM, SGLang, llama.cpp … │ → see [[agentsop-llm-engine-selection]]
├─────────────────────────────────────────────────────────────┤
│ L3 Orchestration / control │ LangGraph, CrewAI, Workflows │ → see [[agentsop-agent-topology-selection]]
├─────────────────────────────────────────────────────────────┤
│ L2 Retrieval / context │ LlamaIndex, Haystack │ ingestion, index, query
├─────────────────────────────────────────────────────────────┤
│ L1 Modeling / prompt-compile │ DSPy, Outlines, Guidance │ the LM call itself
├─────────────────────────────────────────────────────────────┤
│ Coding-agent surface (cross) │ Aider, Cline, Cursor … │ end-user product, not a layer
└─────────────────────────────────────────────────────────────┘
DSPy's own ecosystem doc draws this layering explicitly — DSPy "sits *underneath* LangChain, LlamaIndex, LangGraph as a compiler for individual LM calls" `dspy-sop · R5`. LlamaIndex's doc says "many production systems use both: LlamaIndex as the retrieval layer, LangGraph as the orchestration layer" `llamaindex-sop · R5`. Dify's doc describes the hybrid "Dify for frontend/RAG/auth
- LangGraph for core agent logic behind HTTP" `dify-sop · R5`. The convergence is
unanimous: **choose per layer, then check interop.**
Three corollaries:
1. **You may not need every layer.** A static-corpus Q&A bot needs L1 only (stuff the context window). A RAG chatbot needs L1+L2. A durable multi-step agent needs L1+L2+L3. Only self-hosting adds L6. Only mixed-role teams add L7. 2. **The cleanest combinations are additive; the awkward ones are same-layer.** DSPy+LangGraph (compile-inside-node) and LlamaIndex+LangGraph (retrieve-then- orchestrate) are textbook `dspy-sop · R5`. DSPy+LangChain or DSPy+CrewAI are a "smell" — both are L1-ish prompt strategies fighting for the same slot `dspy-sop · R5`. 3. **"No framework" is a legitimate answer for ≥1 layer.** Frameworks earn their dependency surface only past a complexity threshold (§4 gate G0).
---
3. SOP (The Procedure)
The kickoff procedure runs as numbered steps (Pass A = Steps 1–6, Pass B = Step 7, Pass C = Step 8):
**Pass A — Identify the layers you actually need.** Walk the stack top to bottom and mark each layer needed / not-needed for *this* project:
1. L1 Mode
Read more
name: agentsop-framework-selection version: 0.1.0 description: | Neutral, framework-agnostic decision tree for project kickoff: "which agent / RAG / LLM framework should I reach for?" Synthesizes the ecosystem sections of 7 landmark-project SOPs (LangGraph, LlamaIndex, DSPy, CrewAI, vLLM, Aider, Dify) into one layered rubric. Core stance: frameworks are LAYERS, not competitors — a real project usually combines DSPy (compile) + LlamaIndex (retrieve) + LangGraph (orchestrate) + vLLM (serve), and you choose ONE per layer, not one to rule all. Use when starting any LLM/agent/RAG project, or whenever the "which framework?" question is asked. Deliberately neutral — unlike vendor docs and the LangChain-biased `framework-selection` on skill.sh, this skill has no horse in the race. overlay: true cross_links: [llm-engine-selection, agent-topology-selection, repo-state-gating]
Framework-Fit Decision Tree at Project Kickoff · SOP (ENHANCE overlay)
> Overlay posture: this is the **capstone** Phase-D skill — the most-cited entry > at any project kickoff. It decides *which layer(s) you need* and *which > framework owns each layer*. It does **not** teach any framework's API; for that, > descend to the per-framework SOPs (`langgraph-sop`, `llamaindex-sop`, > `dspy-sop`, `crewai-sop`, `vllm-sop`, `aider-sop`, `dify-sop`). Every > load-bearing claim carries an inline source tag resolving in > `references/R1-decision-tree.md`. > > Neutrality note: vendor pages each claim the center of the universe > (LangChain: "use LangGraph for production"; LlamaIndex: "the document agent > platform"; Dify: "scaffolding is the bottleneck"). This skill quotes those > claims but does not adopt any of them. The 7 SOPs *disagree* on the crossover > points; we surface the disagreements rather than papering over them.
---
1. 何时激活 (When to Activate)
Activate when **any** of the following fire:
- A new LLM / agent / RAG project is starting and no framework has been chosen yet.
- Someone asks "which framework should I use?" / "LangChain or LlamaIndex?" /
"LangGraph vs CrewAI?" / "do we need a framework at all?"
- A coder is about to `pip install` an orchestration / RAG / agent framework
before having articulated *what layers the project needs*.
- A project already picked one framework "for everything" and is now fighting it
in a layer it was never good at (e.g., doing deep RAG inside CrewAI, or hand-rolling retrieval inside LangGraph).
- A no-code / visual builder (Dify, Flowise, LangFlow) has hit a complexity
ceiling and the team is asking "do we rewrite in code?"
Do **not** re-run this skill mid-implementation for a layer already chosen — that is churn. Run it once at kickoff, and again only when a *new layer* appears (e.g., "we now need to self-host the model" → triggers `[[agentsop-llm-engine-selection]]`).
> Mental check: *the wrong framework is the single highest-cost decision in the > project — it is a one-week-to-reverse mistake, sometimes a one-month one.* > `crewai-sop · OP-1`, `vllm-sop · OP-7`. Spend 20 minutes on this tree before > opening any tutorial.
---
2. 核心心智模型 (Core Mental Model)
**Frameworks are layers, not competitors.** The single most common kickoff error is treating "LangChain vs LlamaIndex vs DSPy vs CrewAI vs vLLM" as a horse race with one winner. They are not on the same axis. A mature LLM system is a *stack*:
┌─────────────────────────────────────────────────────────────┐ │ L7 App platform / UI / Auth │ Dify, Flowise, LangFlow │ ship-fast scaffolding ├─────────────────────────────────────────────────────────────┤ │ L6 Serving / inference │ vLLM, SGLang, llama.cpp … │ → see [[agentsop-llm-engine-selection]] ├─────────────────────────────────────────────────────────────┤ │ L3 Orchestration / control │ LangGraph, CrewAI, Workflows │ → see [[agentsop-agent-topology-selection]] ├─────────────────────────────────────────────────────────────┤ │ L2 Retrieval / context │ LlamaIndex, Haystack │ ingestion, index, query ├─────────────────────────────────────────────────────────────┤ │ L1 Modeling / prompt-compile │ DSPy, Outlines, Guidance │ the LM call itself ├─────────────────────────────────────────────────────────────┤ │ Coding-agent surface (cross) │ Aider, Cline, Cursor … │ end-user product, not a layer └─────────────────────────────────────────────────────────────┘
DSPy's own ecosystem doc draws this layering explicitly — DSPy "sits *underneath* LangChain, LlamaIndex, LangGraph as a compiler for individual LM calls" `dspy-sop · R5`. LlamaIndex's doc says "many production systems use both: LlamaIndex as the retrieval layer, LangGraph as the orchestration layer" `llamaindex-sop · R5`. Dify's doc describes the hybrid "Dify for frontend/RAG/auth
- LangGraph for core agent logic behind HTTP" `dify-sop · R5`. The convergence is
unanimous: **choose per layer, then check interop.**
Three corollaries:
1. **You may not need every layer.** A static-corpus Q&A bot needs L1 only (stuff the context window). A RAG chatbot needs L1+L2. A durable multi-step agent needs L1+L2+L3. Only self-hosting adds L6. Only mixed-role teams add L7. 2. **The cleanest combinations are additive; the awkward ones are same-layer.** DSPy+LangGraph (compile-inside-node) and LlamaIndex+LangGraph (retrieve-then- orchestrate) are textbook `dspy-sop · R5`. DSPy+LangChain or DSPy+CrewAI are a "smell" — both are L1-ish prompt strategies fighting for the same slot `dspy-sop · R5`. 3. **"No framework" is a legitimate answer for ≥1 layer.** Frameworks earn their dependency surface only past a complexity threshold (§4 gate G0).
---
3. SOP (The Procedure)
The kickoff procedure runs as numbered steps (Pass A = Steps 1–6, Pass B = Step 7, Pass C = Step 8):
**Pass A — Identify the layers you actually need.** Walk the stack top to bottom and mark each layer needed / not-needed for *this* project:
1. L1 Mode
Other skills on skillalchemy.
- /LEAP
LEAP — 落地执行引擎。内含两条管线:A 分支蒸馏(从 raw data 提取 skill)、 B 分支融合(多 skill 编织为一个)。被 SkillAlchemy 编排器调用。 Use when 编排器判断需要蒸馏或融合时。
Open skill - /Lens
Lens — 给你的问题加一层认知镜片。输入任意任务描述,输出增强版 description, 发现「你不知道自己不知道」的隐性维度、前置条件和认知路线。 Use when 用户说「帮我想想」「分析一下」「生成 skill」「蒸馏」「融合」 或输入看起来太简单需要展开。
Open skill - /agentsop-agent-topology-selection
Cross-framework enhancement overlay for choosing a multi-agent topology BEFORE writing any agent. A binary-question rubric — is single-agent + tools enough? do agents need to know about each other? does the output need one voice? — maps the answer to single-agent / supervisor /
Open skill - /agentsop-aider
SOP for terminal-based, git-native AI pair programming with Aider (git work-tree + tree-sitter repo-map + edit-format + human-in-loop REPL). Use when editing code in an existing git repo via an LLM, when you need to converge a change to 2-5 files, pick an edit format that fits
Open skill - /agentsop-bio-fraud-forensics
Screens biomedical / life-science papers for signs of data fabrication, image manipulation, and statistical anomalies, using the detection techniques distilled from the field's canonical exposure platforms (PubPeer, Data Colada, Science Integrity Digest, For Better Science) and
Open skill - /agentsop-bounded-loop
Universal discipline for any LM-driven loop — agent retries, plan-act-observe, multi-agent handoffs, optimiser passes, test-fix cycles. Encodes the one rule every framework documents quietly and every team relearns expensively: the LM in the loop is NEVER a reliable terminator.
Open skill

