什么是 Pflow?
面向 Claude 的 Petri net 工具集,支持校验、仿真、分析、代码生成、网络组合与模型封装,并可由自然语言生成全栈应用。
核心功能 (22 个工具)
petri_analyzeAnalyze a Petri net model for behavioral properties including reachability, deadlocks, liveness, boundedness, and element importance.
petri_applicationGenerate a complete full-stack application from an Application specification. This accepts the high-level Application DSL with entities, roles, pages, and workflows.
petri_code_to_flowConvert source code into a formal Petri net model. Analyzes code structure (control flow, state machines, resource management, concurrency) and produces an executable, verifiable Petri net — not just a diagram.
petri_codegenGenerate executable code from a validated Petri net model. Produces event-sourced application code with state machine, events, and API handlers.
petri_composeCompose multiple Petri net models into a CompositeNet with typed links between them. Validates that link endpoints reference valid places/transitions in the referenced schemas.
petri_diffCompare two Petri net models and show structural differences. Reports added, removed, and modified places, transitions, arcs, roles, and access rules.
petri_docsGenerate markdown documentation from a Petri net model with mermaid diagrams for visualization. Useful for exploring and understanding models.
petri_extendModify an existing Petri net model by applying operations. Operations: add_place, add_transition, add_arc, add_event, add_event_field, add_binding, remove_place, remove_transition, remove_arc, remove_event, remove_binding. Returns the modified model.
petri_frontendGenerate a vanilla JavaScript ES modules frontend application from a Petri net model. Produces a Vite + ES modules project with API client, state display, and transition forms using plain JavaScript.
petri_helpReturns a recommended CLAUDE.md snippet for working with pflow Petri net models. Paste this into your project's CLAUDE.md to give Claude the context it needs to design and generate Petri net applications.
petri_jssdkGenerate a typed JS SDK (ES modules) from a Petri net model. Produces workflow.js, events.js, aggregate.js, permissions.js, test.js, and index.html that wrap pflow-engine.js for browser-first testing. Optionally preview a single file.
petri_migrateMigrate a Petri net model from v1 (flat) to v2 (nested) schema format. V2 format separates the net definition from extensions like roles and views.
petri_previewPreview a single generated file without full code generation. Use this to check specific files before committing to full generation. Available templates: main, workflow, events, aggregate, api, openapi, test, config, migrations, auth, middleware, permissions, views, navigation, admin, debug
petri_sealCreate a tamper-evident PetriNetSeal for a Petri net model. Computes a canonical SHA-256 hash and optionally verifies declared invariants via reachability analysis. Returns a JSON-LD seal document.
petri_simulateSimulate firing transitions and see state changes. Returns detailed step-by-step state trace. Use this to verify workflow behavior before code generation.
petri_submitSubmit a Petri net model to the public catalog. Only core Petri net structure is accepted (places, transitions, arcs) — no extensions or code. Models are content-addressed and deduplicated by hash.
petri_validateValidate a Petri net model for structural correctness. Checks for empty models, unconnected elements, and invalid arc references.
petri_verifyVerify a PetriNetSeal: recompute the model hash, check it matches the sealed CID, and re-verify all declared invariants via reachability analysis.
petri_visualizeGenerate an SVG visualization of a Petri net model showing places, transitions, and arcs.
pflow_validateValidate a Petri net model.json for common issues including dead workflows, missing initial tokens, invalid arcs, and entity/role consistency.
seal_listList sealed Petri net models from the catalog. Returns catalog entries with metadata (name, type, CID, invariant summaries, tags). Optionally filter by net type, tag, or text query.
seal_searchGet the full PetriNetSeal document for a model by its @id or modelCID. Returns the complete seal with model, hash, invariants, and verification results.
常见问题
Pflow 是什么?
面向 Claude 的 Petri net 工具集,支持校验、仿真、分析、代码生成、网络组合与模型封装,并可由自然语言生成全栈应用。
Pflow 提供哪些工具?
提供 22 个工具,包括 petri_analyze、petri_application、petri_code_to_flow 等。
相关 Skills
表格处理
by anthropics
围绕 .xlsx、.xlsm、.csv、.tsv 做读写、修复、清洗、格式整理、公式计算与格式转换,适合修改现有表格、生成新报表或把杂乱数据整理成交付级电子表格。
✎ 做 Excel/CSV 相关任务很省心,能直接读写、修复、清洗和格式转换,尤其擅长把乱七八糟的表格整理成交付级文件。
PDF处理
by anthropics
遇到 PDF 读写、文本表格提取、合并拆分、旋转加水印、表单填写或加解密时直接用它,也能提取图片、生成新 PDF,并把扫描件通过 OCR 变成可搜索文档。
✎ PDF杂活别再来回切工具了,文本表格提取、合并拆分到OCR识别一次搞定,连扫描件也能变可搜索。
Word文档
by anthropics
覆盖Word/.docx文档的创建、读取、编辑与重排,适合生成报告、备忘录、信函和模板,也能处理目录、页眉页脚、页码、图片替换、查找替换、修订批注及内容提取整理。
✎ 搞定 .docx 的创建、改写与精排版,目录、批量替换、批注修订和图片更新都能自动化,做正式文档尤其省心。
相关 MCP Server
文件系统
编辑精选by Anthropic
Filesystem 是 MCP 官方参考服务器,让 LLM 安全读写本地文件系统。
✎ 这个服务器解决了让 Claude 直接操作本地文件的痛点,比如自动整理文档或生成代码文件。适合需要自动化文件处理的开发者,但注意它只是参考实现,生产环境需自行加固安全。
by wonderwhy-er
Desktop Commander 是让 AI 直接执行终端命令、管理文件和进程的 MCP 服务器。
✎ 这工具解决了 AI 无法直接操作本地环境的痛点,适合需要自动化脚本调试或文件批量处理的开发者。它能让你用自然语言指挥终端,但权限控制需谨慎,毕竟让 AI 执行 rm -rf 可不是闹着玩的。
EdgarTools
编辑精选by dgunning
EdgarTools 是无需 API 密钥即可解析 SEC EDGAR 财报的开源 Python 库。
✎ 这个工具解决了金融数据获取的痛点——直接让 AI 读取结构化财报,比如让 Claude 分析苹果的 10-K 文件。适合量化分析师或金融开发者快速构建数据管道。但注意,它依赖 SEC 网站稳定性,高峰期可能延迟。