计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
pocketflow【效率与协作】Use PocketFlow, a tiny Python graph framework for LLM applications, agents, workflows, RAG, batch processing, async orchestration, and supporting utilities.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task asks to build, debug, review, or explain a PocketFlow application or to translate an LLM-system design into PocketFlow nodes and flows. PocketFlow is intentionally minimal: the installed package exposes a compact graph runtime with no built-in LLM provider, vector database, search, UI, audio, or tracing integration. Those integrations live in user utilities that PocketFlow nodes call.
Read this skill when the user mentions any of these signals:
pocketflow, Pocket Flow, or a 100-line LLM framework.Node, Flow, BatchNode, BatchFlow, AsyncNode, AsyncFlow, AsyncParallelBatchNode, or AsyncParallelBatchFlow in a graph-orchestration context.prep -> exec -> post, a shared dictionary, action strings, graph transitions, or node - "action" >> other_node syntax.pip install pocketflow
python - <<'PY'
from pocketflow import Node, Flow
class Start(Node):
def prep(self, shared):
shared["seen"] = True
start = Start()
Flow(start=start).run({})
print("pocketflow import ok")
PY
For development from source, an editable install is also valid. The public package version captured for this skill is 0.0.3; see repo provenance for the source snapshot.
| If the task is about... | Read |
|---|---|
Public runtime classes, prep/exec/post, transitions, retries, fallback, nested flows, sync/async, batch/parallel behavior, or unit-test-like API debugging | core-abstraction |
| Designing an LLM app architecture, deciding between workflow/agent/RAG/map-reduce/structured-output/multi-agent patterns, or using cookbook-style recipes | design-patterns |
| Implementing provider wrappers, search/embedding/vector/TTS/database utilities, graph visualization, logging/tracing, chunking, streaming, or external dependency safety | utilities |
| Cross-cutting install/import/provider/config mistakes before choosing a sub-skill | troubleshooting |
| Router placement, source snapshot, or staleness checks | repo provenance and routing metadata |
prep(shared) reads and prepares data, exec(prep_res) performs compute and is the only phase retried, and post(shared, prep_res, exec_res) writes results and returns the next action.a >> b is the default transition. a - "search" >> b is a named transition. If post() returns None, PocketFlow looks for the default successor.BatchFlow.prep() returns parameter dictionaries; child nodes read them from self.params. Do not use params as mutable shared state.exec() methods that read/write global state; put input selection in prep() and result persistence in post().AsyncParallelBatchNode and AsyncParallelBatchFlow overlap independent async work; they are not CPU-parallel execution engines.