Token导航 LogoToken导航

Agent Skill · 开发

langgraph(langgraph 图表绘制)

langgraph 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

langgraph 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 8,242。

总安装 3,263周安装 132GitHub Stars 161下载 1,024核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:langgraph(langgraph 图表绘制)
来源仓库:https://github.com/yonatangross/orchestkit
仓库路径:skills/langgraph
安装命令:
npx skills add https://github.com/yonatangross/orchestkit --skill langgraph
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yonatangross/orchestkit --skill langgraph

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于处理 LangGraph 工作流相关的开发协作事项。适合围绕仓库状态和代码变更进行进度管理。langgraph 属于开发类 Skill,可作为该场景下的辅助能力补充。可结合原始 README 了解图结构定义规范。安装前建议确认 Python 环境满足依赖要求。注意复杂图结构可能导致调试困难需谨慎设计。

来源仓库内路径:skills/langgraph

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/yonatangross/orchestkit --skill langgraph;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

langgraph 怎么安装?

在终端执行 npx skills add https://github.com/yonatangross/orchestkit --skill langgraph。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

langgraph 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

langgraph 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

langgraph 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

langgraph 用的人多吗?

公开数据是累计安装 3,263 次,近一周安装 132 次,下载 1,024 次,GitHub 161 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

langgraph 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
langgraph

langgraph 图表绘制 · 本页

3,263161调用外部服务未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

LangGraph Workflow Patterns

Comprehensive patterns for building production LangGraph workflows. LangGraph 1.x is LTS (Long Term Support) — the first stable major release, powering agents at Uber, LinkedIn, and Klarna. Each category has individual rule files in rules/ loaded on-demand.

LangGraph 1.2 (Q1 2026) — new in this bump: - Deferred nodes (defer=True on add_node) — the node runs only after all *other* upstream nodes for the current super-step have completed, which makes "aggregate once everyone else is done" patterns a one-liner instead of a custom reducer. - Pre/post model hooks on create_react_agent(...) and ToolNode — inject compression, summarization, or PII redaction without subclassing. - Node-level caching via CachePolicy(ttl=..., key_func=...) with SqliteCache and RedisCache backends (pluggable via graph.compile(cache=...)). Idempotent nodes skip recomputation on replay.

Quick Reference

CategoryRulesImpactWhen to Use
State Management4CRITICALDesigning workflow state schemas, accumulators, reducers
Routing & Branching4HIGHDynamic routing, retry loops, semantic routing, cross-graph
Parallel Execution3HIGHFan-out/fan-in, map-reduce, concurrent agents
Supervisor Patterns3HIGHCentral coordinators, round-robin, priority dispatch
Tool Calling4CRITICALBinding tools, ToolNode, dynamic selection, approvals
Checkpointing3HIGHPersistence, recovery, cross-thread Store memory
Human-in-Loop3MEDIUMApproval gates, feedback loops, interrupt/resume
Streaming3MEDIUMReal-time updates, token streaming, custom events
Subgraphs3MEDIUMModular composition, nested graphs, state mapping
Functional API3MEDIUM@entrypoint/@task decorators, migration from StateGraph
Platform3HIGHDeployment, RemoteGraph, double-texting strategies

Total: 37 rules across 11 categories

State Management

State schemas determine how data flows between nodes. Wrong schemas cause silent data loss.

RuleFileKey Pattern
TypedDict Staterules/state-typeddict.mdTypedDict + Annotated[list, add] for accumulators
Pydantic Validationrules/state-pydantic.mdBaseModel at boundaries, TypedDict internally
MessagesStaterules/state-messages.mdMessagesState or add_messages reducer
Custom Reducersrules/state-reducers.mdAnnotated[T, reducer_fn] for merge/overwrite

Routing & Branching

Control flow between nodes. Always include END fallback to prevent hangs.

RuleFileKey Pattern
Conditional Edgesrules/routing-conditional.mdadd_conditional_edges with explicit mapping
Retry Loopsrules/routing-retry-loops.mdLoop-back edges with max retry counter
Semantic Routingrules/routing-semantic.mdEmbedding similarity or Command API routing
Cross-Graph Navigationrules/routing-cross-graph.mdCommand(graph=Command.PARENT) for parent/sibling routing

Parallel Execution

Run independent nodes concurrently. Use Annotated[list, add] to accumulate results.

RuleFileKey Pattern
Fan-Out/Fan-Inrules/parallel-fanout-fanin.mdSend API for dynamic parallel branches
Map-Reducerules/parallel-map-reduce.mdasyncio.gather + result aggregation
Error Isolationrules/parallel-error-isolation.mdreturn_exceptions=True + per-branch timeout

Supervisor Patterns

Central coordinator routes to specialized workers. Workers return to supervisor.

RuleFileKey Pattern
Basic Supervisorrules/supervisor-basic.mdCommand API for state update + routing
Priority Routingrules/supervisor-priority.mdPriority dict ordering agent execution
Round-Robinrules/supervisor-round-robin.mdCompletion tracking with agents_completed

Tool Calling

Integrate function calling into LangGraph agents. Keep tools under 10 per agent.

RuleFileKey Pattern
Tool Bindingrules/tools-bind.mdmodel.bind_tools(tools) + tool_choice
ToolNode Executionrules/tools-toolnode.mdToolNode(tools) prebuilt parallel executor
Dynamic Selectionrules/tools-dynamic.mdEmbedding-based tool relevance filtering
Tool Interruptsrules/tools-interrupts.mdinterrupt() for approval gates on tools

Checkpointing

Persist workflow state for recovery and debugging.

RuleFileKey Pattern
Checkpointer Setuprules/checkpoints-setup.mdMemorySaver dev / PostgresSaver prod
State Recoveryrules/checkpoints-recovery.mdthread_id resume + get_state_history
Cross-Thread Storerules/checkpoints-store.mdStore for long-term memory across threads

Node-Level Caching (1.2+)

Independent of checkpointing. Cache individual node output so re-runs with identical inputs skip execution entirely.

from langgraph.graph import StateGraph
from langgraph.cache import CachePolicy, SqliteCache

graph = StateGraph(State)
graph.add_node(
    "expensive_fetch",
    fetch_fn,
    cache_policy=CachePolicy(ttl=3600, key_func=lambda s: s["query"]),
)
# RedisCache(url=...) for distributed workers
compiled = graph.compile(cache=SqliteCache("cache.db"))

Use when a node is idempotent and expensive (embeddings, external APIs). Do not use for nodes whose output depends on wall-clock time or mutable external state unless key_func captures that variance.

Deferred Nodes & Model Hooks (1.2+)

# defer=True — node waits for every other upstream node at this super-step
graph.add_node("aggregate", aggregate_fn, defer=True)

# Pre/post model hooks — no subclassing required
from langgraph.prebuilt import create_react_agent

agent = create_react_agent(
    model=model,
    tools=tools,
    pre_model_hook=compress_history,   # e.g. summarize if > N tokens
    post_model_hook=redact_pii,        # e.g. scrub emails/SSNs before persist
)

Human-in-Loop

Pause workflows for human intervention. Requires checkpointer for state persistence.

RuleFileKey Pattern
Interrupt/Resumerules/human-in-loop-interrupt.mdinterrupt() function + Command(resume=)
Approval Gaterules/human-in-loop-approval.mdinterrupt_before + state update + resume
Feedback Looprules/human-in-loop-feedback.mdIterative interrupt until approved

Streaming

Real-time updates and progress tracking for workflows. LangGraph 1.1 introduces version="v2" — an opt-in streaming format with full type safety on stream(), astream(), invoke(), and ainvoke().

RuleFileKey Pattern
Stream Modesrules/streaming-modes.md5 modes: values, updates, messages, custom, debug
Token Streamingrules/streaming-tokens.mdmessages mode with node/tag filtering
Custom Eventsrules/streaming-custom-events.mdget_stream_writer() for progress events
Streaming v2rules/streaming-v2-format.mdversion="v2" for typed streaming (LG 1.1+)

Subgraphs

Compose modular, reusable workflow components with nested graphs.

RuleFileKey Pattern
Invoke from Noderules/subgraphs-invoke.mdDifferent schemas, explicit state mapping
Add as Noderules/subgraphs-add-as-node.mdShared state, add_node(name, compiled_graph)
State Mappingrules/subgraphs-state-mapping.mdBoundary transforms between parent/child

Functional API

Build workflows using @entrypoint and @task decorators instead of explicit graph construction.

RuleFileKey Pattern
@entrypointrules/functional-entrypoint.mdWorkflow entry point with optional checkpointer
@taskrules/functional-task.mdReturns futures, .result() to block
Migrationrules/functional-migration.mdStateGraph to Functional API conversion

Platform

Deploy graphs as managed APIs with persistence, streaming, and multi-tenancy.

RuleFileKey Pattern
Deploymentrules/platform-deployment.mdlanggraph.json + CLI + Assistants API
RemoteGraphrules/platform-remote-graph.mdRemoteGraph for calling deployed graphs
Double Textingrules/platform-double-texting.md4 strategies: reject, rollback, enqueue, interrupt

Quick Start Example

from langgraph.graph import StateGraph, START, END
from langgraph.types import Command
from typing import TypedDict, Annotated, Literal
from operator import add

class State(TypedDict):
    input: str
    results: Annotated[list[str], add]

def supervisor(state) -> Command[Literal["worker", END]]:
    if not state.get("results"):
        return Command(update={"input": state["input"]}, goto="worker")
    return Command(goto=END)

def worker(state) -> dict:
    return {"results": [f"Processed: {state['input']}"]}

graph = StateGraph(State)
graph.add_node("supervisor", supervisor)
graph.add_node("worker", worker)
graph.add_edge(START, "supervisor")
graph.add_edge("worker", "supervisor")
app = graph.compile()

2026 Key Patterns

  • Streaming v2 (LG 1.1): Use version="v2" for type-safe streaming — fully typed stream() and astream() returns. Default remains "v1" for backwards compat.
  • Command API: Use Command(update=..., goto=...) when updating state AND routing together
  • context_schema: Pass runtime config (temperature, provider) without polluting state
  • CachePolicy: Cache expensive node results with TTL via InMemoryCache
  • RemainingSteps: Proactively handle recursion limits
  • Store: Cross-thread memory separate from Checkpointer (thread-scoped)
  • interrupt(): Dynamic interrupts inside node logic (replaces interrupt_before for conditional cases)
  • add_edge(START, node): Not set_entry_point() (deprecated)
  • LTS release: LangGraph 1.x is LTS — will remain ACTIVE until v2.0

Key Decisions

DecisionRecommendation
State typeTypedDict internally, Pydantic at boundaries
Entry pointadd_edge(START, node) not set_entry_point()
Routing + state updateCommand API
Routing onlyConditional edges
AccumulatorsAnnotated[list[T], add] always
Dev checkpointerMemorySaver
Prod checkpointerPostgresSaver
Short-term memoryCheckpointer (thread-scoped)
Long-term memoryStore (cross-thread, namespaced)
Max parallel branches5-10 concurrent
Tools per agent5-10 max (dynamic selection for more)
Approval gatesinterrupt() for high-risk operations
Stream modes["updates", "custom"] for most UIs
Subgraph patternInvoke for isolation, Add-as-Node for shared state
Functional vs GraphFunctional for simple flows, Graph for complex topology

Common Mistakes

  1. Forgetting add reducer (overwrites instead of accumulates)
  2. Mutating state in place (breaks checkpointing)
  3. No END fallback in routing (workflow hangs)
  4. Infinite retry loops (no max counter)
  5. Side effects in router functions
  6. Too many tools per agent (context overflow)
  7. Raising exceptions in tools (crashes agent loop)
  8. No checkpointer in production (lose progress on crash)
  9. Wrapping interrupt() in try/except (breaks the mechanism)
  10. Not transforming state at subgraph boundaries
  11. Forgetting .result() on Functional API tasks
  12. Using set_entry_point() (deprecated, use add_edge(START,...))

Evaluations

See test-cases.json for consolidated test cases across all categories.

Related Skills

  • ork:agent-orchestration - Higher-level multi-agent coordination, ReAct loop patterns, and framework comparisons
  • temporal-io - Durable execution alternative
  • ork:llm-integration - General LLM function calling
  • type-safety-validation - Pydantic model patterns

平台分布

Codex

36.81%
按下载量换算377

Claude

32.72%
按下载量换算335

Cursor

17.77%
按下载量换算182

Gemini CLI

9.5%
按下载量换算97

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills